Subversion reversion and big commits
svn revert revision
Reverting a revision is in fact titled nothing of the kind, but is a type of merge.
From http://mybravenewworld.wordpress.com/2007/11/13/subversion-how-to-revert-a-bad-commit/
subversion: How to revert a bad commit
svn merge -r [current_version]:[previous_version] [repository_url]
svn commit -m “Reverting previous commit and going back to revision [previous_version].”
http://svn.haxx.se/users/archive-2004-03/0047.shtml
Taking the example from the Subversion book.
$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch
So how do you undo an undo? Revert a revert? Cancel a reversion to a new revision, countermand a backwards merging of changes between two commits?
Well, taking the example above you would simply:
$ svn merge -r 480:406 http://svn.example.com/repos/calc/branches/my-calc-branch
Or at least that worked for:
Ebony:~/workspace/repos/agaric ben$ svn merge -r 1341:1342 https://sever.example.com/srv/svn/agaric
(Undoing a 1342:1341 merge.)
Your mileage may vary. Actually, it didn't even work for us. It restored everything that had been moved, but didn't
I think I was missing an SVN update there-- you do have to svn update after committing.
svn timeout
Big commit timing out:
svn: Commit failed (details follow):
svn: PROPFIND request failed on '/srv/svn/agaric/!svn/vcc/default'
svn: PROPFIND of '/srv/svn/agaric/!svn/vcc/default': Could not read status line: Operation timed out (https://66.135.37.243)
Solution? After 45 minutes of fruitless searching, I figured this one out on my own. Commit a directory at a time.
svn revert revision
Reverting a revision is in fact titled nothing of the kind, but is a type of merge.
From http://mybravenewworld.wordpress.com/2007/11/13/subversion-how-to-revert-a-bad-commit/
subversion: How to revert a bad commit
svn merge -r [current_version]:[previous_version] [repository_url]
svn commit -m “Reverting previous commit and going back to revision [previous_version].”
http://svn.haxx.se/users/archive-2004-03/0047.shtml
Taking the example from the Subversion book.
$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch
So how do you undo an undo? Revert a revert? Cancel a reversion to a new revision, countermand a backwards merging of changes between two commits?
Well, taking the example above you would simply:
$ svn merge -r 480:406 http://svn.example.com/repos/calc/branches/my-calc-branch
Or at least that worked for:
Ebony:~/workspace/repos/agaric ben$ svn merge -r 1341:1342 https://sever.example.com/srv/svn/agaric
(Undoing a 1342:1341 merge.)
Your mileage may vary. Actually, it didn't even work for us. It restored everything that had been moved, but didn't
I think I was missing an SVN update there-- you do have to svn update after committing.
svn timeout
Big commit timing out:
svn: Commit failed (details follow):
svn: PROPFIND request failed on '/srv/svn/agaric/!svn/vcc/default'
svn: PROPFIND of '/srv/svn/agaric/!svn/vcc/default': Could not read status line: Operation timed out (https://66.135.37.243)
Solution? After 45 minutes of fruitless searching, I figured this one out on my own. Commit a directory at a time.
Comments
Post new comment