Show More
@@ -1,389 +1,396 b'' | |||||
1 | #testcases filelog compatibility changeset |
|
1 | #testcases filelog compatibility changeset sidedata | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > rebase= |
|
5 | > rebase= | |
6 | > [alias] |
|
6 | > [alias] | |
7 | > l = log -G -T '{rev} {desc}\n{files}\n' |
|
7 | > l = log -G -T '{rev} {desc}\n{files}\n' | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | #if compatibility |
|
10 | #if compatibility | |
11 | $ cat >> $HGRCPATH << EOF |
|
11 | $ cat >> $HGRCPATH << EOF | |
12 | > [experimental] |
|
12 | > [experimental] | |
13 | > copies.read-from = compatibility |
|
13 | > copies.read-from = compatibility | |
14 | > EOF |
|
14 | > EOF | |
15 | #endif |
|
15 | #endif | |
16 |
|
16 | |||
17 | #if changeset |
|
17 | #if changeset | |
18 | $ cat >> $HGRCPATH << EOF |
|
18 | $ cat >> $HGRCPATH << EOF | |
19 | > [experimental] |
|
19 | > [experimental] | |
20 | > copies.read-from = changeset-only |
|
20 | > copies.read-from = changeset-only | |
21 | > copies.write-to = changeset-only |
|
21 | > copies.write-to = changeset-only | |
22 | > EOF |
|
22 | > EOF | |
23 | #endif |
|
23 | #endif | |
24 |
|
24 | |||
|
25 | #if sidedata | |||
|
26 | $ cat >> $HGRCPATH << EOF | |||
|
27 | > [format] | |||
|
28 | > exp-use-copies-side-data-changeset = yes | |||
|
29 | > EOF | |||
|
30 | #endif | |||
|
31 | ||||
25 | $ REPONUM=0 |
|
32 | $ REPONUM=0 | |
26 | $ newrepo() { |
|
33 | $ newrepo() { | |
27 | > cd $TESTTMP |
|
34 | > cd $TESTTMP | |
28 | > REPONUM=`expr $REPONUM + 1` |
|
35 | > REPONUM=`expr $REPONUM + 1` | |
29 | > hg init repo-$REPONUM |
|
36 | > hg init repo-$REPONUM | |
30 | > cd repo-$REPONUM |
|
37 | > cd repo-$REPONUM | |
31 | > } |
|
38 | > } | |
32 |
|
39 | |||
33 | Copy a file, then delete destination, then copy again. This does not create a new filelog entry. |
|
40 | Copy a file, then delete destination, then copy again. This does not create a new filelog entry. | |
34 | $ newrepo |
|
41 | $ newrepo | |
35 | $ echo x > x |
|
42 | $ echo x > x | |
36 | $ hg ci -Aqm 'add x' |
|
43 | $ hg ci -Aqm 'add x' | |
37 | $ echo x2 > x |
|
44 | $ echo x2 > x | |
38 | $ hg ci -m 'modify x' |
|
45 | $ hg ci -m 'modify x' | |
39 | $ hg co -q 0 |
|
46 | $ hg co -q 0 | |
40 | $ hg cp x y |
|
47 | $ hg cp x y | |
41 | $ hg ci -qm 'copy x to y' |
|
48 | $ hg ci -qm 'copy x to y' | |
42 | $ hg rm y |
|
49 | $ hg rm y | |
43 | $ hg ci -m 'remove y' |
|
50 | $ hg ci -m 'remove y' | |
44 | $ hg cp -f x y |
|
51 | $ hg cp -f x y | |
45 | $ hg ci -m 'copy x onto y (again)' |
|
52 | $ hg ci -m 'copy x onto y (again)' | |
46 | $ hg l |
|
53 | $ hg l | |
47 | @ 4 copy x onto y (again) |
|
54 | @ 4 copy x onto y (again) | |
48 | | y |
|
55 | | y | |
49 | o 3 remove y |
|
56 | o 3 remove y | |
50 | | y |
|
57 | | y | |
51 | o 2 copy x to y |
|
58 | o 2 copy x to y | |
52 | | y |
|
59 | | y | |
53 | | o 1 modify x |
|
60 | | o 1 modify x | |
54 | |/ x |
|
61 | |/ x | |
55 | o 0 add x |
|
62 | o 0 add x | |
56 | x |
|
63 | x | |
57 | $ hg debugp1copies -r 4 |
|
64 | $ hg debugp1copies -r 4 | |
58 | x -> y |
|
65 | x -> y | |
59 | $ hg debugpathcopies 0 4 |
|
66 | $ hg debugpathcopies 0 4 | |
60 | x -> y |
|
67 | x -> y | |
61 | $ hg graft -r 1 |
|
68 | $ hg graft -r 1 | |
62 | grafting 1:* "modify x" (glob) |
|
69 | grafting 1:* "modify x" (glob) | |
63 | merging y and x to y |
|
70 | merging y and x to y | |
64 | $ hg co -qC 1 |
|
71 | $ hg co -qC 1 | |
65 | $ hg graft -r 4 |
|
72 | $ hg graft -r 4 | |
66 | grafting 4:* "copy x onto y (again)" (glob) |
|
73 | grafting 4:* "copy x onto y (again)" (glob) | |
67 | merging x and y to y |
|
74 | merging x and y to y | |
68 |
|
75 | |||
69 | Copy x to y, then remove y, then add back y. With copy metadata in the |
|
76 | Copy x to y, then remove y, then add back y. With copy metadata in the | |
70 | changeset, this could easily end up reporting y as copied from x (if we don't |
|
77 | changeset, this could easily end up reporting y as copied from x (if we don't | |
71 | unmark it as a copy when it's removed). Despite x and y not being related, we |
|
78 | unmark it as a copy when it's removed). Despite x and y not being related, we | |
72 | want grafts to propagate across the rename. |
|
79 | want grafts to propagate across the rename. | |
73 | $ newrepo |
|
80 | $ newrepo | |
74 | $ echo x > x |
|
81 | $ echo x > x | |
75 | $ hg ci -Aqm 'add x' |
|
82 | $ hg ci -Aqm 'add x' | |
76 | $ echo x2 > x |
|
83 | $ echo x2 > x | |
77 | $ hg ci -m 'modify x' |
|
84 | $ hg ci -m 'modify x' | |
78 | $ hg co -q 0 |
|
85 | $ hg co -q 0 | |
79 | $ hg mv x y |
|
86 | $ hg mv x y | |
80 | $ hg ci -qm 'rename x to y' |
|
87 | $ hg ci -qm 'rename x to y' | |
81 | $ hg rm y |
|
88 | $ hg rm y | |
82 | $ hg ci -qm 'remove y' |
|
89 | $ hg ci -qm 'remove y' | |
83 | $ echo x > y |
|
90 | $ echo x > y | |
84 | $ hg ci -Aqm 'add back y' |
|
91 | $ hg ci -Aqm 'add back y' | |
85 | $ hg l |
|
92 | $ hg l | |
86 | @ 4 add back y |
|
93 | @ 4 add back y | |
87 | | y |
|
94 | | y | |
88 | o 3 remove y |
|
95 | o 3 remove y | |
89 | | y |
|
96 | | y | |
90 | o 2 rename x to y |
|
97 | o 2 rename x to y | |
91 | | x y |
|
98 | | x y | |
92 | | o 1 modify x |
|
99 | | o 1 modify x | |
93 | |/ x |
|
100 | |/ x | |
94 | o 0 add x |
|
101 | o 0 add x | |
95 | x |
|
102 | x | |
96 | $ hg debugpathcopies 0 4 |
|
103 | $ hg debugpathcopies 0 4 | |
97 | BROKEN: This should succeed and merge the changes from x into y |
|
104 | BROKEN: This should succeed and merge the changes from x into y | |
98 | $ hg graft -r 1 |
|
105 | $ hg graft -r 1 | |
99 | grafting 1:* "modify x" (glob) |
|
106 | grafting 1:* "modify x" (glob) | |
100 | file 'x' was deleted in local [local] but was modified in other [graft]. |
|
107 | file 'x' was deleted in local [local] but was modified in other [graft]. | |
101 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
108 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
102 | What do you want to do? u |
|
109 | What do you want to do? u | |
103 | abort: unresolved conflicts, can't continue |
|
110 | abort: unresolved conflicts, can't continue | |
104 | (use 'hg resolve' and 'hg graft --continue') |
|
111 | (use 'hg resolve' and 'hg graft --continue') | |
105 | [255] |
|
112 | [255] | |
106 |
|
113 | |||
107 | Add x, remove it, then add it back, then rename x to y. Similar to the case |
|
114 | Add x, remove it, then add it back, then rename x to y. Similar to the case | |
108 | above, but here the break in history is before the rename. |
|
115 | above, but here the break in history is before the rename. | |
109 | $ newrepo |
|
116 | $ newrepo | |
110 | $ echo x > x |
|
117 | $ echo x > x | |
111 | $ hg ci -Aqm 'add x' |
|
118 | $ hg ci -Aqm 'add x' | |
112 | $ echo x2 > x |
|
119 | $ echo x2 > x | |
113 | $ hg ci -m 'modify x' |
|
120 | $ hg ci -m 'modify x' | |
114 | $ hg co -q 0 |
|
121 | $ hg co -q 0 | |
115 | $ hg rm x |
|
122 | $ hg rm x | |
116 | $ hg ci -qm 'remove x' |
|
123 | $ hg ci -qm 'remove x' | |
117 | $ echo x > x |
|
124 | $ echo x > x | |
118 | $ hg ci -Aqm 'add x again' |
|
125 | $ hg ci -Aqm 'add x again' | |
119 | $ hg mv x y |
|
126 | $ hg mv x y | |
120 | $ hg ci -m 'rename x to y' |
|
127 | $ hg ci -m 'rename x to y' | |
121 | $ hg l |
|
128 | $ hg l | |
122 | @ 4 rename x to y |
|
129 | @ 4 rename x to y | |
123 | | x y |
|
130 | | x y | |
124 | o 3 add x again |
|
131 | o 3 add x again | |
125 | | x |
|
132 | | x | |
126 | o 2 remove x |
|
133 | o 2 remove x | |
127 | | x |
|
134 | | x | |
128 | | o 1 modify x |
|
135 | | o 1 modify x | |
129 | |/ x |
|
136 | |/ x | |
130 | o 0 add x |
|
137 | o 0 add x | |
131 | x |
|
138 | x | |
132 | $ hg debugpathcopies 0 4 |
|
139 | $ hg debugpathcopies 0 4 | |
133 | x -> y |
|
140 | x -> y | |
134 | $ hg graft -r 1 |
|
141 | $ hg graft -r 1 | |
135 | grafting 1:* "modify x" (glob) |
|
142 | grafting 1:* "modify x" (glob) | |
136 | merging y and x to y |
|
143 | merging y and x to y | |
137 | $ hg co -qC 1 |
|
144 | $ hg co -qC 1 | |
138 | $ hg graft -r 4 |
|
145 | $ hg graft -r 4 | |
139 | grafting 4:* "rename x to y" (glob) |
|
146 | grafting 4:* "rename x to y" (glob) | |
140 | merging x and y to y |
|
147 | merging x and y to y | |
141 |
|
148 | |||
142 | Add x, modify it, remove it, then add it back, then rename x to y. Similar to |
|
149 | Add x, modify it, remove it, then add it back, then rename x to y. Similar to | |
143 | the case above, but here the re-added file's nodeid is different from before |
|
150 | the case above, but here the re-added file's nodeid is different from before | |
144 | the break. |
|
151 | the break. | |
145 |
|
152 | |||
146 | $ newrepo |
|
153 | $ newrepo | |
147 | $ echo x > x |
|
154 | $ echo x > x | |
148 | $ hg ci -Aqm 'add x' |
|
155 | $ hg ci -Aqm 'add x' | |
149 | $ echo x2 > x |
|
156 | $ echo x2 > x | |
150 | $ hg ci -m 'modify x' |
|
157 | $ hg ci -m 'modify x' | |
151 | $ echo x3 > x |
|
158 | $ echo x3 > x | |
152 | $ hg ci -qm 'modify x again' |
|
159 | $ hg ci -qm 'modify x again' | |
153 | $ hg co -q 1 |
|
160 | $ hg co -q 1 | |
154 | $ hg rm x |
|
161 | $ hg rm x | |
155 | $ hg ci -qm 'remove x' |
|
162 | $ hg ci -qm 'remove x' | |
156 | # Same content to avoid conflicts |
|
163 | # Same content to avoid conflicts | |
157 | $ hg revert -r 1 x |
|
164 | $ hg revert -r 1 x | |
158 | $ hg ci -Aqm 'add x again' |
|
165 | $ hg ci -Aqm 'add x again' | |
159 | $ hg mv x y |
|
166 | $ hg mv x y | |
160 | $ hg ci -m 'rename x to y' |
|
167 | $ hg ci -m 'rename x to y' | |
161 | $ hg l |
|
168 | $ hg l | |
162 | @ 5 rename x to y |
|
169 | @ 5 rename x to y | |
163 | | x y |
|
170 | | x y | |
164 | o 4 add x again |
|
171 | o 4 add x again | |
165 | | x |
|
172 | | x | |
166 | o 3 remove x |
|
173 | o 3 remove x | |
167 | | x |
|
174 | | x | |
168 | | o 2 modify x again |
|
175 | | o 2 modify x again | |
169 | |/ x |
|
176 | |/ x | |
170 | o 1 modify x |
|
177 | o 1 modify x | |
171 | | x |
|
178 | | x | |
172 | o 0 add x |
|
179 | o 0 add x | |
173 | x |
|
180 | x | |
174 | $ hg debugpathcopies 0 5 |
|
181 | $ hg debugpathcopies 0 5 | |
175 | x -> y (no-filelog !) |
|
182 | x -> y (no-filelog no-sidedata !) | |
176 | #if no-filelog |
|
183 | #if no-filelog no-sidedata | |
177 | $ hg graft -r 2 |
|
184 | $ hg graft -r 2 | |
178 | grafting 2:* "modify x again" (glob) |
|
185 | grafting 2:* "modify x again" (glob) | |
179 | merging y and x to y |
|
186 | merging y and x to y | |
180 | #else |
|
187 | #else | |
181 | BROKEN: This should succeed and merge the changes from x into y |
|
188 | BROKEN: This should succeed and merge the changes from x into y | |
182 | $ hg graft -r 2 |
|
189 | $ hg graft -r 2 | |
183 | grafting 2:* "modify x again" (glob) |
|
190 | grafting 2:* "modify x again" (glob) | |
184 | file 'x' was deleted in local [local] but was modified in other [graft]. |
|
191 | file 'x' was deleted in local [local] but was modified in other [graft]. | |
185 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
192 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
186 | What do you want to do? u |
|
193 | What do you want to do? u | |
187 | abort: unresolved conflicts, can't continue |
|
194 | abort: unresolved conflicts, can't continue | |
188 | (use 'hg resolve' and 'hg graft --continue') |
|
195 | (use 'hg resolve' and 'hg graft --continue') | |
189 | [255] |
|
196 | [255] | |
190 | #endif |
|
197 | #endif | |
191 | $ hg co -qC 2 |
|
198 | $ hg co -qC 2 | |
192 | BROKEN: This should succeed and merge the changes from x into y |
|
199 | BROKEN: This should succeed and merge the changes from x into y | |
193 | $ hg graft -r 5 |
|
200 | $ hg graft -r 5 | |
194 | grafting 5:* "rename x to y"* (glob) |
|
201 | grafting 5:* "rename x to y"* (glob) | |
195 | file 'x' was deleted in other [graft] but was modified in local [local]. |
|
202 | file 'x' was deleted in other [graft] but was modified in local [local]. | |
196 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
203 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
197 | What do you want to do? u |
|
204 | What do you want to do? u | |
198 | abort: unresolved conflicts, can't continue |
|
205 | abort: unresolved conflicts, can't continue | |
199 | (use 'hg resolve' and 'hg graft --continue') |
|
206 | (use 'hg resolve' and 'hg graft --continue') | |
200 | [255] |
|
207 | [255] | |
201 |
|
208 | |||
202 | Add x, remove it, then add it back, rename x to y from the first commit. |
|
209 | Add x, remove it, then add it back, rename x to y from the first commit. | |
203 | Similar to the case above, but here the break in history is parallel to the |
|
210 | Similar to the case above, but here the break in history is parallel to the | |
204 | rename. |
|
211 | rename. | |
205 | $ newrepo |
|
212 | $ newrepo | |
206 | $ echo x > x |
|
213 | $ echo x > x | |
207 | $ hg ci -Aqm 'add x' |
|
214 | $ hg ci -Aqm 'add x' | |
208 | $ hg rm x |
|
215 | $ hg rm x | |
209 | $ hg ci -qm 'remove x' |
|
216 | $ hg ci -qm 'remove x' | |
210 | $ echo x > x |
|
217 | $ echo x > x | |
211 | $ hg ci -Aqm 'add x again' |
|
218 | $ hg ci -Aqm 'add x again' | |
212 | $ echo x2 > x |
|
219 | $ echo x2 > x | |
213 | $ hg ci -m 'modify x' |
|
220 | $ hg ci -m 'modify x' | |
214 | $ hg co -q 0 |
|
221 | $ hg co -q 0 | |
215 | $ hg mv x y |
|
222 | $ hg mv x y | |
216 | $ hg ci -qm 'rename x to y' |
|
223 | $ hg ci -qm 'rename x to y' | |
217 | $ hg l |
|
224 | $ hg l | |
218 | @ 4 rename x to y |
|
225 | @ 4 rename x to y | |
219 | | x y |
|
226 | | x y | |
220 | | o 3 modify x |
|
227 | | o 3 modify x | |
221 | | | x |
|
228 | | | x | |
222 | | o 2 add x again |
|
229 | | o 2 add x again | |
223 | | | x |
|
230 | | | x | |
224 | | o 1 remove x |
|
231 | | o 1 remove x | |
225 | |/ x |
|
232 | |/ x | |
226 | o 0 add x |
|
233 | o 0 add x | |
227 | x |
|
234 | x | |
228 | $ hg debugpathcopies 2 4 |
|
235 | $ hg debugpathcopies 2 4 | |
229 | x -> y |
|
236 | x -> y | |
230 | $ hg graft -r 3 |
|
237 | $ hg graft -r 3 | |
231 | grafting 3:* "modify x" (glob) |
|
238 | grafting 3:* "modify x" (glob) | |
232 | merging y and x to y |
|
239 | merging y and x to y | |
233 | $ hg co -qC 3 |
|
240 | $ hg co -qC 3 | |
234 | $ hg graft -r 4 |
|
241 | $ hg graft -r 4 | |
235 | grafting 4:* "rename x to y" (glob) |
|
242 | grafting 4:* "rename x to y" (glob) | |
236 | merging x and y to y |
|
243 | merging x and y to y | |
237 |
|
244 | |||
238 | Add x, remove it, then add it back, rename x to y from the first commit. |
|
245 | Add x, remove it, then add it back, rename x to y from the first commit. | |
239 | Similar to the case above, but here the re-added file's nodeid is different |
|
246 | Similar to the case above, but here the re-added file's nodeid is different | |
240 | from the base. |
|
247 | from the base. | |
241 | $ newrepo |
|
248 | $ newrepo | |
242 | $ echo x > x |
|
249 | $ echo x > x | |
243 | $ hg ci -Aqm 'add x' |
|
250 | $ hg ci -Aqm 'add x' | |
244 | $ hg rm x |
|
251 | $ hg rm x | |
245 | $ hg ci -qm 'remove x' |
|
252 | $ hg ci -qm 'remove x' | |
246 | $ echo x2 > x |
|
253 | $ echo x2 > x | |
247 | $ hg ci -Aqm 'add x again with different content' |
|
254 | $ hg ci -Aqm 'add x again with different content' | |
248 | $ hg co -q 0 |
|
255 | $ hg co -q 0 | |
249 | $ hg mv x y |
|
256 | $ hg mv x y | |
250 | $ hg ci -qm 'rename x to y' |
|
257 | $ hg ci -qm 'rename x to y' | |
251 | $ hg l |
|
258 | $ hg l | |
252 | @ 3 rename x to y |
|
259 | @ 3 rename x to y | |
253 | | x y |
|
260 | | x y | |
254 | | o 2 add x again with different content |
|
261 | | o 2 add x again with different content | |
255 | | | x |
|
262 | | | x | |
256 | | o 1 remove x |
|
263 | | o 1 remove x | |
257 | |/ x |
|
264 | |/ x | |
258 | o 0 add x |
|
265 | o 0 add x | |
259 | x |
|
266 | x | |
260 | $ hg debugpathcopies 2 3 |
|
267 | $ hg debugpathcopies 2 3 | |
261 | x -> y |
|
268 | x -> y | |
262 | BROKEN: This should merge the changes from x into y |
|
269 | BROKEN: This should merge the changes from x into y | |
263 | $ hg graft -r 2 |
|
270 | $ hg graft -r 2 | |
264 | grafting 2:* "add x again with different content" (glob) |
|
271 | grafting 2:* "add x again with different content" (glob) | |
265 | $ hg co -qC 2 |
|
272 | $ hg co -qC 2 | |
266 | BROKEN: This should succeed and merge the changes from x into y |
|
273 | BROKEN: This should succeed and merge the changes from x into y | |
267 | $ hg graft -r 3 |
|
274 | $ hg graft -r 3 | |
268 | grafting 3:* "rename x to y" (glob) |
|
275 | grafting 3:* "rename x to y" (glob) | |
269 | file 'x' was deleted in other [graft] but was modified in local [local]. |
|
276 | file 'x' was deleted in other [graft] but was modified in local [local]. | |
270 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
277 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
271 | What do you want to do? u |
|
278 | What do you want to do? u | |
272 | abort: unresolved conflicts, can't continue |
|
279 | abort: unresolved conflicts, can't continue | |
273 | (use 'hg resolve' and 'hg graft --continue') |
|
280 | (use 'hg resolve' and 'hg graft --continue') | |
274 | [255] |
|
281 | [255] | |
275 |
|
282 | |||
276 | Add x on two branches, then rename x to y on one side. Similar to the case |
|
283 | Add x on two branches, then rename x to y on one side. Similar to the case | |
277 | above, but here the break in history is via the base commit. |
|
284 | above, but here the break in history is via the base commit. | |
278 | $ newrepo |
|
285 | $ newrepo | |
279 | $ echo a > a |
|
286 | $ echo a > a | |
280 | $ hg ci -Aqm 'base' |
|
287 | $ hg ci -Aqm 'base' | |
281 | $ echo x > x |
|
288 | $ echo x > x | |
282 | $ hg ci -Aqm 'add x' |
|
289 | $ hg ci -Aqm 'add x' | |
283 | $ echo x2 > x |
|
290 | $ echo x2 > x | |
284 | $ hg ci -m 'modify x' |
|
291 | $ hg ci -m 'modify x' | |
285 | $ hg co -q 0 |
|
292 | $ hg co -q 0 | |
286 | $ echo x > x |
|
293 | $ echo x > x | |
287 | $ hg ci -Aqm 'add x again' |
|
294 | $ hg ci -Aqm 'add x again' | |
288 | $ hg mv x y |
|
295 | $ hg mv x y | |
289 | $ hg ci -qm 'rename x to y' |
|
296 | $ hg ci -qm 'rename x to y' | |
290 | $ hg l |
|
297 | $ hg l | |
291 | @ 4 rename x to y |
|
298 | @ 4 rename x to y | |
292 | | x y |
|
299 | | x y | |
293 | o 3 add x again |
|
300 | o 3 add x again | |
294 | | x |
|
301 | | x | |
295 | | o 2 modify x |
|
302 | | o 2 modify x | |
296 | | | x |
|
303 | | | x | |
297 | | o 1 add x |
|
304 | | o 1 add x | |
298 | |/ x |
|
305 | |/ x | |
299 | o 0 base |
|
306 | o 0 base | |
300 | a |
|
307 | a | |
301 | $ hg debugpathcopies 1 4 |
|
308 | $ hg debugpathcopies 1 4 | |
302 | x -> y |
|
309 | x -> y | |
303 | $ hg graft -r 2 |
|
310 | $ hg graft -r 2 | |
304 | grafting 2:* "modify x" (glob) |
|
311 | grafting 2:* "modify x" (glob) | |
305 | merging y and x to y |
|
312 | merging y and x to y | |
306 | $ hg co -qC 2 |
|
313 | $ hg co -qC 2 | |
307 | $ hg graft -r 4 |
|
314 | $ hg graft -r 4 | |
308 | grafting 4:* "rename x to y"* (glob) |
|
315 | grafting 4:* "rename x to y"* (glob) | |
309 | merging x and y to y |
|
316 | merging x and y to y | |
310 |
|
317 | |||
311 | Add x on two branches, with same content but different history, then rename x |
|
318 | Add x on two branches, with same content but different history, then rename x | |
312 | to y on one side. Similar to the case above, here the file's nodeid is |
|
319 | to y on one side. Similar to the case above, here the file's nodeid is | |
313 | different between the branches. |
|
320 | different between the branches. | |
314 | $ newrepo |
|
321 | $ newrepo | |
315 | $ echo a > a |
|
322 | $ echo a > a | |
316 | $ hg ci -Aqm 'base' |
|
323 | $ hg ci -Aqm 'base' | |
317 | $ echo x > x |
|
324 | $ echo x > x | |
318 | $ hg ci -Aqm 'add x' |
|
325 | $ hg ci -Aqm 'add x' | |
319 | $ echo x2 > x |
|
326 | $ echo x2 > x | |
320 | $ hg ci -m 'modify x' |
|
327 | $ hg ci -m 'modify x' | |
321 | $ hg co -q 0 |
|
328 | $ hg co -q 0 | |
322 | $ touch x |
|
329 | $ touch x | |
323 | $ hg ci -Aqm 'add empty x' |
|
330 | $ hg ci -Aqm 'add empty x' | |
324 | # Same content to avoid conflicts |
|
331 | # Same content to avoid conflicts | |
325 | $ hg revert -r 1 x |
|
332 | $ hg revert -r 1 x | |
326 | $ hg ci -m 'modify x to match commit 1' |
|
333 | $ hg ci -m 'modify x to match commit 1' | |
327 | $ hg mv x y |
|
334 | $ hg mv x y | |
328 | $ hg ci -qm 'rename x to y' |
|
335 | $ hg ci -qm 'rename x to y' | |
329 | $ hg l |
|
336 | $ hg l | |
330 | @ 5 rename x to y |
|
337 | @ 5 rename x to y | |
331 | | x y |
|
338 | | x y | |
332 | o 4 modify x to match commit 1 |
|
339 | o 4 modify x to match commit 1 | |
333 | | x |
|
340 | | x | |
334 | o 3 add empty x |
|
341 | o 3 add empty x | |
335 | | x |
|
342 | | x | |
336 | | o 2 modify x |
|
343 | | o 2 modify x | |
337 | | | x |
|
344 | | | x | |
338 | | o 1 add x |
|
345 | | o 1 add x | |
339 | |/ x |
|
346 | |/ x | |
340 | o 0 base |
|
347 | o 0 base | |
341 | a |
|
348 | a | |
342 | $ hg debugpathcopies 1 5 |
|
349 | $ hg debugpathcopies 1 5 | |
343 | x -> y (no-filelog !) |
|
350 | x -> y (no-filelog no-sidedata !) | |
344 | #if filelog |
|
351 | #if no-filelog no-sidedata | |
|
352 | $ hg graft -r 2 | |||
|
353 | grafting 2:* "modify x" (glob) | |||
|
354 | merging y and x to y | |||
|
355 | #else | |||
345 | BROKEN: This should succeed and merge the changes from x into y |
|
356 | BROKEN: This should succeed and merge the changes from x into y | |
346 | $ hg graft -r 2 |
|
357 | $ hg graft -r 2 | |
347 | grafting 2:* "modify x" (glob) |
|
358 | grafting 2:* "modify x" (glob) | |
348 | file 'x' was deleted in local [local] but was modified in other [graft]. |
|
359 | file 'x' was deleted in local [local] but was modified in other [graft]. | |
349 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
360 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
350 | What do you want to do? u |
|
361 | What do you want to do? u | |
351 | abort: unresolved conflicts, can't continue |
|
362 | abort: unresolved conflicts, can't continue | |
352 | (use 'hg resolve' and 'hg graft --continue') |
|
363 | (use 'hg resolve' and 'hg graft --continue') | |
353 | [255] |
|
364 | [255] | |
354 | #else |
|
|||
355 | $ hg graft -r 2 |
|
|||
356 | grafting 2:* "modify x" (glob) |
|
|||
357 | merging y and x to y |
|
|||
358 | #endif |
|
365 | #endif | |
359 | $ hg co -qC 2 |
|
366 | $ hg co -qC 2 | |
360 | BROKEN: This should succeed and merge the changes from x into y |
|
367 | BROKEN: This should succeed and merge the changes from x into y | |
361 | $ hg graft -r 5 |
|
368 | $ hg graft -r 5 | |
362 | grafting 5:* "rename x to y"* (glob) |
|
369 | grafting 5:* "rename x to y"* (glob) | |
363 | file 'x' was deleted in other [graft] but was modified in local [local]. |
|
370 | file 'x' was deleted in other [graft] but was modified in local [local]. | |
364 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
371 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
365 | What do you want to do? u |
|
372 | What do you want to do? u | |
366 | abort: unresolved conflicts, can't continue |
|
373 | abort: unresolved conflicts, can't continue | |
367 | (use 'hg resolve' and 'hg graft --continue') |
|
374 | (use 'hg resolve' and 'hg graft --continue') | |
368 | [255] |
|
375 | [255] | |
369 |
|
376 | |||
370 | Copies via null revision (there shouldn't be any) |
|
377 | Copies via null revision (there shouldn't be any) | |
371 | $ newrepo |
|
378 | $ newrepo | |
372 | $ echo x > x |
|
379 | $ echo x > x | |
373 | $ hg ci -Aqm 'add x' |
|
380 | $ hg ci -Aqm 'add x' | |
374 | $ hg cp x y |
|
381 | $ hg cp x y | |
375 | $ hg ci -m 'copy x to y' |
|
382 | $ hg ci -m 'copy x to y' | |
376 | $ hg co -q null |
|
383 | $ hg co -q null | |
377 | $ echo x > x |
|
384 | $ echo x > x | |
378 | $ hg ci -Aqm 'add x (again)' |
|
385 | $ hg ci -Aqm 'add x (again)' | |
379 | $ hg l |
|
386 | $ hg l | |
380 | @ 2 add x (again) |
|
387 | @ 2 add x (again) | |
381 | x |
|
388 | x | |
382 | o 1 copy x to y |
|
389 | o 1 copy x to y | |
383 | | y |
|
390 | | y | |
384 | o 0 add x |
|
391 | o 0 add x | |
385 | x |
|
392 | x | |
386 | $ hg debugpathcopies 1 2 |
|
393 | $ hg debugpathcopies 1 2 | |
387 | $ hg debugpathcopies 2 1 |
|
394 | $ hg debugpathcopies 2 1 | |
388 | $ hg graft -r 1 |
|
395 | $ hg graft -r 1 | |
389 | grafting 1:* "copy x to y" (glob) |
|
396 | grafting 1:* "copy x to y" (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now