summaryrefslogtreecommitdiff
path: root/tests/test-casecollision.t
blob: 235c7f2deb93957d708500bf1011254aff82e77f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
run only on case-sensitive filesystems

  $ "$TESTDIR/hghave" no-icasefs || exit 80

test file addition with colliding case

  $ hg init repo1
  $ cd repo1
  $ echo a > a
  $ echo A > A
  $ hg add a
  $ hg st
  A a
  ? A
  $ hg add --config ui.portablefilenames=abort A
  abort: possible case-folding collision for A
  [255]
  $ hg st
  A a
  ? A
  $ hg add A
  warning: possible case-folding collision for A
  $ hg st
  A A
  A a
  $ hg forget A
  $ hg st
  A a
  ? A
  $ hg add --config ui.portablefilenames=no A
  $ hg st
  A A
  A a
  $ mkdir b
  $ touch b/c b/D
  $ hg add b
  adding b/D
  adding b/c
  $ touch b/d b/C
  $ hg add b/C
  warning: possible case-folding collision for b/C
  $ hg add b/d
  warning: possible case-folding collision for b/d
  $ touch b/a1 b/a2
  $ hg add b
  adding b/a1
  adding b/a2
  $ touch b/A2 b/a1.1
  $ hg add b/a1.1 b/A2
  warning: possible case-folding collision for b/A2
  $ touch b/f b/F
  $ hg add b/f b/F
  warning: possible case-folding collision for b/f
  $ touch g G
  $ hg add g G
  warning: possible case-folding collision for g
  $ mkdir h H
  $ touch h/x H/x
  $ hg add h/x H/x
  warning: possible case-folding collision for h/x
  $ touch h/s H/s
  $ hg add h/s
  $ hg add H/s
  warning: possible case-folding collision for H/s

case changing rename must not warn or abort

  $ echo c > c
  $ hg ci -qAmx
  $ hg mv c C
  $ cd ..