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

Re: reverting single file in multi-file commit

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2006-09-28 03:17:45 CEST

On 9/27/06, Igor Serebryany <igor47@monksofcool.org> wrote:
>
> Hi,
>
> I am having the followingn problem, which I will describe in a
> scenario. In my working copy, I changed files A, B and C and then
> commited the changes. I then realized that file A should not have been
> changed. I cannot figure out how to undo the change.
>
> The folks at #svn pointed me to
> http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
> However, the example there assumes that the file I would like to
> revert was changed in its very own commit. If I follow those
> instructions and apply the commit in reverse using svn merge, I would then
> have to restore changes to files B and C.

No you wouldn't. Instead of passing a directory, specify the one file
that you need to reverse merge..

> What makes the most sense to me is to issue
> "svn update --revision PREV A"
> in my working copy. However, although my working copy is in the
> state that I want the repository to be after this command, "svn commit"
> now failes silently.

Why do you say it fails? I would expect to see nothing happen,
because you haven't changed anything since performing the update.

> Am I going about this all wrong? Or is this a bug, and svn commit
> out to do something, or at least give me a message telling me what I did
> wrong?

See above. The reverse merge *is* what you want, you just have to do
that merge on the single file, not on the whole directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 28 03:18:17 2006

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.