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

Re: Problem with File Creation

From: Brian Russell <tortue_at_emailfor.me.uk>
Date: 2006-03-08 00:36:45 CET

Sven Brueggemann wrote:
> I wrote:
>
>>Brian Russell wrote:
>>
>>>I am not sure if this is a SVN or a tortoise issue, but since I am only
>>>using Tortoise for the client, I think it appropriate to post here.
>>>Create a new file /a/b/c/d.txt on client 1.
>>>Commit changes on client 1.
>>>Create a new file /a/b/c/d.txt on client 2. (same name as other client,
>>>but different file contents.)
>>>Before committing client 2, I perform an "SVN update" on path /a/b/c. I
>>>would expect to get a conflicting file d.txt, which would need merged
>>>and resolved.
>>>Instead I get the error
>>>"Error: Failed to add file 'e:\svn\a\b\c\d.txt': object of the same name
>>>already exists"
>>
>>Did you add the file to version control on client 2? If not, this is
>>expected behaviour since subversion never touches files that are not under
>>version control. Imagine: The file could be binary and be totally screwed
>>up by adding conflict markers - and for unversioned files there is no
>>pristine copy to revert to.
>
>
> Sorry - I was wrong here. It won't work even if the file on client 2
> is under version control. Subversion wants to apply the "add" operation to
> your WC and it fails, because the file is already there.
>
> Nevertheless I think this is so by design. In most cases, a conflict
> wouldn't make more sense that an error, would it?
>
> Kind regards
>
> Sven
>
> ---------------------------------------------------------------------

Sven,
I do see your point about not wanting to overwrite a file in the user's
wc when trying to add a new file that has already been committed to the
repository, and I agree that it is valid that this should be an error
condition, and should be brought to the attention of the user.

However, I am not sure that the state of the wc after this failure is
desirable. Even after removing the offending file, an update produces an
error of the form "File not found: transaction 'nn' etc".
There can be many instances of .svn/entries files that have the
"incomplete=true" flag, and there is the potential that only some of the
changes in the new revision have been applied before the error, the
remainder have not been applied.

What would be the recommended recovery action if the "already exists"
error occurred, in order to be sure of a known state of the wc?

Thanks for your help.

Brian.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Wed Mar 8 00:32:14 2006

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

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