On May 18, 2018, at 17:01, Bo Berglund wrote: > So now I know what has happened and I found the revision numbers for > two revisions that were committed erroneously last December when I was > preparing for the CVS -> SVN migration. > These revisions are 4309 and 4310 > > Now my problem is in finding the correct svn command to restore the > trunk files to the state they were in prior to commit r4309. > > I have googled a lot tonight and read the svnbook too but I am none > the wiser (not so that I dare run a command and risk screwing up the > repository). > I have some candidates within the top dir of a WC of the > project/trunk: > > svn merge -c 4308:HEAD . > > svn merge -r 4308:HEAD . > > svn merge -r 4309:HEAD . > > svn merge -c COMMITTED:PREV . > > Questions: > ---------- > 1) Use -c or -r? > > 2) Which order of revision numbers? > > 3) What to do to restore to two revisions back?
When merging: "-c 500" is a shorthand synonym for "-r 499:500". "-r 499:500" means "the set of steps to turn r499 into r500". You'll use this if you want to repeat what you did in a revision, for example to make the same change on another branch. If instead you want to undo a change you already committed, then you'll want to merge in the reverse order: "-r 500:499" to turn 500 back into 499, or using the shorthand: "-c -500". If you want to do two revisions at once, just extend the range, e.g. "-r 498:500" is the steps to turn r498 into r500. So if you want to undo what you did in revisions 4309 and 4310, you would merge "-r 4310:4308". http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo