[issue912] hg update fails on Windows if case of file changed in repo

Adrian Buehlmann mercurial-bugs at selenic.com
Sat Jan 5 04:26:26 CST 2008


New submission from Adrian Buehlmann <adrian at cadifra.com>:

"hg update" fails on Windows if the repo has a file that was renamed from
"a.txt" to "A.txt" on a BSD (or Linux) box. NOTE: This is not a case folding
name collision which hg is expected to reject to update to because the two files
never exist at the same time in any manifest.

Receipe to produce the bug (is reproducible):

Mercurial Distributed SCM (version 0.9.5)
....
%hg init
%echo "this is file a.txt" >a.txt
%hg add
adding a.txt
%hg ci -m 0
%hg rename a.txt A.txt
%hg ci -m 1
%hg serve

Then on a local Windows computer:

> ver
Microsoft Windows XP [Version 5.1.2600]
> hg --version
Mercurial Distributed SCM (version feac5b0bf9ba+win32extras)
...
> hg clone http://freebsd:8000 repo1
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> cd repo1
> dir/b
.hg
A.txt
> hg update -r0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> dir/b
.hg
a.txt

Now cannot update to revision 1 even though there is no case
name folding conflict:

> hg update -r1
abort: The system cannot find the file specified: C:\temp\repo1\A.txt
> dir/b
.hg

Oddly, simply repeating the update command succeeds now:

> hg update -r1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> dir/b
.hg
A.txt

----------
messages: 4817
nosy: abuehl
priority: bug
status: unread
title: hg update fails on Windows if case of file changed in repo

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue912>
____________________________________________________



More information about the Mercurial-devel mailing list