I have a file in CVS under x/y/f.txt
. In my local copy, I have x/
, but no x/y/
and I want to fetch f.txt
from the repo. Is there any combination of CVS command-line switches which can make it pull only x/y/f.txt
with all of its ancestors (in this case x/y/
) but without any collateral files (such as x/y/g.txt
or x/z
)?
The only way I've found so far is:
cvs up -d -l x/y
# ... but be careful not to pass -P (``prune'') implicitly via your ~/.cvsrc
# ``-l'' means act locally, i.e. no recursion
# Do the above for every missing ancestor directory, in left-to-right order
# And ultimately:
cvs up x/y/f.txt
However, it would be rather inelegant for a shell script to split a path and iterate through the ancestors, so I'm still looking for a good solution.