TortoiseHg 1.1.4 trouble to rename a directory with only different case

Valborg Kalender valborg00 at yahoo.com
Mon Nov 1 05:54:48 CDT 2010


TortoiseHg 1.1.4 trouble to rename a directory with only different case

Hi there,


When trying to rename a directory using TortoiseHg on a Windows (I'm
using Windows 7) where only change is the directory name case, the
result is a corrupt archive.

The example below is shown using as much as possible using mercurial
from the CMD command prompt. This just to make it more ilustrative.

1) Create a directory with a look like below:

   C:\Temp\Test\Dir1 
   C:\Temp\Test\Dir1\File1.txt 
   C:\Temp\Test\Dir1\File2.txt
   C:\Temp\Test\Dir2
   C:\Temp\Test\Dir2\File3.txt

2) Create the archive:

   C:\Temp\Test> hg init
   C:\Temp\Test> hg add
   C:\Temp\Test> hg commit -m "First version"

3) Try to rename the directory "Dir1" to "dir1".

   NOTE: I rename the directory twice, just so that I don't get a
         directory "C:\Temp\Test\dir1\Dir1". I guess you can do this
         in one run...

   C:\Temp\Test> hg rename Dir1 Dir1X
   C:\Temp\Test> hg rename Dir1X dir1

4) Show archive status:

   C:\Temp\Test> hg status

     A dir1\File1.txt
     A dir1\File2.txt
     R Dir1\File1.txt
     R Dir1\File2.txt

 
5a) Save the changes in the archive using TortoiseHg from the context
    menu in Windows Explorer (ie. TORTOISEHG -> COMMIT). 

5b) After the commit is made, there is a leftover.

    C:\Temp\Test> hg status

     A dir1\File2.txt
     R Dir1\File2.txt

5c) The archive now seems to be in a "flux" state.

    C:\Temp\Test> hg clone C:\Temp\Test C:\Temp\TestClone

    updating to branch default
    abort: case-folding collision between dir1/File1.txt and Dir1/File1.txt

 
5d) In this situation you HAVE TO make one extra commit from the command-
    line. There is no way to make an extra commit using TortoiseHg (nothing
    is commited how many times you try).
 
    C:\Temp\Test> hg commit -m "Make commit of missing files" 
6a) If you instead do the commit from the command-line (instead of point (5a)
    above) everything workes as expected.

    C:\Temp\Test> hg commit -m "Change of directory name"

I don't know if this is a decided design time behaviour in TortoiseHg, or if
its a flaw. In case it is a flaw maybe an adjustment can be incorporated in
a future version.


Sincerely,

  Per Danielsson
  Sweden



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20101101/c7a20e92/attachment.htm>


More information about the Mercurial mailing list