[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Reverting out of a commit

From: Ron Gilbert <lists_at_rzweb.com>
Date: 2005-07-26 19:55:41 CEST

> Perhaps the best way would be to place the non-corrupt binary file
> into
> your working copy and then commit your changes.
> This will make a new HEAD revision with the updated file.

This is what I was trying to do...I was doing this under TSVN and
getting errors about my working copy not being uptodate.

I just tried the same thing using the command line (Windows):

# Get old, non-corrupt copy
svn update -r99 foo.jpg

#commit it making it the head
svn commit foo.jpg

When I do this, I get nothing back (just a new prompt) and the file
is not committed and there is not a new head.

If I modify foo.jpg, then I get a "Transaction failed, file out of
date" (not exact words).

Ron

On Jul 26, 2005, at 10:20 AM, Christopher Ness wrote:

> On Tue, 2005-07-26 at 09:51 -0700, Ron Gilbert wrote:
>
>> What is the best way to revert out of a commit on a single file? I
>> had a situation yesterday where a (binary) file was committed that
>> was corrupt (not svn's fault). It was the head, and I just wanted to
>> removed it, but I could not find a good way to do this. I ended up
>> pulling down the previous version and tried to commit that, but it
>> would not let me because it was not current, so I had to modify the
>> file before committing it.
>>
>> This seem very cumbersome. Is there a way to remove the head, or
>> quickly make another revision the head?
>>
>
> If HEAD = 100 and you have a working copy of the changes then to
> revert
> the last commit (which is revision 100):
> svn up # Update your working copy
> svn merge -r100:99 . # Reverse merge the changes made in 100
> ** Inspect the changes made to make sure you are happy with them
> svn commit # Send changes to the repository
>
> This will revert ALL changes in commit 100, which you probably don't
> want to do.
>
> If you simply want to remove a file from the repository:
> svn help rm
>
> Perhaps the best way would be to place the non-corrupt binary file
> into
> your working copy and then commit your changes.
> This will make a new HEAD revision with the updated file.
>
> HTH's,
> Chris
> --
> Wireless Group
> McMaster University
>
> summer
> 13:13:45 up 4 days, 23:06, 5 users, load average: 0.10, 0.18, 0.17
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 26 19:59:20 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.