comparison tests/test-casecollision.t @ 14068:04ce8fa1015d

add: notify when adding a file that would cause a case-folding collision On a case-sensitive file system, files can be added with names that differ only in case (a "case collision"). This would cause an error on case-insensitive filesystems. A warning or error is now given for such collisions, depending on the value of ui.portablefilenames ('warn', 'abort', or 'ignore'): $ touch file File $ hg add --config ui.portablefilenames=abort File abort: possible case-folding collision for File $ hg add File warning: possible case-folding collision for File
author Kevin Gessner <kevin@kevingessner.com>
date Sat, 30 Apr 2011 12:39:46 +0200
parents
children 524c560e2d32
comparison
equal deleted inserted replaced
14067:e88a4958a6b7 14068:04ce8fa1015d
1 run only on case-sensitive filesystems
2
3 $ "$TESTDIR/hghave" no-icasefs || exit 80
4
5 test file addition with colliding case
6
7 $ hg init repo1
8 $ cd repo1
9 $ echo a > a
10 $ echo A > A
11 $ hg add a
12 $ hg st
13 A a
14 ? A
15 $ hg add --config ui.portablefilenames=abort A
16 abort: possible case-folding collision for A
17 [255]
18 $ hg st
19 A a
20 ? A
21 $ hg add A
22 warning: possible case-folding collision for A
23 $ hg st
24 A A
25 A a
26 $ hg forget A
27 $ hg st
28 A a
29 ? A
30 $ hg add --config ui.portablefilenames=no A
31 $ hg st
32 A A
33 A a
34 $ cd ..