You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Witold Rugowski <ru...@nhw.pl> on 2006/09/29 10:31:51 UTC
How to revert file to few revisions back?
Hi!
I have trouble with one thing in svn. I often want to "go back" a few
revisions of particular file. But when I do
rm FILE
svn update -r SomeOldRevison FILE
after making changes to FILE commit fails with something like
svn: Out of date: 'FILE' in transaction 'SomeNewRevision'
I looked through SVN book, read FAQ and history but find no easy
solution. Currently I do :
rm FILE
svn update -r SomeOldRevison FILE
cat FILE > /tmp/FILE
svn update FILE
cat /tmp/FILE > FILE
rm /tmp/FILE
Is there some other, less cumbersome way to do this?
--
Witold Rugowski
http://nhw.pl/wp/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: How to revert file to few revisions back?
Posted by Witold Rugowski <ru...@nhw.pl>.
Andy Levy wrote:
> You need a reverse merge. svn merge -r <laterrev>:<oldrev> file
Well it works ;-)) Only one thing - could it be done only for files in
current directory? When I try to do it for files 'below' current it
fails with:
$ svn merge -r 44:30 app/views/route/show.rhtml
svn: Cannot replace a directory from within
--
Witold Rugowski
http://nhw.pl/wp/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: How to revert file to few revisions back?
Posted by Andy Levy <an...@gmail.com>.
On 9/29/06, Witold Rugowski <ru...@nhw.pl> wrote:
> Hi!
> I have trouble with one thing in svn. I often want to "go back" a few
> revisions of particular file. But when I do
>
> rm FILE
> svn update -r SomeOldRevison FILE
>
> after making changes to FILE commit fails with something like
> svn: Out of date: 'FILE' in transaction 'SomeNewRevision'
>
> I looked through SVN book, read FAQ and history but find no easy
> solution. Currently I do :
>
> rm FILE
> svn update -r SomeOldRevison FILE
> cat FILE > /tmp/FILE
> svn update FILE
> cat /tmp/FILE > FILE
> rm /tmp/FILE
>
>
> Is there some other, less cumbersome way to do this?
You need a reverse merge. svn merge -r <laterrev>:<oldrev> file
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Version tree
Posted by Mayank Gupta <ma...@induslogic.com>.
Does subversion have a GUI where you can see the version tree for files and
dir?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org