Bug 3403 - Directory components not normalized on rename
Summary: Directory components not normalized on rename
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:
Depends on:
Blocks:
 
Reported: 2012-04-25 19:46 UTC by Aaron Jensen
Modified: 2012-07-26 10:01 UTC (History)
5 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 Aaron Jensen 2012-04-25 19:46 UTC
Mercurial 2.1.2 on Windows 7 x64.

Mercurial doesn't normalize the case of directory components on a rename:

> hg init casetest
> cd casetest
> mkdir DIR
> echo '' > .\DIR\a.txt
> hg add .\DIR\a.txt
> hg commit -m "Adding a.txt."
> mv DIR dir.casechange
> mv .\dir.casechange .\dir
> echo '' > b.txt
> hg add .\dir\b.txt
adding DIR\b.txt
> hg st
A DIR\b.txt
> hg commit -m "adding b.txt."
> hg rename .\dir\a.txt .\dir\c.txt
moving DIR\a.txt to dir\c.txt
> hg st
A dir\c.txt
R DIR\a.txt

I would expect that renaming a.txt to c.txt would preserve the case of the DIR directory component 
just like adding b.txt preserved the case of the DIR component, regardless of what the file system 
says.
Comment 1 Patrick Mézard 2012-04-26 02:08 UTC
Probably related to issue2966
Comment 2 Matt Mackall 2012-04-26 17:15 UTC
Hmm, confirmed on Linux + VFAT.
Comment 3 Patrick Mézard 2012-04-28 12:44 UTC
Patch submitted here:

  http://selenic.com/pipermail/mercurial-devel/2012-April/039576.html

Thanks you for the report!
Comment 4 HG Bot 2012-04-28 16:00 UTC
Fixed by http://selenic.com/repo/hg/rev/e596a631210e
Patrick Mezard <patrick@mezard.eu>
dirstate: preserve path components case on renames (issue3402)

(please test the fix)
Comment 5 Bugzilla 2012-05-12 09:30 UTC

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

This bug was previously known as _bug_ 3402 at http://mercurial.selenic.com/bts/issue3402

Bug Status was UNCONFIRMED but everconfirmed was true
   Setting status to CONFIRMED