find -name Root -exec sed -i.bak -e 's:/old/path:/new/path:' {} \;. You will also need to be careful if you use a Windows CVS server like CVSNT, since using the ':' as the sed separator will require you to escape the colon in your repository path if you have one. By the way, this will make a backup of each Root file called Root.bak, just in case you don't trust it (and why should you...:P)Sunday, November 21, 2004
Re-routing CVS repositories
I'm putting this here to save myself the hassle of figuring out how to do it on the rare occasions I need to re-route a CVS sandbox to a different repository without releasing and checking out from the new repository. So if anyone else is wondering how to do it (you'll need cygwin on Windows), run this command from the top of your checkout tree: 
Subscribe to:
Post Comments (Atom)
 
How about adding all files in a directory tree. That was pretty funcky too :-)
ReplyDeleteSimon, this is how I add all files in the new directory 'newdir' from the command line on UNIX:
ReplyDeletefind newdir -type d > DIRS ;
cvs add `cat DIRS` ;
find newdir -type f | grep -v -w CVS > FILES ;
cvs add `cat FILES` ;
cvs commit -m '(some comments)' newdir ;
rm DIRS FILES
I never add files from the command line on Windows, so I couldn't tell you what to watch out for there.
A shorter way to add all CVS files in a directory tree, assuming you're adding 'dirtree' (from memory, but hopefully you get the gist):
ReplyDeletefind dirtree -type d | xargs cvs add
find dirtree -type f | grep -v CVS | xargs cvs add
cvs commit -m 'added everything in dirtree' dirtree