-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12-02-26 2:09 PM, Arnon Weinberg wrote: > That answers my question. Running: >> //cd// cvs -n commit
I usually use the command "cvs -nq update", which will print a ? before each file it doesn't know about. The -q option suppresses the "Processing directory abc" messages, which can hide more important messages. > One solution I found is to temporarily rename the containing > directory: >> cd .. mv pwd pwd.bak /cvs checkout -A -d ~/directory module/ mv >> pwd/CVS pwd.bak rm -rf pwd mv pwd.bak pwd That's only part of what you need to do. When you checkout to the temporary directory, CVS will populate it with the current versions in the repository, which may not match the versions that were checked out at the time the CVS directory was blown away. CVS will indicate that the developer has modified the file locally. If the developer then checks in the file, then they will in fact check in an older version of the file, blowing away the more recent changes. After you have restored the CVS directory, you will need to execute 'cvs -nq update' to get a list of all files which CVS thinks have been modified, then compare each of the files against /earlier/ versions in the repository. For example, if 'cvs status filename' indicates revision 1.4, you must compare the file against 1.3 (`cvs diff -r1.3 filename`). Don't just compare it against the previous version, you must go back several versions to be sure you have the correct version. If the "modified" version is identical to an earlier version, then you must use 'cvs update -C filename' to bring it in sync with the repository. This will discard local changes, and fetch the current version from the repository. The tricky part comes in for files that actually were modified locally, and which also were checked into the repository. For those files, you will have to use the 'update -C' command, and manually re-apply the local modifications. As Arthur suggested, frequent checkins can mitigate these problems, but you still need to be aware that they can occur. And, of course, there is no substitute for training the developers to be more careful and not delete the CVS directory. - -- Jim Hyslop Dreampossible: Better software. Simply. http://www.dreampossible.ca Consulting * Mentoring * Training in C/C++ * OOD * SW Development & Practices * Version Management -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9K6XwACgkQLdDyDwyJw+NGWgCcDH1FpxUO0Lb0wICcHsRodOlu CnAAoJhUwtnis6filT1nsyBxJubGZMf9 =77jX -----END PGP SIGNATURE-----
