comparison tests/test-casefolding.t @ 24621:1784ca148392 stable

dirstate.walk: don't report same file stat multiple times dirstate.walk() generates pairs of filename and a stat-like object. After "hg mv foo Foo", it generates one pair for "foo" and one for "Foo", as it should. However, on case-insensitive file systems, when it tries to stat to get the disk state as well, it gets the same stat result for both names. This confuses at least scmutil._interestingfiles(), making it think that "foo" was forgotten rather than removed. That, in turn, makes "hg addremove" add "foo" back, resulting in both cases in the dirstate, as reported in issue4590. This change only takes care of the "if unknown" branch. A similar fix should perhaps be applied to the other branch.
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 04 Apr 2015 21:54:12 -0700
parents 45c95e2f99ad
children 75688a6f0bca
comparison
equal deleted inserted replaced
24580:e1842ef61edb 24621:1784ca148392
35 35
36 $ hg mv a A 36 $ hg mv a A
37 $ hg mv A a 37 $ hg mv A a
38 $ hg st 38 $ hg st
39 39
40 addremove after case-changing rename has no effect (issue4590)
41
42 $ hg mv a A
43 $ hg addremove
44 recording removal of a as rename to A (100% similar)
45 $ hg revert --all
46 forgetting A
47 undeleting a
48
40 test changing case of path components 49 test changing case of path components
41 50
42 $ mkdir D 51 $ mkdir D
43 $ echo b > D/b 52 $ echo b > D/b
44 $ hg ci -Am addb D/b 53 $ hg ci -Am addb D/b