-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12-07-05 1:48 PM, Andrew Michael Levin wrote: > Hi, > > How do I revert to a version of a cvs directory that I had at a > previous date. Do I have to go through and revert each file > individually? When I do > > cvs up -C -D "2012-07-05 13:41" > > it sets the sticky date for all of the files, so I can't check the > reverted files in to the HEAD. Is there some way around this?
1) ensure that the above command did, in fact, give you exactly the right versions of the files. 2) Create a tag based on the date (this is not strictly speaking necessary, but it helps when you're viewing the logs so you know what's what): cvs tag -D "2012-07-05 13:41" revert_point 3) ensure the HEAD is the current version cvs up -A 4) Apply a tag to the HEAD so you can back out the reverted files, if necessary cvs tag pre_revert 5) Perform a "reverse merge": cvs update -j pre_revert -j revert_point 6) You'll want to compare the current directory against the old version to ensure nothing went wrong: cvs -q diff -r revert_point If you did not add any files, there should be no output from the diff command. If you added files, then each file you added will spit out a message "cvs diff: [filename] was removed, no comparison available" If it spits out a bunch of differences, then back out the merge by issuing the command `cvs update -C`, and try again. When you are satisfied that the directory contains the correct information, commit it, and tag the post-revert version. Be sure to mention the tag you used for the revert. - -- 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/ iEYEARECAAYFAk/2ZJMACgkQLdDyDwyJw+PvagCbBLXCFCDdG9aA6OziD56fjO7X dJkAnjgUpnGaIIZZ6tHq0O0q9CKm1uz0 =G67X -----END PGP SIGNATURE-----
