[issue2861] hg revert weirdness after changing a filename's case

Stephen Rank bugs at mercurial.selenic.com
Mon Jun 20 17:49:48 CDT 2011


New submission from Stephen Rank <smrank at zepler.org>:

I'm using Windows 7 (x64) and Mercurial 1.8.4 (Inno Setup x64).

After changing a file's case and using hg rename -A to record that change,
hg reverting past that revision causes strange behaviour.

Steps To Reproduce:

Create blank folder and open cmd there, then do:

hg init
echo test > test.txt
hg add
hg commit -m"Add file."
rename test.txt TEST.TXT
hg rename -A test.txt TEST.TXT
hg commit -m"Rename file."
hg revert -r0 --all
hg revert --all
hg status

The results are "R TEST.TXT ? test.txt.orig", now do:

hg revert --all
hg status

The results are "? test.txt.orig".

Given my limited understanding of hg revert, I think both statuses should be
the same as the second set. If you try the above steps but rename the file
by more than just case then both statuses are the same.

I first noticed this problem earlier today, except the unexpected line in hg
status was an A not an R, once a second revert was performed the A
disappeared. Unfortunately I don't know how to reproduce that.

----------
messages: 16569
nosy: smrank
priority: bug
status: unread
title: hg revert weirdness after changing a filename's case

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


More information about the Mercurial-devel mailing list