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

Re: [TSVN] Two files differing only in case prevent update

From: Roel Harbers <roel_at_roelharbers.nl>
Date: 2004-07-14 13:45:15 CEST

What is the proper way to *change* a filename's case when an incorrectly
"cased" filename has been commited? (Case may be important because of
naming conventions or coding style or whatever)

example: renaming test.txt to Test.txt

I tried to change the name in one wc, and, as you said, that's reverted
back to test.txt when I try to commit using tsvn. (so no commit is done)

So, I tried to rename using the repo browser, which worked, but now any
client doing an update gets the "object already exists" error. (probably
because the add is done before the delete).

deleting the file from the wc using just the explorer (no svn delete)
does not help: update first restores the deleted file (test.txt), and
then the same "object already exists" error occurs.

doing an svn delete on the file first doesn't help either:
The update seems to go fine, (Add Test.txt, delete test.txt) but I now
have neither test.txt nor Test.txt in my wc (which is to be expected: I
now have the head revision with Test.txt in my wc, plus the deletion of
test.txt, which actually deletes Test.txt)

However, I would expect a Revert to restore the WC to head, with
Test.txt, but that doesn't happen: I get a "Can't copy
'D:/svn/test/.svn/text-base/Test.txt.svn-base' to
D:/svn/test/Test.txt.tmp': cannot find file" error.

Trying an update now gives the same error. "Check for updates" shows
Test.txt as locally missing.

A completely new checkout seems to be needed to fix it.

An workaround, although awkward, would be to renamed it first to a
completely different name, let all clients update, and then rename it
back to the correct case name. (doing this without the intermediate
update doesn't work either)

regards,

Roel Harbers

  from lower to uppercase
SteveKing wrote:
> On Tue, 13 Jul 2004 15:26:11 -0700, Dr. Rainer Hessmer
> <rainerh@dataworkssystems.com> wrote:
>
>
>>I am the evangelist for Subversion and TortoiseSVN in our company. We
>>successfully use both since about half a year. There is one thing that
>>causes a bit a frustration amongst our developers:
>>
>>Every so often somebody gets to the point where the same file exists
>>twice in a given directory in the repository only differing in case
>>(e.g., Web.config and web.config). Once you get to this point an attempt
>>to update your working copy will result in this error message: "Failed
>>to add file 'c:\bla\bla\web.config': object of the same name already
>>exists."
>
>
> The real question now is: how did you get to this point? Since TSVN
> 1.0.5 before every commit a check is done if a file has been changed
> just in case and if such a file is found it's renamed back. So that
> situation shouldn't even happen anymore.
>
>
>>I know how to get out of the problem by deleting one of the two files
>>via a server-side delete. I also understand that Subversion has to
>>handle file and directory names as case sensitive in order to be useful
>>for Linux and other case sensitive platforms.
>>
>>However, I think TortoiseSVN could handle this error situation more
>>gracefully. A few options that I can think of are:
>>- Instead of the error message allow the user to specify which of the
>>two files s/he wants to use (it would also be nice to ask the user
>>whether the other file should be deleted)
>
>
> Since you already know that Subversion must deal with such situations,
> you should also know that the error message is thrown by the
> Subversion library. TSVN can't stop that error from happening, and
> neither can it interfere - once the Subversion library throws the
> error, there's no way to keep the function from stopping.
>
>
>>- Prevent the user from adding a file that only differs in case from a
>>file that already exists in the same directory in the repository. Since
>>TortoiseSVN is a pure Windows client it could perform this check (the
>>same check would not make sense for the platform neutral Subversion
>>system).
>
>
> How about updating your TSVN client?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
> For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jul 14 14:52:42 2004

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

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