Show More
@@ -299,4 +299,88 b' copies and renames, you have no chance t' | |||||
299 | removed |
|
299 | removed | |
300 | R ignored |
|
300 | R ignored | |
301 |
|
301 | |||
302 | $ cd .. |
|
302 | Test revert of a file added by one side of the merge | |
|
303 | ||||
|
304 | (remove any pending change) | |||
|
305 | ||||
|
306 | $ hg revert --all | |||
|
307 | forgetting allyour | |||
|
308 | forgetting base | |||
|
309 | undeleting ignored | |||
|
310 | $ hg purge --all --config extensions.purge= | |||
|
311 | ||||
|
312 | (Adds a new commit) | |||
|
313 | ||||
|
314 | $ echo foo > newadd | |||
|
315 | $ hg add newadd | |||
|
316 | $ hg commit -m 'other adds' | |||
|
317 | created new head | |||
|
318 | ||||
|
319 | ||||
|
320 | (merge it with the other head) | |||
|
321 | ||||
|
322 | $ hg merge # merge 1 into 2 | |||
|
323 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
324 | (branch merge, don't forget to commit) | |||
|
325 | $ hg summary | |||
|
326 | parent: 2:b8ec310b2d4e tip | |||
|
327 | other adds | |||
|
328 | parent: 1:f6180deb8fbe | |||
|
329 | rename | |||
|
330 | branch: default | |||
|
331 | commit: 2 modified, 1 removed (merge) | |||
|
332 | update: (current) | |||
|
333 | ||||
|
334 | (clarifies who added what) | |||
|
335 | ||||
|
336 | $ hg status | |||
|
337 | M allyour | |||
|
338 | M base | |||
|
339 | R ignored | |||
|
340 | $ hg status --change 'p1()' | |||
|
341 | A newadd | |||
|
342 | $ hg status --change 'p2()' | |||
|
343 | A allyour | |||
|
344 | A base | |||
|
345 | R ignored | |||
|
346 | ||||
|
347 | (revert file added by p1() to p1() state) | |||
|
348 | ||||
|
349 | $ hg revert -r 'p1()' 'glob:newad?' | |||
|
350 | $ hg status | |||
|
351 | M allyour | |||
|
352 | M base | |||
|
353 | R ignored | |||
|
354 | ||||
|
355 | (revert file added by p1() to p2() state) | |||
|
356 | ||||
|
357 | $ hg revert -r 'p2()' 'glob:newad?' | |||
|
358 | removing newadd | |||
|
359 | $ hg status | |||
|
360 | M allyour | |||
|
361 | M base | |||
|
362 | R ignored | |||
|
363 | R newadd | |||
|
364 | ||||
|
365 | (revert file added by p2() to p2() state) | |||
|
366 | spurious message comes from revert confusion when using p2. To be fixed soon. | |||
|
367 | ||||
|
368 | $ hg revert -r 'p2()' 'glob:allyou?' | |||
|
369 | reverting allyour | |||
|
370 | $ hg status | |||
|
371 | M allyour | |||
|
372 | M base | |||
|
373 | R ignored | |||
|
374 | R newadd | |||
|
375 | ||||
|
376 | (revert file added by p2() to p1() state) | |||
|
377 | ||||
|
378 | $ hg revert -r 'p1()' 'glob:allyou?' | |||
|
379 | removing allyour | |||
|
380 | $ hg status | |||
|
381 | M base | |||
|
382 | R allyour | |||
|
383 | R ignored | |||
|
384 | R newadd | |||
|
385 | ||||
|
386 |
General Comments 0
You need to be logged in to leave comments.
Login now