annotate tests/test-casecollision-merge.t @ 36327:58c1368ab629

py3: use dict.items() instead of dict.iteritems() in tests dict.iteritems() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2353
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Feb 2018 21:18:52 +0530
parents 8e472f3b7c63
children f4f07cc92a47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 19801
diff changeset
1 #require icasefs
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
2
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
3 ################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
4 test for branch merging
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
5 ################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
6
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
7 test for rename awareness of case-folding collision check:
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
8
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
9 (1) colliding file is one renamed from collided file:
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
10 this is also case for issue3370.
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
11
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
12 $ hg init branch_merge_renaming
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
13 $ cd branch_merge_renaming
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
14
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
15 $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
16 $ hg add a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
17 $ echo b > b
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
18 $ hg add b
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
19 $ hg commit -m '#0'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
20 $ hg tag -l A
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
21 $ hg rename a tmp
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
22 $ hg rename tmp A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
23 $ hg commit -m '#1'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
24 $ hg tag -l B
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
25 $ hg update -q 0
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
26 $ touch x
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
27 $ hg add x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
28 $ hg commit -m '#2'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
29 created new head
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
30 $ hg tag -l C
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
31
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
32 $ hg merge -q
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
33 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
34 M A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
35 R a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
36 C b
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
37 C x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
38
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
39 $ hg update -q --clean 1
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
40 $ hg merge -q
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
41 $ hg status -A
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
42 M x
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
43 C A
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
44 C b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
45 $ hg commit -m '(D)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
46 $ hg tag -l D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
47
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
48 additional test for issue3452:
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
49
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
50 | this assumes the history below.
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
51 |
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
52 | (A) -- (C) -- (E) -------
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
53 | \ \ \
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
54 | \ \ \
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
55 | (B) -- (D) -- (F) -- (G)
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
56 |
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
57 | A: add file 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
58 | B: rename from 'a' to 'A'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
59 | C: add 'x' (or operation other than modification of 'a')
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
60 | D: merge C into B
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
61 | E: modify 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
62 | F: modify 'A'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
63 | G: merge E into F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
64 |
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
65 | issue3452 occurs when (B) is recorded before (C)
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
66
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
67 $ hg update -q --clean C
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
68 $ echo "modify 'a' at (E)" > a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
69 $ echo "modify 'b' at (E)" > b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
70 $ hg commit -m '(E)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
71 created new head
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
72 $ hg tag -l E
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
73
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
74 $ hg update -q --clean D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
75 $ echo "modify 'A' at (F)" > A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
76 $ hg commit -m '(F)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
77 $ hg tag -l F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
78
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
79 $ hg merge -q --tool internal:other E
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
80 $ hg status -A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
81 M A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
82 a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
83 M b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
84 C x
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
85 $ cat A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
86 modify 'a' at (E)
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
87
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
88 test also the case that (B) is recorded after (C), to prevent
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
89 regression by changes in the future.
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
90
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
91 to avoid unexpected (successful) behavior by filelog unification,
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
92 target file is not 'a'/'A' but 'b'/'B' in this case.
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
93
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
94 $ hg update -q --clean A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
95 $ hg rename b tmp
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
96 $ hg rename tmp B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
97 $ hg commit -m '(B1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
98 created new head
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
99 $ hg tag -l B1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
100
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
101 $ hg merge -q C
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
102 $ hg status -A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
103 M x
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
104 C B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
105 C a
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
106 $ hg commit -m '(D1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
107 $ hg tag -l D1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
108
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
109 $ echo "modify 'B' at (F1)" > B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
110 $ hg commit -m '(F1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
111 $ hg tag -l F1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
112
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
113 $ hg merge -q --tool internal:other E
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
114 $ hg status -A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
115 M B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
116 b
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
117 M a
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
118 C x
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
119 $ cat B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
120 modify 'b' at (E)
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
121
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
122 $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
123
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
124 (2) colliding file is not related to collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
125
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
126 $ hg init branch_merge_collding
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
127 $ cd branch_merge_collding
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
128
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
129 $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
130 $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
131 $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
132 $ hg remove a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
133 $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
134 $ echo A > A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
135 $ hg add A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
136 $ hg commit -m '#2'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
137 $ hg update --clean 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
138 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
139 $ echo x > x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
140 $ hg add x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
141 $ hg commit -m '#3'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
142 created new head
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
143 $ echo 'modified at #4' > a
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
144 $ hg commit -m '#4'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
145
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
146 $ hg merge
33935
8e472f3b7c63 test-casecollision-merge: fix the test
Jun Wu <quark@fb.com>
parents: 26661
diff changeset
147 abort: case-folding collision between [aA] and [Aa] (re)
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
148 [255]
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
149 $ hg parents --template '{rev}\n'
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
150 4
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
151 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
152 C a
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
153 C x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
154 $ cat a
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
155 modified at #4
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
156
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
157 $ hg update --clean 2
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
158 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
159 $ hg merge
33935
8e472f3b7c63 test-casecollision-merge: fix the test
Jun Wu <quark@fb.com>
parents: 26661
diff changeset
160 abort: case-folding collision between [aA] and [Aa] (re)
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
161 [255]
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
162 $ hg parents --template '{rev}\n'
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
163 2
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
164 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
165 C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
166 $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
167 A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
168
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
169 test for deletion awareness of case-folding collision check (issue3648):
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
170 revision '#3' doesn't change 'a', so 'a' should be recognized as
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
171 safely removed in merging between #2 and #3.
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
172
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
173 $ hg update --clean 3
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
174 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
175 $ hg merge 2
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
176 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
177 (branch merge, don't forget to commit)
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
178 $ hg status -A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
179 M A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
180 R a
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
181 C x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
182
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
183 $ hg update --clean 2
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
184 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
185 $ hg merge 3
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
187 (branch merge, don't forget to commit)
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
188 $ hg status -A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
189 M x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
190 C A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
191
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
192 $ cd ..
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
193
26660
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
194 Prepare for tests of directory case-folding collisions
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
195
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
196 $ hg init directory-casing
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
197 $ cd directory-casing
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
198 $ touch 0 # test: file without directory
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
199 $ mkdir 0a
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
200 $ touch 0a/f
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
201 $ mkdir aA
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
202 $ touch aA/a
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
203 $ hg ci -Aqm0
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
204
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
205 Directory/file case-folding collision:
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
206
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
207 $ hg up -q null
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
208 $ touch 00 # test: starts as '0'
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
209 $ mkdir 000 # test: starts as '0'
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
210 $ touch 000/f
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
211 $ touch Aa # test: collision with 'aA/a'
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
212 $ hg ci -Aqm1
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
213
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
214 $ hg merge 0
26661
2b955fec91e0 merge: abort on file/directory case folding collisions (issue4892)
Mads Kiilerich <madski@unity3d.com>
parents: 26660
diff changeset
215 abort: case-folding collision between Aa and directory of aA/a
26660
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
216 [255]
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
217 (note: no collision between 0 and 00 or 000/f)
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
218
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
219 Directory case-folding collision:
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
220
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
221 $ hg up -qC null
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
222 $ hg --config extensions.purge= purge
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
223 $ mkdir 0A0
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
224 $ touch 0A0/f # test: starts as '0a'
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
225 $ mkdir Aa
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
226 $ touch Aa/b # test: collision with 'aA/a'
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
227 $ hg ci -Aqm2
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
228
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
229 $ hg merge 0
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
230 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
231 (branch merge, don't forget to commit)
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
232
7e1baad90121 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
233 $ cd ..
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
234
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
235 ################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
236 test for linear updates
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
237 ################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
238
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
239 test for rename awareness of case-folding collision check:
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
240
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
241 (1) colliding file is one renamed from collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
242
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
243 $ hg init linearupdate_renameaware_1
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
244 $ cd linearupdate_renameaware_1
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
245
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
246 $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
247 $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
248 $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
249 $ hg rename a tmp
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
250 $ hg rename tmp A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
251 $ hg commit -m '#1'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
252
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
253 $ hg update 0
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
254 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
255
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
256 $ echo 'this is added line' >> a
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
257 $ hg update 1
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
258 merging a and A to A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
259 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
260 $ hg status -A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
261 M A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
262 $ cat A
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
263 a
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
264 this is added line
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
265
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
266 $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
267
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
268 (2) colliding file is not related to collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
269
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
270 $ hg init linearupdate_renameaware_2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
271 $ cd linearupdate_renameaware_2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
272
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
273 $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
274 $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
275 $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
276 $ hg remove a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
277 $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
278 $ echo A > A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
279 $ hg add A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
280 $ hg commit -m '#2'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
281
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
282 $ hg update 0
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
283 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
284 $ hg parents --template '{rev}\n'
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
285 0
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
286 $ hg status -A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
287 C a
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
288 $ cat A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
289 a
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
290 $ hg up -qC 2
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
291
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
292 $ hg update --check 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
293 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
294 $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
295 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
296 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
297 C a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
298 $ cat a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
299 a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
300
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
301 $ hg update --clean 2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
302 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
303 $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
304 2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
305 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
306 C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
307 $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
308 A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
309
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
310 $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
311
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
312 (3) colliding file is not related to collided file: added in working dir
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
313
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
314 $ hg init linearupdate_renameaware_3
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
315 $ cd linearupdate_renameaware_3
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
316
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
317 $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
318 $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
319 $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
320 $ hg rename a b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
321 $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
322 $ hg update 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
323 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
324
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
325 $ echo B > B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
326 $ hg add B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
327 $ hg status
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
328 A B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
329 $ hg update
33935
8e472f3b7c63 test-casecollision-merge: fix the test
Jun Wu <quark@fb.com>
parents: 26661
diff changeset
330 abort: case-folding collision between [bB] and [Bb] (re)
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
331 [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
332
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
333 $ hg update --check
19801
41abe2e3e3b7 update: standardize error message for dirty update --check
Siddharth Agarwal <sid0@fb.com>
parents: 19106
diff changeset
334 abort: uncommitted changes
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
335 [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
336
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
337 $ hg update --clean
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
338 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
339 $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
340 1
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
341 $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
342 C b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
343 $ cat b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
344 a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
345
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
346 $ cd ..