B. Bogart wrote:
> Hi all,
>
> I hope this not already been asked, but I could not find any answers in
> the archives.
>
> So I was making some changes to my code that turned out to be more risky
> than not. I committed them so I could see if I could salvage what I had
> changed to make it work on another machine.
>
> So the end end I realize it was a dead end, so I used svn copy to make a
> branch out of my trunk with the dead end changes.
>
> I reverted my working copy back to the previous revision and want to
> make some basic changed to it.
>
> Now I can't commit due to an "svn: Out of Date" message.
>
> I don't need the latest revision, its all in the branch now, so how can
> I get trunk back to the revision before my last commit?
>
> I suppose I could copy all the files to a tmp directory (from the my
> working copy at the old revision plus changes). svn update trunk to the
> latest reversion, and then copy the tmp files over the working copy and
> recommit. Is that the best approach?
>
> In the future what is the ideal way to make a branch from a working copy
> of trunk? just svn copy as I did?
Use a reverse merge to undo a commit:
for 1.3 or older: svn merge -r N:N-1 . .
for 1.4 or greater: svn merge -c -N . .
svn commit -m 'Revert rN.'
where N is the revision you want to undo.
Regards,
Blair
--
Blair Zajac, Ph.D.
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-18 01:56:32 CET