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

Re: Cannot commit after failed attempt, how to recover?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-06-05 00:50:48 CEST

On Jun 4, 2007, at 16:56, Phil Endecott wrote:

> I tried to commit changes to three files:
>
> - OMakefile has changes.
> - WorldView.cc has changes.
> - WorldView_photos.cc is an 'svn copy' of WorldView.cc, with
> further changes.
>
> The commit failed:
>
> $ svn commit -m"Split out WorldView_photos"
> Sending src/OMakefile
> Sending src/WorldView.cc
> Adding src/WorldView_photos.cc
> Transmitting file data ...svn: Commit failed (details follow):
> svn: MERGE request failed on '/pictureframe/trunk/src'
> svn: MERGE of '/pictureframe/trunk/src': Could not read status
> line: Connection reset by peer (http://svn.chezphil.org)
>
>
> I don't blame Subversion for this; on investigation it turned out
> that the server had an enormous load average due to someone trying
> to spam / hack a PHP forum. They weren't succeeding, but Apache
> was obviously working hard to defeat them. I waited a bit for the
> load to come back down and tried again:
>
> $ svn commit -m"Split out WorldView_photos"
> Sending src/OMakefile
> svn: Commit failed (details follow):
> svn: Your file or directory 'OMakefile' is probably out-of-date
> svn: The version resource does not correspond to the resource
> within the transaction. Either the requested version resource is
> out of date (needs to be updated), or the requested version
> resource is newer than the transaction root (restart the commit).

The commit succeeded, but your working copy doesn't think it did.

> Hmm, well I read the message and thought "an update can't do any
> harm"...
>
> $ svn update
> G WorldView.cc
> G OMakefile
> svn: Failed to add file 'WorldView_photos.cc': object of the same
> name already exists

To your working copy, it's just as if someone else had committed the
changes to those two files and added that third file. You now have to
resolve the conflict manually. For WorldView.cc and OMakefile which
Subversion merGed, probably there are no longer any changes to the
file. For WorldView_photos.cc, probably the file you still have in
your working copy is the same one Subversion is now trying to pull
down from the repository server.

> Not looking good but I'll try to commit anyway...
>
> $ svn commit -m"Split out WorldView_photos"
> Adding src/WorldView_photos.cc
> svn: Commit failed (details follow):
> svn: File '/pictureframe/trunk/src/WorldView_photos.cc' already exists

There's nothing left to commit; the commit already succeeded. Now we
just need to get your working copy synced back up.

> Well there's always that mysterious "cleanup" command:
>
> $ svn cleanup
> $ svn commit -m"Split out WorldView_photos"
> Adding src/WorldView_photos.cc
> svn: Commit failed (details follow):
> svn: File '/pictureframe/trunk/src/WorldView_photos.cc' already exists

"cleanup" really doesn't do anything unless Subversion tells you you
need to run cleanup.

> Right, I could just keep throwing random commands at it in the hope
> that it recovers, but I know from previous experience that that can
> get me in deeper trouble! So, what do you experts suggest?
>
> This is with 1.4.2 (r22196) on the client and 1.2.3 (r15833) on the
> server (using FSFS) (hmm, probably about time I upgraded that),
> both Debian systems.
>
> Any help would be very much appreciated.

Simply remove WorldView_photos.cc from your working copy and "svn
update" again. Subversion will pull that file down from the
repository server again and your working copy will be up to date.
Your work is committed.

Just in case I'm wrong, save a copy of WorldView_photos.cc somewhere
before you nuke it from your working copy. But I'm pretty sure it's
safely in the repository already.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 5 00:51:36 2007

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.