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

Re: Bug Report: file Case conflict

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: Wed, 13 Feb 2008 21:37:28 +0000

On 09/02/2008, Helder <heldersepu_at_gmail.com> wrote:
> Hi All
>
> I've been using tortoise now for over a year, every once in a while
> we get a "conflict" because a file was committed with different case.
>
> Here is the scenario:
> If we try to add an existing file
> TortoiseProc /command:add /path:.\TSVN\build.txt /notempfile /closeonend
> we get this
> Error: 'TSVN\build.txt' is already under version control
>
> but if the file case is changed
> RENAME build.txt BUILD.TXT
> and then add it
> TortoiseProc /command:add /path:.\TSVN\BUILD.TXT /notempfile /closeonend
> the file is successfully added
> Added: TSVN\BUILD.TXT
> at this point the file can be committed creating a CaseConflict

That's correct. It is well known that Subversion is case-sensitive.
That fact that Windows is not does not make this a bug.

> I was researching this issue and found this in the Change Log:
> Version 1.0.4
> - NEW: Before a commit, TSVN scans all files in the working copy
> and adjusts the case if it got changed. (Stefan)
> http://sourceforge.net/project/shownotes.php?release_id=566115

Also correct. If you change the case of a file which is already
versioned, TSVN will silently change it back again. Obviously it can
only do that of the file is already versioned.

> but is not actually "Before a commit" it seems that what actually
> adjust the case of the filename is the [Check for Modifications] or
> the command:
> TortoiseProc /command:repostatus /path:".\TSVN"
>
> If I'm not mistaken the function that does the adjustment is in:
> \src\SVN\Svnstatuslistctrl.cpp
> bool CSVNStatusListCtrl::BuildStatistics()
>
> I guess it will be good idea to "scan & adjust" the parent folder
> before a file is added from the command line or the explorer
>
> The problem in a nutshell:
> Files can be added with the incorrect case and then committed

Well of course. How would TSVN know that you used the wrong case if
it's a new addition? The only possible way would be to check every
file against the repository, and of you add a large tree that would
take a *very* long time. Better to do that server side and add a
pre-commit hook which rejects additions of files which cause case
conflicts.

http://tortoisesvn.net/case_conflict_solution

Simon

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-02-13 22:37:35 CET

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