You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Thomas Harold <tg...@tgharold.com> on 2006/11/02 18:30:03 UTC

svn up - after broken update, file already exists error

Probably one of the more annoying errors that SVN gives.  Basically, if 
you start to update a large directory (or directory tree) and stop the 
update somewhere in the middle, SVN now doesn't know what to do.  Any 
further attempts to "svn up" on the tree will fail with the "already 
exists" error.

There has to be a more graceful way of handling this failure.  Besides 
requiring the user to blow away all of the data (a few GB in some cases) 
that they've already downloaded and re-pull everything down over the wire.

If the CRC / checksum / MD5 of the file matches what is already in the 
repository, SVN should simply note the fact, not transfer the file, but 
mark it as being under version control.

(I realize this is probably in a bug or enhancement request... so I'm 
probably just venting.)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn up - after broken update, file already exists error

Posted by Thomas Harold <tg...@tgharold.com>.
Erik Huelsmann wrote:
> On 11/2/06, Thomas Harold <tg...@tgharold.com> wrote:
>> Probably one of the more annoying errors that SVN gives.  Basically, if
>> you start to update a large directory (or directory tree) and stop the
>> update somewhere in the middle, SVN now doesn't know what to do.  Any
>> further attempts to "svn up" on the tree will fail with the "already
>> exists" error.
> 
> Could you post a reproduction recipe? 'svn up' operations are supposed
> to be interuptable (and after that continuable).

This might be TortoiseSVN specific, but I'll see if I can reproduce it 
with the Windows command-line client.  It happens quite frequently with 
TSVN over unreliable links when doing updates that take a few minutes 
and you have to kill off the window because it seems to have hung.

Nope... managed to do it in command-line.

1) have a folder with 100+ files in it (the more the merrier, it can 
happen with only a few files, it's just easier to test with 100+ files)

2) start an 'svn up' operation that is pulling down files

3) kill the "svn.exe" process in Task Manager (not Ctrl-Break or Ctrl-C, 
  which SVN handles gracefully, it has to be a hard kill)

4) try the 'svn up', SVN will (properly) complain about locks and tell 
you to run "svn cleanup" (good so far).

5) run svn cleanup

6) try "svn up" again, svn will now complain:

svn: Failed to add file 'ex030626.log': object of the same name already 
exists

So there's 2 parts to the bug, or I don't know where the bug lies:

a) "svn up" is liable to leave the working copy in an unfixable state if 
it dies unexpectedly

b) "svn cleanup" isn't doing its job of cleaning up the working folder 
and matching things back up.

...

(And yes, I'm really really looking forward to v1.5 with the better 
handling of existing files within working copies.  That will allow us to 
ship a DVD with a current snapshot of the working copy to far flung 
users that they can then do a much quicker online update to get up to 
speed.  Or they can recover from working copy errors where they have the 
files, but SVN has gotten confused.)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn up - after broken update, file already exists error

Posted by Erik Huelsmann <eh...@gmail.com>.
On 11/2/06, Thomas Harold <tg...@tgharold.com> wrote:
> Probably one of the more annoying errors that SVN gives.  Basically, if
> you start to update a large directory (or directory tree) and stop the
> update somewhere in the middle, SVN now doesn't know what to do.  Any
> further attempts to "svn up" on the tree will fail with the "already
> exists" error.

Could you post a reproduction recipe? 'svn up' operations are supposed
to be interuptable (and after that continuable).

Thanks in advance!

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn up - after broken update, file already exists error

Posted by Mark Phippard <ma...@softlanding.com>.
Thomas Harold <tg...@tgharold.com> wrote on 11/02/2006 01:30:03 PM:

> Probably one of the more annoying errors that SVN gives.  Basically, if 
> you start to update a large directory (or directory tree) and stop the 
> update somewhere in the middle, SVN now doesn't know what to do.  Any 
> further attempts to "svn up" on the tree will fail with the "already 
> exists" error.
> 
> There has to be a more graceful way of handling this failure.  Besides 
> requiring the user to blow away all of the data (a few GB in some cases) 

> that they've already downloaded and re-pull everything down over the 
wire.
> 
> If the CRC / checksum / MD5 of the file matches what is already in the 
> repository, SVN should simply note the fact, not transfer the file, but 
> mark it as being under version control.
> 
> (I realize this is probably in a bug or enhancement request... so I'm 
> probably just venting.)

Subversion trunk, which will eventually be 1.5, has enhancement to 
update/checkout/switch to allow them to continue when encountering an 
existing file.  I believe you have to specify the --force switch on the 
command to get this feature.  Basically, it will leave the local file in 
tact and just slide the working copy file beneath it.  If the files are 
different svn status will show the file as locally modified, revert would 
restore it to the repository file.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org