Bug 1717 - 'hg mv' on case-insensitive filesystems cannot change a file name's case
Summary: 'hg mv' on case-insensitive filesystems cannot change a file name's case
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
: 2963 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-01 10:27 UTC by David Wolever
Modified: 2012-12-26 15:22 UTC (History)
9 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Wolever 2009-07-01 10:27 UTC
Using 'hg mv' to change change a file name's case fails on case-insensitive 
filesystems (specifically, OS X):

    $ hg st --all
    C a
    $ ls
    a
    $ hg mv a A
    A: not overwriting - file exists
    $

Compare that with the the behavior of 'mv':

    $ mv a A
    $ ls
    A
    $

Possibly related:
 - issue1663 - Very easy to introduce case folding errors on Mac OS X
 - issue1425 - Update across case-only rename of file fails on default Mac 
filesystem

Workaround:
    $ hg mv a a.temp
    $ hg mv a.temp A
Comment 1 Simon Heimberg 2009-07-22 07:55 UTC
I sent a patch to hg-devel which should fix this bug. See
http://selenic.com/pipermail/mercurial-devel/2009-July/014117.html
Comment 2 Andrei Loskutov 2009-08-16 10:51 UTC
Would this patch also fix rename behavior on Windows?

Currently it is impossible to refactor/rename Java classes on Windows if 
the refactoring changes only the file name case.
Comment 3 Matt Mackall 2012-03-26 16:23 UTC
Fixed by http://selenic.com/repo/hg/rev/6c4dbe28dda3
Matt Mackall <mpm@selenic.com>
rename: handle case-changing (issue1717)

(please test the fix)
Comment 4 David Wolever 2012-03-27 21:09 UTC
Appears to work on some simple tests.
I'll stick this version at the head of $PATH and report back if I notice any 
issues.
Comment 5 Pierre-Yves David 2012-05-11 05:56 UTC
checked on HSF+
Comment 6 Bugzilla 2012-05-12 09:00 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:00 EDT  ---

This bug was previously known as _bug_ 1717 at http://mercurial.selenic.com/bts/issue1717
Comment 7 Matt Mackall 2012-12-26 15:22 UTC
*** Bug 2963 has been marked as a duplicate of this bug. ***