My co-worker checked out our source tree from cvs and made some local changes, and then gave me a copy of the entire modified directory. When I try to do cvs operations on it, cvs is asking for his password. Is there a way to change the saved username in the cvs files within this directory so that I can continue working on it as if I had checked it out and made the changes?
We'd prefer not to check in this modified code or create any additional branches.
Thanks.
Use “cvs checkout” giving the name of the directory in the cvs repository you want to checkout, where the name you give is a directory under CVSROOT, presently $CD_SOFT/cvs (eg app/alh, script). The directory you give, and all subdirectories, will be placed in your working directory.
Click on the left window in the program and select a folder. Then select Cvs Admin - Checkout Module. Select the project folder you created earlier. Enter project module name and click OK.
To retrieve a tagged file or set of files, use the -r tagname option to cvs checkout or cvs update . Use checkout to create a new sandbox, and use update to modify an existing sandbox.
cvs(Concurrent Versions System) command in Linux is used to store the history of a file. Whenever a file gets corrupted or anything goes wrong “cvs” help us to go back to the previous version and restore our file.
Found a solution:
A partial description is here: http://worldforge.org/doc/faq/cvs/#unix2
Here's what I did:
> find module_dir_name -regex .*CVS/Root -print0 | xargs -0 perl -p -i.orig -e "s/olduser/newuser/;"
> find module_dir_name -regex .*CVS/Root.orig -print0 | xargs -0 perl -p -i.orig -e "s/olduser/newuser/;"
Thanks for your solution, stupakov; it helped me a lot!. It can be slightly simpler (and more universal; I didn't have perl installed) with this command. Note that it handles both Root and Root.orig:
find module_dir_name -regex ".*CVS/Root\(.orig\)?" -print0 \
| xargs -0 sed -i s/olduser/newuser/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With