Show More
@@ -1,82 +1,82 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo foo > a |
|
3 | 3 | $ hg add a |
|
4 | 4 | $ hg commit -m "1" |
|
5 | 5 | |
|
6 | 6 | $ echo bar > b |
|
7 | 7 | $ hg add b |
|
8 | 8 | $ hg remove a |
|
9 | 9 | |
|
10 | 10 | Should show a removed and b added: |
|
11 | 11 | |
|
12 | 12 | $ hg status |
|
13 | 13 | A b |
|
14 | 14 | R a |
|
15 | 15 | |
|
16 | 16 | $ hg revert --all |
|
17 | 17 | undeleting a |
|
18 | 18 | forgetting b |
|
19 | 19 | |
|
20 | 20 | Should show b unknown and a back to normal: |
|
21 | 21 | |
|
22 | 22 | $ hg status |
|
23 | 23 | ? b |
|
24 | 24 | |
|
25 | 25 | $ rm b |
|
26 | 26 | |
|
27 | 27 | $ hg co -C 0 |
|
28 | 28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 29 | $ echo foo-a > a |
|
30 | 30 | $ hg commit -m "2a" |
|
31 | 31 | |
|
32 | 32 | $ hg co -C 0 |
|
33 | 33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 | 34 | $ echo foo-b > a |
|
35 | 35 | $ hg commit -m "2b" |
|
36 | 36 | created new head |
|
37 | 37 | |
|
38 | 38 | $ HGMERGE=true hg merge 1 |
|
39 | 39 | merging a |
|
40 | 40 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
41 | 41 | (branch merge, don't forget to commit) |
|
42 | 42 | |
|
43 | 43 | Should show foo-b: |
|
44 | 44 | |
|
45 | 45 | $ cat a |
|
46 | 46 | foo-b |
|
47 | 47 | |
|
48 | 48 | $ echo bar > b |
|
49 | 49 | $ hg add b |
|
50 | 50 | $ rm a |
|
51 | 51 | $ hg remove a |
|
52 | 52 | |
|
53 | 53 | Should show a removed and b added: |
|
54 | 54 | |
|
55 | 55 | $ hg status |
|
56 | 56 | A b |
|
57 | 57 | R a |
|
58 | 58 | |
|
59 | 59 | Revert should fail: |
|
60 | 60 | |
|
61 | 61 | $ hg revert |
|
62 | 62 | abort: uncommitted merge with no revision specified |
|
63 |
(use |
|
|
63 | (use 'hg update' or see 'hg help revert') | |
|
64 | 64 | [255] |
|
65 | 65 | |
|
66 | 66 | Revert should be ok now: |
|
67 | 67 | |
|
68 | 68 | $ hg revert -r2 --all |
|
69 | 69 | undeleting a |
|
70 | 70 | forgetting b |
|
71 | 71 | |
|
72 | 72 | Should show b unknown and a marked modified (merged): |
|
73 | 73 | |
|
74 | 74 | $ hg status |
|
75 | 75 | M a |
|
76 | 76 | ? b |
|
77 | 77 | |
|
78 | 78 | Should show foo-b: |
|
79 | 79 | |
|
80 | 80 | $ cat a |
|
81 | 81 | foo-b |
|
82 | 82 |
@@ -1,844 +1,844 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extdiff] |
|
3 | 3 | > # for portability: |
|
4 | 4 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
5 | 5 | > EOF |
|
6 | 6 | |
|
7 | 7 | Create a repo with some stuff in it: |
|
8 | 8 | |
|
9 | 9 | $ hg init a |
|
10 | 10 | $ cd a |
|
11 | 11 | $ echo a > a |
|
12 | 12 | $ echo a > d |
|
13 | 13 | $ echo a > e |
|
14 | 14 | $ hg ci -qAm0 |
|
15 | 15 | $ echo b > a |
|
16 | 16 | $ hg ci -m1 -u bar |
|
17 | 17 | $ hg mv a b |
|
18 | 18 | $ hg ci -m2 |
|
19 | 19 | $ hg cp b c |
|
20 | 20 | $ hg ci -m3 -u baz |
|
21 | 21 | $ echo b > d |
|
22 | 22 | $ echo f > e |
|
23 | 23 | $ hg ci -m4 |
|
24 | 24 | $ hg up -q 3 |
|
25 | 25 | $ echo b > e |
|
26 | 26 | $ hg branch -q stable |
|
27 | 27 | $ hg ci -m5 |
|
28 | 28 | $ hg merge -q default --tool internal:local |
|
29 | 29 | $ hg branch -q default |
|
30 | 30 | $ hg ci -m6 |
|
31 | 31 | $ hg phase --public 3 |
|
32 | 32 | $ hg phase --force --secret 6 |
|
33 | 33 | |
|
34 | 34 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
35 | 35 | @ test@6.secret: 6 |
|
36 | 36 | |\ |
|
37 | 37 | | o test@5.draft: 5 |
|
38 | 38 | | | |
|
39 | 39 | o | test@4.draft: 4 |
|
40 | 40 | |/ |
|
41 | 41 | o baz@3.public: 3 |
|
42 | 42 | | |
|
43 | 43 | o test@2.public: 2 |
|
44 | 44 | | |
|
45 | 45 | o bar@1.public: 1 |
|
46 | 46 | | |
|
47 | 47 | o test@0.public: 0 |
|
48 | 48 | |
|
49 | 49 | Can't continue without starting: |
|
50 | 50 | |
|
51 | 51 | $ hg rm -q e |
|
52 | 52 | $ hg graft --continue |
|
53 | 53 | abort: no graft in progress |
|
54 | 54 | [255] |
|
55 | 55 | $ hg revert -r . -q e |
|
56 | 56 | |
|
57 | 57 | Need to specify a rev: |
|
58 | 58 | |
|
59 | 59 | $ hg graft |
|
60 | 60 | abort: no revisions specified |
|
61 | 61 | [255] |
|
62 | 62 | |
|
63 | 63 | Can't graft ancestor: |
|
64 | 64 | |
|
65 | 65 | $ hg graft 1 2 |
|
66 | 66 | skipping ancestor revision 1:5d205f8b35b6 |
|
67 | 67 | skipping ancestor revision 2:5c095ad7e90f |
|
68 | 68 | [255] |
|
69 | 69 | |
|
70 | 70 | Specify revisions with -r: |
|
71 | 71 | |
|
72 | 72 | $ hg graft -r 1 -r 2 |
|
73 | 73 | skipping ancestor revision 1:5d205f8b35b6 |
|
74 | 74 | skipping ancestor revision 2:5c095ad7e90f |
|
75 | 75 | [255] |
|
76 | 76 | |
|
77 | 77 | $ hg graft -r 1 2 |
|
78 | 78 | warning: inconsistent use of --rev might give unexpected revision ordering! |
|
79 | 79 | skipping ancestor revision 2:5c095ad7e90f |
|
80 | 80 | skipping ancestor revision 1:5d205f8b35b6 |
|
81 | 81 | [255] |
|
82 | 82 | |
|
83 | 83 | Can't graft with dirty wd: |
|
84 | 84 | |
|
85 | 85 | $ hg up -q 0 |
|
86 | 86 | $ echo foo > a |
|
87 | 87 | $ hg graft 1 |
|
88 | 88 | abort: uncommitted changes |
|
89 | 89 | [255] |
|
90 | 90 | $ hg revert a |
|
91 | 91 | |
|
92 | 92 | Graft a rename: |
|
93 | 93 | (this also tests that editor is invoked if '--edit' is specified) |
|
94 | 94 | |
|
95 | 95 | $ hg status --rev "2^1" --rev 2 |
|
96 | 96 | A b |
|
97 | 97 | R a |
|
98 | 98 | $ HGEDITOR=cat hg graft 2 -u foo --edit |
|
99 | 99 | grafting 2:5c095ad7e90f "2" |
|
100 | 100 | merging a and b to b |
|
101 | 101 | 2 |
|
102 | 102 | |
|
103 | 103 | |
|
104 | 104 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
105 | 105 | HG: Leave message empty to abort commit. |
|
106 | 106 | HG: -- |
|
107 | 107 | HG: user: foo |
|
108 | 108 | HG: branch 'default' |
|
109 | 109 | HG: added b |
|
110 | 110 | HG: removed a |
|
111 | 111 | $ hg export tip --git |
|
112 | 112 | # HG changeset patch |
|
113 | 113 | # User foo |
|
114 | 114 | # Date 0 0 |
|
115 | 115 | # Thu Jan 01 00:00:00 1970 +0000 |
|
116 | 116 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
117 | 117 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
118 | 118 | 2 |
|
119 | 119 | |
|
120 | 120 | diff --git a/a b/b |
|
121 | 121 | rename from a |
|
122 | 122 | rename to b |
|
123 | 123 | |
|
124 | 124 | Look for extra:source |
|
125 | 125 | |
|
126 | 126 | $ hg log --debug -r tip |
|
127 | 127 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
128 | 128 | tag: tip |
|
129 | 129 | phase: draft |
|
130 | 130 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
131 | 131 | parent: -1:0000000000000000000000000000000000000000 |
|
132 | 132 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
133 | 133 | user: foo |
|
134 | 134 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
135 | 135 | files+: b |
|
136 | 136 | files-: a |
|
137 | 137 | extra: branch=default |
|
138 | 138 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
139 | 139 | description: |
|
140 | 140 | 2 |
|
141 | 141 | |
|
142 | 142 | |
|
143 | 143 | |
|
144 | 144 | Graft out of order, skipping a merge and a duplicate |
|
145 | 145 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
146 | 146 | |
|
147 | 147 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
148 | 148 | skipping ungraftable merge revision 6 |
|
149 | 149 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
150 | 150 | grafting 1:5d205f8b35b6 "1" |
|
151 | 151 | grafting 5:97f8bfe72746 "5" |
|
152 | 152 | grafting 4:9c233e8e184d "4" |
|
153 | 153 | grafting 3:4c60f11aa304 "3" |
|
154 | 154 | |
|
155 | 155 | $ HGEDITOR=cat hg graft 1 5 'merge()' 2 --debug |
|
156 | 156 | skipping ungraftable merge revision 6 |
|
157 | 157 | scanning for duplicate grafts |
|
158 | 158 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
159 | 159 | grafting 1:5d205f8b35b6 "1" |
|
160 | 160 | searching for copies back to rev 1 |
|
161 | 161 | unmatched files in local: |
|
162 | 162 | b |
|
163 | 163 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
164 | 164 | src: 'a' -> dst: 'b' * |
|
165 | 165 | checking for directory renames |
|
166 | 166 | resolving manifests |
|
167 | 167 | branchmerge: True, force: True, partial: False |
|
168 | 168 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
169 | 169 | preserving b for resolve of b |
|
170 | 170 | starting 4 threads for background file closing (?) |
|
171 | 171 | b: local copied/moved from a -> m (premerge) |
|
172 | 172 | picked tool ':merge' for b (binary False symlink False changedelete False) |
|
173 | 173 | merging b and a to b |
|
174 | 174 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
175 | 175 | premerge successful |
|
176 | 176 | committing files: |
|
177 | 177 | b |
|
178 | 178 | committing manifest |
|
179 | 179 | committing changelog |
|
180 | 180 | grafting 5:97f8bfe72746 "5" |
|
181 | 181 | searching for copies back to rev 1 |
|
182 | 182 | resolving manifests |
|
183 | 183 | branchmerge: True, force: True, partial: False |
|
184 | 184 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
185 | 185 | e: remote is newer -> g |
|
186 | 186 | getting e |
|
187 | 187 | b: remote unchanged -> k |
|
188 | 188 | committing files: |
|
189 | 189 | e |
|
190 | 190 | committing manifest |
|
191 | 191 | committing changelog |
|
192 | 192 | $ HGEDITOR=cat hg graft 4 3 --log --debug |
|
193 | 193 | scanning for duplicate grafts |
|
194 | 194 | grafting 4:9c233e8e184d "4" |
|
195 | 195 | searching for copies back to rev 1 |
|
196 | 196 | resolving manifests |
|
197 | 197 | branchmerge: True, force: True, partial: False |
|
198 | 198 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
199 | 199 | preserving e for resolve of e |
|
200 | 200 | d: remote is newer -> g |
|
201 | 201 | getting d |
|
202 | 202 | b: remote unchanged -> k |
|
203 | 203 | e: versions differ -> m (premerge) |
|
204 | 204 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
205 | 205 | merging e |
|
206 | 206 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
207 | 207 | e: versions differ -> m (merge) |
|
208 | 208 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
209 | 209 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
210 | 210 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
211 | 211 | abort: unresolved conflicts, can't continue |
|
212 | (use hg resolve and hg graft --continue --log) | |
|
212 | (use 'hg resolve' and 'hg graft --continue --log') | |
|
213 | 213 | [255] |
|
214 | 214 | |
|
215 | 215 | Summary should mention graft: |
|
216 | 216 | |
|
217 | 217 | $ hg summary |grep graft |
|
218 | 218 | commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) |
|
219 | 219 | |
|
220 | 220 | Commit while interrupted should fail: |
|
221 | 221 | |
|
222 | 222 | $ hg ci -m 'commit interrupted graft' |
|
223 | 223 | abort: graft in progress |
|
224 | 224 | (use 'hg graft --continue' or 'hg update' to abort) |
|
225 | 225 | [255] |
|
226 | 226 | |
|
227 | 227 | Abort the graft and try committing: |
|
228 | 228 | |
|
229 | 229 | $ hg up -C . |
|
230 | 230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
231 | 231 | $ echo c >> e |
|
232 | 232 | $ hg ci -mtest |
|
233 | 233 | |
|
234 | 234 | $ hg strip . --config extensions.strip= |
|
235 | 235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
236 | 236 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
237 | 237 | |
|
238 | 238 | Graft again: |
|
239 | 239 | |
|
240 | 240 | $ hg graft 1 5 4 3 'merge()' 2 |
|
241 | 241 | skipping ungraftable merge revision 6 |
|
242 | 242 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
243 | 243 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) |
|
244 | 244 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) |
|
245 | 245 | grafting 4:9c233e8e184d "4" |
|
246 | 246 | merging e |
|
247 | 247 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
248 | 248 | abort: unresolved conflicts, can't continue |
|
249 | (use hg resolve and hg graft --continue) | |
|
249 | (use 'hg resolve' and 'hg graft --continue') | |
|
250 | 250 | [255] |
|
251 | 251 | |
|
252 | 252 | Continue without resolve should fail: |
|
253 | 253 | |
|
254 | 254 | $ hg graft -c |
|
255 | 255 | grafting 4:9c233e8e184d "4" |
|
256 | 256 | abort: unresolved merge conflicts (see "hg help resolve") |
|
257 | 257 | [255] |
|
258 | 258 | |
|
259 | 259 | Fix up: |
|
260 | 260 | |
|
261 | 261 | $ echo b > e |
|
262 | 262 | $ hg resolve -m e |
|
263 | 263 | (no more unresolved files) |
|
264 | 264 | continue: hg graft --continue |
|
265 | 265 | |
|
266 | 266 | Continue with a revision should fail: |
|
267 | 267 | |
|
268 | 268 | $ hg graft -c 6 |
|
269 | 269 | abort: can't specify --continue and revisions |
|
270 | 270 | [255] |
|
271 | 271 | |
|
272 | 272 | $ hg graft -c -r 6 |
|
273 | 273 | abort: can't specify --continue and revisions |
|
274 | 274 | [255] |
|
275 | 275 | |
|
276 | 276 | Continue for real, clobber usernames |
|
277 | 277 | |
|
278 | 278 | $ hg graft -c -U |
|
279 | 279 | grafting 4:9c233e8e184d "4" |
|
280 | 280 | grafting 3:4c60f11aa304 "3" |
|
281 | 281 | |
|
282 | 282 | Compare with original: |
|
283 | 283 | |
|
284 | 284 | $ hg diff -r 6 |
|
285 | 285 | $ hg status --rev 0:. -C |
|
286 | 286 | M d |
|
287 | 287 | M e |
|
288 | 288 | A b |
|
289 | 289 | a |
|
290 | 290 | A c |
|
291 | 291 | a |
|
292 | 292 | R a |
|
293 | 293 | |
|
294 | 294 | View graph: |
|
295 | 295 | |
|
296 | 296 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
297 | 297 | @ test@11.draft: 3 |
|
298 | 298 | | |
|
299 | 299 | o test@10.draft: 4 |
|
300 | 300 | | |
|
301 | 301 | o test@9.draft: 5 |
|
302 | 302 | | |
|
303 | 303 | o bar@8.draft: 1 |
|
304 | 304 | | |
|
305 | 305 | o foo@7.draft: 2 |
|
306 | 306 | | |
|
307 | 307 | | o test@6.secret: 6 |
|
308 | 308 | | |\ |
|
309 | 309 | | | o test@5.draft: 5 |
|
310 | 310 | | | | |
|
311 | 311 | | o | test@4.draft: 4 |
|
312 | 312 | | |/ |
|
313 | 313 | | o baz@3.public: 3 |
|
314 | 314 | | | |
|
315 | 315 | | o test@2.public: 2 |
|
316 | 316 | | | |
|
317 | 317 | | o bar@1.public: 1 |
|
318 | 318 | |/ |
|
319 | 319 | o test@0.public: 0 |
|
320 | 320 | |
|
321 | 321 | Graft again onto another branch should preserve the original source |
|
322 | 322 | $ hg up -q 0 |
|
323 | 323 | $ echo 'g'>g |
|
324 | 324 | $ hg add g |
|
325 | 325 | $ hg ci -m 7 |
|
326 | 326 | created new head |
|
327 | 327 | $ hg graft 7 |
|
328 | 328 | grafting 7:ef0ef43d49e7 "2" |
|
329 | 329 | |
|
330 | 330 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
331 | 331 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
332 | 332 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
333 | 333 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
334 | 334 | |
|
335 | 335 | $ hg log --debug -r tip |
|
336 | 336 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
337 | 337 | tag: tip |
|
338 | 338 | phase: draft |
|
339 | 339 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
340 | 340 | parent: -1:0000000000000000000000000000000000000000 |
|
341 | 341 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
342 | 342 | user: foo |
|
343 | 343 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
344 | 344 | files+: b |
|
345 | 345 | files-: a |
|
346 | 346 | extra: branch=default |
|
347 | 347 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
348 | 348 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
349 | 349 | description: |
|
350 | 350 | 2 |
|
351 | 351 | |
|
352 | 352 | |
|
353 | 353 | Disallow grafting an already grafted cset onto its original branch |
|
354 | 354 | $ hg up -q 6 |
|
355 | 355 | $ hg graft 7 |
|
356 | 356 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) |
|
357 | 357 | [255] |
|
358 | 358 | |
|
359 | 359 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 |
|
360 | 360 | --- */hg-5c095ad7e90f.patch * (glob) |
|
361 | 361 | +++ */hg-7a4785234d87.patch * (glob) |
|
362 | 362 | @@ -1,18 +1,18 @@ |
|
363 | 363 | # HG changeset patch |
|
364 | 364 | -# User test |
|
365 | 365 | +# User foo |
|
366 | 366 | # Date 0 0 |
|
367 | 367 | # Thu Jan 01 00:00:00 1970 +0000 |
|
368 | 368 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
369 | 369 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
370 | 370 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
371 | 371 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
372 | 372 | 2 |
|
373 | 373 | |
|
374 | 374 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a |
|
375 | 375 | +diff -r b592ea63bb0c -r 7a4785234d87 a |
|
376 | 376 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
377 | 377 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
378 | 378 | @@ -1,1 +0,0 @@ |
|
379 | 379 | --b |
|
380 | 380 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b |
|
381 | 381 | +-a |
|
382 | 382 | +diff -r b592ea63bb0c -r 7a4785234d87 b |
|
383 | 383 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
384 | 384 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
385 | 385 | @@ -0,0 +1,1 @@ |
|
386 | 386 | -+b |
|
387 | 387 | ++a |
|
388 | 388 | [1] |
|
389 | 389 | |
|
390 | 390 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . |
|
391 | 391 | --- */hg-5c095ad7e90f.patch * (glob) |
|
392 | 392 | +++ */hg-7a4785234d87.patch * (glob) |
|
393 | 393 | @@ -1,8 +1,8 @@ |
|
394 | 394 | # HG changeset patch |
|
395 | 395 | -# User test |
|
396 | 396 | +# User foo |
|
397 | 397 | # Date 0 0 |
|
398 | 398 | # Thu Jan 01 00:00:00 1970 +0000 |
|
399 | 399 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
400 | 400 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
401 | 401 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
402 | 402 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
403 | 403 | 2 |
|
404 | 404 | |
|
405 | 405 | [1] |
|
406 | 406 | |
|
407 | 407 | Disallow grafting already grafted csets with the same origin onto each other |
|
408 | 408 | $ hg up -q 13 |
|
409 | 409 | $ hg graft 2 |
|
410 | 410 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) |
|
411 | 411 | [255] |
|
412 | 412 | $ hg graft 7 |
|
413 | 413 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) |
|
414 | 414 | [255] |
|
415 | 415 | |
|
416 | 416 | $ hg up -q 7 |
|
417 | 417 | $ hg graft 2 |
|
418 | 418 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
419 | 419 | [255] |
|
420 | 420 | $ hg graft tip |
|
421 | 421 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) |
|
422 | 422 | [255] |
|
423 | 423 | |
|
424 | 424 | Graft with --log |
|
425 | 425 | |
|
426 | 426 | $ hg up -Cq 1 |
|
427 | 427 | $ hg graft 3 --log -u foo |
|
428 | 428 | grafting 3:4c60f11aa304 "3" |
|
429 | 429 | warning: can't find ancestor for 'c' copied from 'b'! |
|
430 | 430 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
431 | 431 | 14 1:5d205f8b35b6 3 |
|
432 | 432 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
433 | 433 | |
|
434 | 434 | Resolve conflicted graft |
|
435 | 435 | $ hg up -q 0 |
|
436 | 436 | $ echo b > a |
|
437 | 437 | $ hg ci -m 8 |
|
438 | 438 | created new head |
|
439 | 439 | $ echo c > a |
|
440 | 440 | $ hg ci -m 9 |
|
441 | 441 | $ hg graft 1 --tool internal:fail |
|
442 | 442 | grafting 1:5d205f8b35b6 "1" |
|
443 | 443 | abort: unresolved conflicts, can't continue |
|
444 | (use hg resolve and hg graft --continue) | |
|
444 | (use 'hg resolve' and 'hg graft --continue') | |
|
445 | 445 | [255] |
|
446 | 446 | $ hg resolve --all |
|
447 | 447 | merging a |
|
448 | 448 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
449 | 449 | [1] |
|
450 | 450 | $ cat a |
|
451 | 451 | <<<<<<< local: aaa4406d4f0a - test: 9 |
|
452 | 452 | c |
|
453 | 453 | ======= |
|
454 | 454 | b |
|
455 | 455 | >>>>>>> graft: 5d205f8b35b6 - bar: 1 |
|
456 | 456 | $ echo b > a |
|
457 | 457 | $ hg resolve -m a |
|
458 | 458 | (no more unresolved files) |
|
459 | 459 | continue: hg graft --continue |
|
460 | 460 | $ hg graft -c |
|
461 | 461 | grafting 1:5d205f8b35b6 "1" |
|
462 | 462 | $ hg export tip --git |
|
463 | 463 | # HG changeset patch |
|
464 | 464 | # User bar |
|
465 | 465 | # Date 0 0 |
|
466 | 466 | # Thu Jan 01 00:00:00 1970 +0000 |
|
467 | 467 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be |
|
468 | 468 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 |
|
469 | 469 | 1 |
|
470 | 470 | |
|
471 | 471 | diff --git a/a b/a |
|
472 | 472 | --- a/a |
|
473 | 473 | +++ b/a |
|
474 | 474 | @@ -1,1 +1,1 @@ |
|
475 | 475 | -c |
|
476 | 476 | +b |
|
477 | 477 | |
|
478 | 478 | Resolve conflicted graft with rename |
|
479 | 479 | $ echo c > a |
|
480 | 480 | $ hg ci -m 10 |
|
481 | 481 | $ hg graft 2 --tool internal:fail |
|
482 | 482 | grafting 2:5c095ad7e90f "2" |
|
483 | 483 | abort: unresolved conflicts, can't continue |
|
484 | (use hg resolve and hg graft --continue) | |
|
484 | (use 'hg resolve' and 'hg graft --continue') | |
|
485 | 485 | [255] |
|
486 | 486 | $ hg resolve --all |
|
487 | 487 | merging a and b to b |
|
488 | 488 | (no more unresolved files) |
|
489 | 489 | continue: hg graft --continue |
|
490 | 490 | $ hg graft -c |
|
491 | 491 | grafting 2:5c095ad7e90f "2" |
|
492 | 492 | $ hg export tip --git |
|
493 | 493 | # HG changeset patch |
|
494 | 494 | # User test |
|
495 | 495 | # Date 0 0 |
|
496 | 496 | # Thu Jan 01 00:00:00 1970 +0000 |
|
497 | 497 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc |
|
498 | 498 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 |
|
499 | 499 | 2 |
|
500 | 500 | |
|
501 | 501 | diff --git a/a b/b |
|
502 | 502 | rename from a |
|
503 | 503 | rename to b |
|
504 | 504 | |
|
505 | 505 | Test simple origin(), with and without args |
|
506 | 506 | $ hg log -r 'origin()' |
|
507 | 507 | changeset: 1:5d205f8b35b6 |
|
508 | 508 | user: bar |
|
509 | 509 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
510 | 510 | summary: 1 |
|
511 | 511 | |
|
512 | 512 | changeset: 2:5c095ad7e90f |
|
513 | 513 | user: test |
|
514 | 514 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
515 | 515 | summary: 2 |
|
516 | 516 | |
|
517 | 517 | changeset: 3:4c60f11aa304 |
|
518 | 518 | user: baz |
|
519 | 519 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
520 | 520 | summary: 3 |
|
521 | 521 | |
|
522 | 522 | changeset: 4:9c233e8e184d |
|
523 | 523 | user: test |
|
524 | 524 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
525 | 525 | summary: 4 |
|
526 | 526 | |
|
527 | 527 | changeset: 5:97f8bfe72746 |
|
528 | 528 | branch: stable |
|
529 | 529 | parent: 3:4c60f11aa304 |
|
530 | 530 | user: test |
|
531 | 531 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
532 | 532 | summary: 5 |
|
533 | 533 | |
|
534 | 534 | $ hg log -r 'origin(7)' |
|
535 | 535 | changeset: 2:5c095ad7e90f |
|
536 | 536 | user: test |
|
537 | 537 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
538 | 538 | summary: 2 |
|
539 | 539 | |
|
540 | 540 | Now transplant a graft to test following through copies |
|
541 | 541 | $ hg up -q 0 |
|
542 | 542 | $ hg branch -q dev |
|
543 | 543 | $ hg ci -qm "dev branch" |
|
544 | 544 | $ hg --config extensions.transplant= transplant -q 7 |
|
545 | 545 | $ hg log -r 'origin(.)' |
|
546 | 546 | changeset: 2:5c095ad7e90f |
|
547 | 547 | user: test |
|
548 | 548 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
549 | 549 | summary: 2 |
|
550 | 550 | |
|
551 | 551 | Test that the graft and transplant markers in extra are converted, allowing |
|
552 | 552 | origin() to still work. Note that these recheck the immediately preceeding two |
|
553 | 553 | tests. |
|
554 | 554 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted |
|
555 | 555 | |
|
556 | 556 | The graft case |
|
557 | 557 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
558 | 558 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
559 | 559 | branch=default |
|
560 | 560 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
561 | 561 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
562 | 562 | $ hg -R ../converted log -r 'origin(7)' |
|
563 | 563 | changeset: 2:e0213322b2c1 |
|
564 | 564 | user: test |
|
565 | 565 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
566 | 566 | summary: 2 |
|
567 | 567 | |
|
568 | 568 | Test that template correctly expands more than one 'extra' (issue4362), and that |
|
569 | 569 | 'intermediate-source' is converted. |
|
570 | 570 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" |
|
571 | 571 | Extra: branch=default |
|
572 | 572 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
573 | 573 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
574 | 574 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
575 | 575 | |
|
576 | 576 | The transplant case |
|
577 | 577 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
578 | 578 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade |
|
579 | 579 | branch=dev |
|
580 | 580 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 |
|
581 | 581 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) |
|
582 | 582 | `h\x9b (esc) |
|
583 | 583 | $ hg -R ../converted log -r 'origin(tip)' |
|
584 | 584 | changeset: 2:e0213322b2c1 |
|
585 | 585 | user: test |
|
586 | 586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
587 | 587 | summary: 2 |
|
588 | 588 | |
|
589 | 589 | |
|
590 | 590 | Test simple destination |
|
591 | 591 | $ hg log -r 'destination()' |
|
592 | 592 | changeset: 7:ef0ef43d49e7 |
|
593 | 593 | parent: 0:68795b066622 |
|
594 | 594 | user: foo |
|
595 | 595 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
596 | 596 | summary: 2 |
|
597 | 597 | |
|
598 | 598 | changeset: 8:6b9e5368ca4e |
|
599 | 599 | user: bar |
|
600 | 600 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
601 | 601 | summary: 1 |
|
602 | 602 | |
|
603 | 603 | changeset: 9:1905859650ec |
|
604 | 604 | user: test |
|
605 | 605 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
606 | 606 | summary: 5 |
|
607 | 607 | |
|
608 | 608 | changeset: 10:52dc0b4c6907 |
|
609 | 609 | user: test |
|
610 | 610 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | 611 | summary: 4 |
|
612 | 612 | |
|
613 | 613 | changeset: 11:882b35362a6b |
|
614 | 614 | user: test |
|
615 | 615 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
616 | 616 | summary: 3 |
|
617 | 617 | |
|
618 | 618 | changeset: 13:7a4785234d87 |
|
619 | 619 | user: foo |
|
620 | 620 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
621 | 621 | summary: 2 |
|
622 | 622 | |
|
623 | 623 | changeset: 14:f64defefacee |
|
624 | 624 | parent: 1:5d205f8b35b6 |
|
625 | 625 | user: foo |
|
626 | 626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
627 | 627 | summary: 3 |
|
628 | 628 | |
|
629 | 629 | changeset: 17:f67661df0c48 |
|
630 | 630 | user: bar |
|
631 | 631 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
632 | 632 | summary: 1 |
|
633 | 633 | |
|
634 | 634 | changeset: 19:9627f653b421 |
|
635 | 635 | user: test |
|
636 | 636 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
637 | 637 | summary: 2 |
|
638 | 638 | |
|
639 | 639 | changeset: 21:7e61b508e709 |
|
640 | 640 | branch: dev |
|
641 | 641 | tag: tip |
|
642 | 642 | user: foo |
|
643 | 643 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
644 | 644 | summary: 2 |
|
645 | 645 | |
|
646 | 646 | $ hg log -r 'destination(2)' |
|
647 | 647 | changeset: 7:ef0ef43d49e7 |
|
648 | 648 | parent: 0:68795b066622 |
|
649 | 649 | user: foo |
|
650 | 650 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
651 | 651 | summary: 2 |
|
652 | 652 | |
|
653 | 653 | changeset: 13:7a4785234d87 |
|
654 | 654 | user: foo |
|
655 | 655 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
656 | 656 | summary: 2 |
|
657 | 657 | |
|
658 | 658 | changeset: 19:9627f653b421 |
|
659 | 659 | user: test |
|
660 | 660 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
661 | 661 | summary: 2 |
|
662 | 662 | |
|
663 | 663 | changeset: 21:7e61b508e709 |
|
664 | 664 | branch: dev |
|
665 | 665 | tag: tip |
|
666 | 666 | user: foo |
|
667 | 667 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
668 | 668 | summary: 2 |
|
669 | 669 | |
|
670 | 670 | Transplants of grafts can find a destination... |
|
671 | 671 | $ hg log -r 'destination(7)' |
|
672 | 672 | changeset: 21:7e61b508e709 |
|
673 | 673 | branch: dev |
|
674 | 674 | tag: tip |
|
675 | 675 | user: foo |
|
676 | 676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
677 | 677 | summary: 2 |
|
678 | 678 | |
|
679 | 679 | ... grafts of grafts unfortunately can't |
|
680 | 680 | $ hg graft -q 13 |
|
681 | 681 | warning: can't find ancestor for 'b' copied from 'a'! |
|
682 | 682 | $ hg log -r 'destination(13)' |
|
683 | 683 | All copies of a cset |
|
684 | 684 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
685 | 685 | changeset: 2:5c095ad7e90f |
|
686 | 686 | user: test |
|
687 | 687 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
688 | 688 | summary: 2 |
|
689 | 689 | |
|
690 | 690 | changeset: 7:ef0ef43d49e7 |
|
691 | 691 | parent: 0:68795b066622 |
|
692 | 692 | user: foo |
|
693 | 693 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
694 | 694 | summary: 2 |
|
695 | 695 | |
|
696 | 696 | changeset: 13:7a4785234d87 |
|
697 | 697 | user: foo |
|
698 | 698 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
699 | 699 | summary: 2 |
|
700 | 700 | |
|
701 | 701 | changeset: 19:9627f653b421 |
|
702 | 702 | user: test |
|
703 | 703 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
704 | 704 | summary: 2 |
|
705 | 705 | |
|
706 | 706 | changeset: 21:7e61b508e709 |
|
707 | 707 | branch: dev |
|
708 | 708 | user: foo |
|
709 | 709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
710 | 710 | summary: 2 |
|
711 | 711 | |
|
712 | 712 | changeset: 22:d1cb6591fa4b |
|
713 | 713 | branch: dev |
|
714 | 714 | tag: tip |
|
715 | 715 | user: foo |
|
716 | 716 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
717 | 717 | summary: 2 |
|
718 | 718 | |
|
719 | 719 | |
|
720 | 720 | graft works on complex revset |
|
721 | 721 | |
|
722 | 722 | $ hg graft 'origin(13) or destination(origin(13))' |
|
723 | 723 | skipping ancestor revision 21:7e61b508e709 |
|
724 | 724 | skipping ancestor revision 22:d1cb6591fa4b |
|
725 | 725 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) |
|
726 | 726 | grafting 7:ef0ef43d49e7 "2" |
|
727 | 727 | warning: can't find ancestor for 'b' copied from 'a'! |
|
728 | 728 | grafting 13:7a4785234d87 "2" |
|
729 | 729 | warning: can't find ancestor for 'b' copied from 'a'! |
|
730 | 730 | grafting 19:9627f653b421 "2" |
|
731 | 731 | merging b |
|
732 | 732 | warning: can't find ancestor for 'b' copied from 'a'! |
|
733 | 733 | |
|
734 | 734 | graft with --force (still doesn't graft merges) |
|
735 | 735 | |
|
736 | 736 | $ hg graft 19 0 6 |
|
737 | 737 | skipping ungraftable merge revision 6 |
|
738 | 738 | skipping ancestor revision 0:68795b066622 |
|
739 | 739 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) |
|
740 | 740 | [255] |
|
741 | 741 | $ hg graft 19 0 6 --force |
|
742 | 742 | skipping ungraftable merge revision 6 |
|
743 | 743 | grafting 19:9627f653b421 "2" |
|
744 | 744 | merging b |
|
745 | 745 | warning: can't find ancestor for 'b' copied from 'a'! |
|
746 | 746 | grafting 0:68795b066622 "0" |
|
747 | 747 | |
|
748 | 748 | graft --force after backout |
|
749 | 749 | |
|
750 | 750 | $ echo abc > a |
|
751 | 751 | $ hg ci -m 28 |
|
752 | 752 | $ hg backout 28 |
|
753 | 753 | reverting a |
|
754 | 754 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 |
|
755 | 755 | $ hg graft 28 |
|
756 | 756 | skipping ancestor revision 28:50a516bb8b57 |
|
757 | 757 | [255] |
|
758 | 758 | $ hg graft 28 --force |
|
759 | 759 | grafting 28:50a516bb8b57 "28" |
|
760 | 760 | merging a |
|
761 | 761 | $ cat a |
|
762 | 762 | abc |
|
763 | 763 | |
|
764 | 764 | graft --continue after --force |
|
765 | 765 | |
|
766 | 766 | $ echo def > a |
|
767 | 767 | $ hg ci -m 31 |
|
768 | 768 | $ hg graft 28 --force --tool internal:fail |
|
769 | 769 | grafting 28:50a516bb8b57 "28" |
|
770 | 770 | abort: unresolved conflicts, can't continue |
|
771 | (use hg resolve and hg graft --continue) | |
|
771 | (use 'hg resolve' and 'hg graft --continue') | |
|
772 | 772 | [255] |
|
773 | 773 | $ hg resolve --all |
|
774 | 774 | merging a |
|
775 | 775 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
776 | 776 | [1] |
|
777 | 777 | $ echo abc > a |
|
778 | 778 | $ hg resolve -m a |
|
779 | 779 | (no more unresolved files) |
|
780 | 780 | continue: hg graft --continue |
|
781 | 781 | $ hg graft -c |
|
782 | 782 | grafting 28:50a516bb8b57 "28" |
|
783 | 783 | $ cat a |
|
784 | 784 | abc |
|
785 | 785 | |
|
786 | 786 | Continue testing same origin policy, using revision numbers from test above |
|
787 | 787 | but do some destructive editing of the repo: |
|
788 | 788 | |
|
789 | 789 | $ hg up -qC 7 |
|
790 | 790 | $ hg tag -l -r 13 tmp |
|
791 | 791 | $ hg --config extensions.strip= strip 2 |
|
792 | 792 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) |
|
793 | 793 | $ hg graft tmp |
|
794 | 794 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) |
|
795 | 795 | [255] |
|
796 | 796 | |
|
797 | 797 | Empty graft |
|
798 | 798 | |
|
799 | 799 | $ hg up -qr 26 |
|
800 | 800 | $ hg tag -f something |
|
801 | 801 | $ hg graft -qr 27 |
|
802 | 802 | $ hg graft -f 27 |
|
803 | 803 | grafting 27:ed6c7e54e319 "28" |
|
804 | 804 | note: graft of 27:ed6c7e54e319 created no changes to commit |
|
805 | 805 | |
|
806 | 806 | $ cd .. |
|
807 | 807 | |
|
808 | 808 | Graft to duplicate a commit |
|
809 | 809 | |
|
810 | 810 | $ hg init graftsibling |
|
811 | 811 | $ cd graftsibling |
|
812 | 812 | $ touch a |
|
813 | 813 | $ hg commit -qAm a |
|
814 | 814 | $ touch b |
|
815 | 815 | $ hg commit -qAm b |
|
816 | 816 | $ hg log -G -T '{rev}\n' |
|
817 | 817 | @ 1 |
|
818 | 818 | | |
|
819 | 819 | o 0 |
|
820 | 820 | |
|
821 | 821 | $ hg up -q 0 |
|
822 | 822 | $ hg graft -r 1 |
|
823 | 823 | grafting 1:0e067c57feba "b" (tip) |
|
824 | 824 | $ hg log -G -T '{rev}\n' |
|
825 | 825 | @ 2 |
|
826 | 826 | | |
|
827 | 827 | | o 1 |
|
828 | 828 | |/ |
|
829 | 829 | o 0 |
|
830 | 830 | |
|
831 | 831 | Graft to duplicate a commit twice |
|
832 | 832 | |
|
833 | 833 | $ hg up -q 0 |
|
834 | 834 | $ hg graft -r 2 |
|
835 | 835 | grafting 2:044ec77f6389 "b" (tip) |
|
836 | 836 | $ hg log -G -T '{rev}\n' |
|
837 | 837 | @ 3 |
|
838 | 838 | | |
|
839 | 839 | | o 2 |
|
840 | 840 | |/ |
|
841 | 841 | | o 1 |
|
842 | 842 | |/ |
|
843 | 843 | o 0 |
|
844 | 844 |
@@ -1,96 +1,96 b'' | |||
|
1 | 1 | https://bz.mercurial-scm.org/1175 |
|
2 | 2 | |
|
3 | 3 | $ hg init |
|
4 | 4 | $ touch a |
|
5 | 5 | $ hg ci -Am0 |
|
6 | 6 | adding a |
|
7 | 7 | |
|
8 | 8 | $ hg mv a a1 |
|
9 | 9 | $ hg ci -m1 |
|
10 | 10 | |
|
11 | 11 | $ hg co 0 |
|
12 | 12 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
13 | 13 | |
|
14 | 14 | $ hg mv a a2 |
|
15 | 15 | $ hg up |
|
16 | 16 | note: possible conflict - a was renamed multiple times to: |
|
17 | 17 | a2 |
|
18 | 18 | a1 |
|
19 | 19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 20 | |
|
21 | 21 | $ hg ci -m2 |
|
22 | 22 | |
|
23 | 23 | $ touch a |
|
24 | 24 | $ hg ci -Am3 |
|
25 | 25 | adding a |
|
26 | 26 | |
|
27 | 27 | $ hg mv a b |
|
28 | 28 | $ hg ci -Am4 a |
|
29 | 29 | |
|
30 | 30 | $ hg ci --debug --traceback -Am5 b |
|
31 | 31 | committing files: |
|
32 | 32 | b |
|
33 | 33 | warning: can't find ancestor for 'b' copied from 'a'! |
|
34 | 34 | committing manifest |
|
35 | 35 | committing changelog |
|
36 | 36 | committed changeset 5:83a687e8a97c80992ba385bbfd766be181bfb1d1 |
|
37 | 37 | |
|
38 | 38 | $ hg verify |
|
39 | 39 | checking changesets |
|
40 | 40 | checking manifests |
|
41 | 41 | crosschecking files in changesets and manifests |
|
42 | 42 | checking files |
|
43 | 43 | 4 files, 6 changesets, 4 total revisions |
|
44 | 44 | |
|
45 | 45 | $ hg export --git tip |
|
46 | 46 | # HG changeset patch |
|
47 | 47 | # User test |
|
48 | 48 | # Date 0 0 |
|
49 | 49 | # Thu Jan 01 00:00:00 1970 +0000 |
|
50 | 50 | # Node ID 83a687e8a97c80992ba385bbfd766be181bfb1d1 |
|
51 | 51 | # Parent 1d1625283f71954f21d14c3d44d0ad3c019c597f |
|
52 | 52 | 5 |
|
53 | 53 | |
|
54 | 54 | diff --git a/b b/b |
|
55 | 55 | new file mode 100644 |
|
56 | 56 | |
|
57 | 57 | http://bz.selenic.com/show_bug.cgi?id=4476 |
|
58 | 58 | |
|
59 | 59 | $ hg init foo |
|
60 | 60 | $ cd foo |
|
61 | 61 | $ touch a && hg ci -Aqm a |
|
62 | 62 | $ hg mv a b |
|
63 | 63 | $ echo b1 >> b |
|
64 | 64 | $ hg ci -Aqm b1 |
|
65 | 65 | $ hg up 0 |
|
66 | 66 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
67 | 67 | $ hg mv a b |
|
68 | 68 | $ echo b2 >> b |
|
69 | 69 | $ hg ci -Aqm b2 |
|
70 | 70 | $ hg graft 1 |
|
71 | 71 | grafting 1:5974126fad84 "b1" |
|
72 | 72 | merging b |
|
73 | 73 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
74 | 74 | abort: unresolved conflicts, can't continue |
|
75 | (use hg resolve and hg graft --continue) | |
|
75 | (use 'hg resolve' and 'hg graft --continue') | |
|
76 | 76 | [255] |
|
77 | 77 | $ echo a > b |
|
78 | 78 | $ echo b3 >> b |
|
79 | 79 | $ hg resolve --mark b |
|
80 | 80 | (no more unresolved files) |
|
81 | 81 | continue: hg graft --continue |
|
82 | 82 | $ hg graft --continue |
|
83 | 83 | grafting 1:5974126fad84 "b1" |
|
84 | 84 | warning: can't find ancestor for 'b' copied from 'a'! |
|
85 | 85 | $ hg log -f b -T 'changeset: {rev}:{node|short}\nsummary: {desc}\n\n' |
|
86 | 86 | changeset: 3:376d30ccffc0 |
|
87 | 87 | summary: b1 |
|
88 | 88 | |
|
89 | 89 | changeset: 2:416baaa2e5e4 |
|
90 | 90 | summary: b2 |
|
91 | 91 | |
|
92 | 92 | changeset: 0:3903775176ed |
|
93 | 93 | summary: a |
|
94 | 94 | |
|
95 | 95 | |
|
96 | 96 |
General Comments 0
You need to be logged in to leave comments.
Login now