Show More
@@ -1,192 +1,223 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ mkdir a |
|
4 | $ mkdir a | |
5 | $ echo foo > a/a |
|
5 | $ echo foo > a/a | |
6 | $ echo bar > a/b |
|
6 | $ echo bar > a/b | |
7 | $ hg ci -Am "0" |
|
7 | $ hg ci -Am "0" | |
8 | adding a/a |
|
8 | adding a/a | |
9 | adding a/b |
|
9 | adding a/b | |
10 |
|
10 | |||
11 | $ hg co -C 0 |
|
11 | $ hg co -C 0 | |
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ hg mv a b |
|
13 | $ hg mv a b | |
14 | moving a/a to b/a (glob) |
|
14 | moving a/a to b/a (glob) | |
15 | moving a/b to b/b (glob) |
|
15 | moving a/b to b/b (glob) | |
16 | $ hg ci -m "1 mv a/ b/" |
|
16 | $ hg ci -m "1 mv a/ b/" | |
17 |
|
17 | |||
18 | $ hg co -C 0 |
|
18 | $ hg co -C 0 | |
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
20 | $ echo baz > a/c |
|
20 | $ echo baz > a/c | |
21 | $ echo quux > a/d |
|
21 | $ echo quux > a/d | |
22 | $ hg add a/c |
|
22 | $ hg add a/c | |
23 | $ hg ci -m "2 add a/c" |
|
23 | $ hg ci -m "2 add a/c" | |
24 | created new head |
|
24 | created new head | |
25 |
|
25 | |||
26 | $ hg merge --debug 1 |
|
26 | $ hg merge --debug 1 | |
27 | searching for copies back to rev 1 |
|
27 | searching for copies back to rev 1 | |
28 | unmatched files in local: |
|
28 | unmatched files in local: | |
29 | a/c |
|
29 | a/c | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | b/a |
|
31 | b/a | |
32 | b/b |
|
32 | b/b | |
33 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
33 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
34 | src: 'a/a' -> dst: 'b/a' |
|
34 | src: 'a/a' -> dst: 'b/a' | |
35 | src: 'a/b' -> dst: 'b/b' |
|
35 | src: 'a/b' -> dst: 'b/b' | |
36 | checking for directory renames |
|
36 | checking for directory renames | |
37 | discovered dir src: 'a/' -> dst: 'b/' |
|
37 | discovered dir src: 'a/' -> dst: 'b/' | |
38 | pending file src: 'a/c' -> dst: 'b/c' |
|
38 | pending file src: 'a/c' -> dst: 'b/c' | |
39 | resolving manifests |
|
39 | resolving manifests | |
40 | branchmerge: True, force: False, partial: False |
|
40 | branchmerge: True, force: False, partial: False | |
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 |
|
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 | |
42 | a/a: other deleted -> r |
|
42 | a/a: other deleted -> r | |
43 | removing a/a |
|
43 | removing a/a | |
44 | a/b: other deleted -> r |
|
44 | a/b: other deleted -> r | |
45 | removing a/b |
|
45 | removing a/b | |
46 | updating: a/b 2/5 files (40.00%) |
|
46 | updating: a/b 2/5 files (40.00%) | |
47 | b/a: remote created -> g |
|
47 | b/a: remote created -> g | |
48 | getting b/a |
|
48 | getting b/a | |
49 | b/b: remote created -> g |
|
49 | b/b: remote created -> g | |
50 | getting b/b |
|
50 | getting b/b | |
51 | updating: b/b 4/5 files (80.00%) |
|
51 | updating: b/b 4/5 files (80.00%) | |
52 | b/c: remote directory rename - move from a/c -> dm |
|
52 | b/c: remote directory rename - move from a/c -> dm | |
53 | updating: b/c 5/5 files (100.00%) |
|
53 | updating: b/c 5/5 files (100.00%) | |
54 | moving a/c to b/c (glob) |
|
54 | moving a/c to b/c (glob) | |
55 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
55 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
56 | (branch merge, don't forget to commit) |
|
56 | (branch merge, don't forget to commit) | |
57 |
|
57 | |||
58 | $ echo a/* b/* |
|
58 | $ echo a/* b/* | |
59 | a/d b/a b/b b/c |
|
59 | a/d b/a b/b b/c | |
60 | $ hg st -C |
|
60 | $ hg st -C | |
61 | M b/a |
|
61 | M b/a | |
62 | M b/b |
|
62 | M b/b | |
63 | A b/c |
|
63 | A b/c | |
64 | a/c |
|
64 | a/c | |
65 | R a/a |
|
65 | R a/a | |
66 | R a/b |
|
66 | R a/b | |
67 | R a/c |
|
67 | R a/c | |
68 | ? a/d |
|
68 | ? a/d | |
69 | $ hg ci -m "3 merge 2+1" |
|
69 | $ hg ci -m "3 merge 2+1" | |
70 | $ hg debugrename b/c |
|
70 | $ hg debugrename b/c | |
71 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
71 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
72 |
|
72 | |||
73 | $ hg co -C 1 |
|
73 | $ hg co -C 1 | |
74 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
74 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
75 | $ hg merge --debug 2 |
|
75 | $ hg merge --debug 2 | |
76 | searching for copies back to rev 1 |
|
76 | searching for copies back to rev 1 | |
77 | unmatched files in local: |
|
77 | unmatched files in local: | |
78 | b/a |
|
78 | b/a | |
79 | b/b |
|
79 | b/b | |
80 | unmatched files in other: |
|
80 | unmatched files in other: | |
81 | a/c |
|
81 | a/c | |
82 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
82 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
83 | src: 'a/a' -> dst: 'b/a' |
|
83 | src: 'a/a' -> dst: 'b/a' | |
84 | src: 'a/b' -> dst: 'b/b' |
|
84 | src: 'a/b' -> dst: 'b/b' | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | discovered dir src: 'a/' -> dst: 'b/' |
|
86 | discovered dir src: 'a/' -> dst: 'b/' | |
87 | pending file src: 'a/c' -> dst: 'b/c' |
|
87 | pending file src: 'a/c' -> dst: 'b/c' | |
88 | resolving manifests |
|
88 | resolving manifests | |
89 | branchmerge: True, force: False, partial: False |
|
89 | branchmerge: True, force: False, partial: False | |
90 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb |
|
90 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb | |
91 | b/c: local directory rename - get from a/c -> dg |
|
91 | b/c: local directory rename - get from a/c -> dg | |
92 | updating: b/c 1/1 files (100.00%) |
|
92 | updating: b/c 1/1 files (100.00%) | |
93 | getting a/c to b/c |
|
93 | getting a/c to b/c | |
94 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 | (branch merge, don't forget to commit) |
|
95 | (branch merge, don't forget to commit) | |
96 |
|
96 | |||
97 | $ echo a/* b/* |
|
97 | $ echo a/* b/* | |
98 | a/d b/a b/b b/c |
|
98 | a/d b/a b/b b/c | |
99 | $ hg st -C |
|
99 | $ hg st -C | |
100 | A b/c |
|
100 | A b/c | |
101 | a/c |
|
101 | a/c | |
102 | ? a/d |
|
102 | ? a/d | |
103 | $ hg ci -m "4 merge 1+2" |
|
103 | $ hg ci -m "4 merge 1+2" | |
104 | created new head |
|
104 | created new head | |
105 | $ hg debugrename b/c |
|
105 | $ hg debugrename b/c | |
106 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
106 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
107 |
|
107 | |||
108 | Local directory rename with conflicting file added in remote source directory |
|
108 | Local directory rename with conflicting file added in remote source directory | |
109 | and untracked in local target directory. |
|
109 | and untracked in local target directory. | |
110 |
|
110 | |||
111 | BROKEN: the uncommitted file is overwritten; we should abort |
|
111 | BROKEN: the uncommitted file is overwritten; we should abort | |
112 |
|
112 | |||
113 | $ hg co -qC 1 |
|
113 | $ hg co -qC 1 | |
114 |
$ echo |
|
114 | $ echo target > b/c | |
115 | $ hg merge 2 |
|
115 | $ hg merge 2 | |
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 | (branch merge, don't forget to commit) |
|
117 | (branch merge, don't forget to commit) | |
118 |
$ hg st - |
|
118 | $ hg st -A | |
119 | A b/c |
|
119 | A b/c | |
120 | a/c |
|
120 | a/c | |
121 | ? a/d |
|
121 | ? a/d | |
|
122 | C b/a | |||
|
123 | C b/b | |||
122 | $ cat b/c |
|
124 | $ cat b/c | |
123 | baz |
|
125 | baz | |
124 |
|
126 | |||
125 | Local directory rename with conflicting file added in remote source directory |
|
127 | Local directory rename with conflicting file added in remote source directory | |
126 | and committed in local target directory. |
|
128 | and committed in local target directory. | |
127 |
|
129 | |||
128 | BROKEN: the local file is overwritten; it should be merged |
|
130 | BROKEN: the local file is overwritten; it should be merged | |
129 |
|
131 | |||
130 | $ hg co -qC 1 |
|
132 | $ hg co -qC 1 | |
131 |
$ echo |
|
133 | $ echo target > b/c | |
132 | $ hg add b/c |
|
134 | $ hg add b/c | |
133 | $ hg commit -qm 'new file in target directory' |
|
135 | $ hg commit -qm 'new file in target directory' | |
134 | $ hg merge 2 |
|
136 | $ hg merge 2 | |
135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
137 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
136 | (branch merge, don't forget to commit) |
|
138 | (branch merge, don't forget to commit) | |
137 |
$ hg st - |
|
139 | $ hg st -A | |
138 | A b/c |
|
140 | A b/c | |
139 | a/c |
|
141 | a/c | |
140 | ? a/d |
|
142 | ? a/d | |
|
143 | C b/a | |||
|
144 | C b/b | |||
|
145 | $ cat b/c | |||
|
146 | baz | |||
|
147 | ||||
|
148 | Remote directory rename with conflicting file added in remote target directory | |||
|
149 | and committed in local source directory. | |||
|
150 | ||||
|
151 | BROKEN: the remote is ignored; it should be merged | |||
|
152 | ||||
|
153 | $ hg co -qC 2 | |||
|
154 | $ rm b/c | |||
|
155 | $ hg st -A | |||
|
156 | ? a/d | |||
|
157 | C a/a | |||
|
158 | C a/b | |||
|
159 | C a/c | |||
|
160 | $ hg merge 5 | |||
|
161 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
162 | (branch merge, don't forget to commit) | |||
|
163 | $ hg st -A | |||
|
164 | M b/a | |||
|
165 | M b/b | |||
|
166 | A b/c | |||
|
167 | a/c | |||
|
168 | R a/a | |||
|
169 | R a/b | |||
|
170 | R a/c | |||
|
171 | ? a/d | |||
141 | $ cat b/c |
|
172 | $ cat b/c | |
142 | baz |
|
173 | baz | |
143 |
|
174 | |||
144 | Second scenario with two repos: |
|
175 | Second scenario with two repos: | |
145 |
|
176 | |||
146 | $ cd .. |
|
177 | $ cd .. | |
147 | $ hg init r1 |
|
178 | $ hg init r1 | |
148 | $ cd r1 |
|
179 | $ cd r1 | |
149 | $ mkdir a |
|
180 | $ mkdir a | |
150 | $ echo foo > a/f |
|
181 | $ echo foo > a/f | |
151 | $ hg add a |
|
182 | $ hg add a | |
152 | adding a/f (glob) |
|
183 | adding a/f (glob) | |
153 | $ hg ci -m "a/f == foo" |
|
184 | $ hg ci -m "a/f == foo" | |
154 | $ cd .. |
|
185 | $ cd .. | |
155 |
|
186 | |||
156 | $ hg clone r1 r2 |
|
187 | $ hg clone r1 r2 | |
157 | updating to branch default |
|
188 | updating to branch default | |
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
189 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
159 | $ cd r2 |
|
190 | $ cd r2 | |
160 | $ hg mv a b |
|
191 | $ hg mv a b | |
161 | moving a/f to b/f (glob) |
|
192 | moving a/f to b/f (glob) | |
162 | $ echo foo1 > b/f |
|
193 | $ echo foo1 > b/f | |
163 | $ hg ci -m" a -> b, b/f == foo1" |
|
194 | $ hg ci -m" a -> b, b/f == foo1" | |
164 | $ cd .. |
|
195 | $ cd .. | |
165 |
|
196 | |||
166 | $ cd r1 |
|
197 | $ cd r1 | |
167 | $ mkdir a/aa |
|
198 | $ mkdir a/aa | |
168 | $ echo bar > a/aa/g |
|
199 | $ echo bar > a/aa/g | |
169 | $ hg add a/aa |
|
200 | $ hg add a/aa | |
170 | adding a/aa/g (glob) |
|
201 | adding a/aa/g (glob) | |
171 | $ hg ci -m "a/aa/g" |
|
202 | $ hg ci -m "a/aa/g" | |
172 | $ hg pull ../r2 |
|
203 | $ hg pull ../r2 | |
173 | pulling from ../r2 |
|
204 | pulling from ../r2 | |
174 | searching for changes |
|
205 | searching for changes | |
175 | adding changesets |
|
206 | adding changesets | |
176 | adding manifests |
|
207 | adding manifests | |
177 | adding file changes |
|
208 | adding file changes | |
178 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
209 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
179 |
(run 'hg |
|
210 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
180 |
|
211 | |||
181 | $ hg merge |
|
212 | $ hg merge | |
182 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
213 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
183 |
|
|
214 | (branch merge, don't forget to commit) | |
184 |
|
215 | |||
185 | $ hg st -C |
|
216 | $ hg st -C | |
186 | M b/f |
|
217 | M b/f | |
187 | A b/aa/g |
|
218 | A b/aa/g | |
188 | a/aa/g |
|
219 | a/aa/g | |
189 | R a/aa/g |
|
220 | R a/aa/g | |
190 | R a/f |
|
221 | R a/f | |
191 |
|
222 | |||
192 | $ cd .. |
|
223 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now