##// END OF EJS Templates
tests: test renaming a file added on two branches (issue2089)...
Wagner Bruna -
r13492:ca940d06 stable
parent child Browse files
Show More
@@ -1,127 +1,157 b''
1 $ hg init
1 $ hg init
2
2
3 $ echo "[merge]" >> .hg/hgrc
3 $ echo "[merge]" >> .hg/hgrc
4 $ echo "followcopies = 1" >> .hg/hgrc
4 $ echo "followcopies = 1" >> .hg/hgrc
5
5
6 $ echo foo > a
6 $ echo foo > a
7 $ echo foo > a2
7 $ echo foo > a2
8 $ hg add a a2
8 $ hg add a a2
9 $ hg ci -m "start"
9 $ hg ci -m "start"
10
10
11 $ hg mv a b
11 $ hg mv a b
12 $ hg mv a2 b2
12 $ hg mv a2 b2
13 $ hg ci -m "rename"
13 $ hg ci -m "rename"
14
14
15 $ hg co 0
15 $ hg co 0
16 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
16 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
17
17
18 $ echo blahblah > a
18 $ echo blahblah > a
19 $ echo blahblah > a2
19 $ echo blahblah > a2
20 $ hg mv a2 c2
20 $ hg mv a2 c2
21 $ hg ci -m "modify"
21 $ hg ci -m "modify"
22 created new head
22 created new head
23
23
24 $ hg merge -y --debug
24 $ hg merge -y --debug
25 searching for copies back to rev 1
25 searching for copies back to rev 1
26 unmatched files in local:
26 unmatched files in local:
27 c2
27 c2
28 unmatched files in other:
28 unmatched files in other:
29 b
29 b
30 b2
30 b2
31 all copies found (* = to merge, ! = divergent):
31 all copies found (* = to merge, ! = divergent):
32 c2 -> a2 !
32 c2 -> a2 !
33 b -> a *
33 b -> a *
34 b2 -> a2 !
34 b2 -> a2 !
35 checking for directory renames
35 checking for directory renames
36 a2: divergent renames -> dr
36 a2: divergent renames -> dr
37 resolving manifests
37 resolving manifests
38 overwrite None partial False
38 overwrite None partial False
39 ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
39 ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
40 a: remote moved to b -> m
40 a: remote moved to b -> m
41 b2: remote created -> g
41 b2: remote created -> g
42 preserving a for resolve of b
42 preserving a for resolve of b
43 removing a
43 removing a
44 updating: a 1/3 files (33.33%)
44 updating: a 1/3 files (33.33%)
45 picked tool 'internal:merge' for b (binary False symlink False)
45 picked tool 'internal:merge' for b (binary False symlink False)
46 merging a and b to b
46 merging a and b to b
47 my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
47 my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
48 premerge successful
48 premerge successful
49 updating: a2 2/3 files (66.67%)
49 updating: a2 2/3 files (66.67%)
50 note: possible conflict - a2 was renamed multiple times to:
50 note: possible conflict - a2 was renamed multiple times to:
51 c2
51 c2
52 b2
52 b2
53 updating: b2 3/3 files (100.00%)
53 updating: b2 3/3 files (100.00%)
54 getting b2
54 getting b2
55 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
55 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
56 (branch merge, don't forget to commit)
56 (branch merge, don't forget to commit)
57
57
58 $ hg status -AC
58 $ hg status -AC
59 M b
59 M b
60 a
60 a
61 M b2
61 M b2
62 R a
62 R a
63 C c2
63 C c2
64
64
65 $ cat b
65 $ cat b
66 blahblah
66 blahblah
67
67
68 $ hg ci -m "merge"
68 $ hg ci -m "merge"
69
69
70 $ hg debugindex .hg/store/data/b.i
70 $ hg debugindex .hg/store/data/b.i
71 rev offset length base linkrev nodeid p1 p2
71 rev offset length base linkrev nodeid p1 p2
72 0 0 67 0 1 57eacc201a7f 000000000000 000000000000
72 0 0 67 0 1 57eacc201a7f 000000000000 000000000000
73 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f
73 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f
74
74
75 $ hg debugrename b
75 $ hg debugrename b
76 b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
76 b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
77
77
78 This used to trigger a "divergent renames" warning, despite no renames
78 This used to trigger a "divergent renames" warning, despite no renames
79
79
80 $ hg cp b b3
80 $ hg cp b b3
81 $ hg cp b b4
81 $ hg cp b b4
82 $ hg ci -A -m 'copy b twice'
82 $ hg ci -A -m 'copy b twice'
83 $ hg up eb92d88a9712
83 $ hg up eb92d88a9712
84 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
84 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
85 $ hg up
85 $ hg up
86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 $ hg rm b3 b4
87 $ hg rm b3 b4
88 $ hg ci -m 'clean up a bit of our mess'
88 $ hg ci -m 'clean up a bit of our mess'
89
89
90 We'd rather not warn on divergent renames done in the same changeset (issue2113)
90 We'd rather not warn on divergent renames done in the same changeset (issue2113)
91
91
92 $ hg cp b b3
92 $ hg cp b b3
93 $ hg mv b b4
93 $ hg mv b b4
94 $ hg ci -A -m 'divergent renames in same changeset'
94 $ hg ci -A -m 'divergent renames in same changeset'
95 $ hg up c761c6948de0
95 $ hg up c761c6948de0
96 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
96 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
97 $ hg up
97 $ hg up
98 note: possible conflict - b was renamed multiple times to:
98 note: possible conflict - b was renamed multiple times to:
99 b3
99 b3
100 b4
100 b4
101 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
101 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
102
102
103 Check for issue2642
103 Check for issue2642
104
104
105 $ hg init t
105 $ hg init t
106 $ cd t
106 $ cd t
107
107
108 $ echo c0 > f1
108 $ echo c0 > f1
109 $ hg ci -Aqm0
109 $ hg ci -Aqm0
110
110
111 $ hg up null -q
111 $ hg up null -q
112 $ echo c1 > f1 # backport
112 $ echo c1 > f1 # backport
113 $ hg ci -Aqm1
113 $ hg ci -Aqm1
114 $ hg mv f1 f2
114 $ hg mv f1 f2
115 $ hg ci -qm2
115 $ hg ci -qm2
116
116
117 $ hg up 0 -q
117 $ hg up 0 -q
118 $ hg merge 1 -q --tool internal:local
118 $ hg merge 1 -q --tool internal:local
119 $ hg ci -qm3
119 $ hg ci -qm3
120
120
121 $ hg merge 2
121 $ hg merge 2
122 merging f1 and f2 to f2
122 merging f1 and f2 to f2
123 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
123 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
124 (branch merge, don't forget to commit)
124 (branch merge, don't forget to commit)
125
125
126 $ cat f2
126 $ cat f2
127 c0
127 c0
128
129 Check for issue2089
130
131 $ hg init repo2089
132 $ cd repo2089
133
134 $ echo 0 > A
135 $ hg -q ci -Am 0
136
137 $ hg -q up -C null
138 $ echo 1 > A
139 $ hg -q ci -Am 1
140
141 $ hg -q up -C 0
142 $ hg merge 1 -q --tool internal:local
143 $ echo 2 > A
144 $ hg -q ci -m 2
145
146 $ hg -q up -C 1
147 $ hg mv A a
148 $ hg -q ci -Am 3
149
150 $ hg -q up -C 2
151 $ hg merge 3
152 merging A and a to a
153 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
154 (branch merge, don't forget to commit)
155
156 $ cat a
157 2
General Comments 0
You need to be logged in to leave comments. Login now