tests/test-graft.t
changeset 23463 bb0143e12f35
parent 23167 a3c2d9211294
child 23482 208ec8ca7c79
equal deleted inserted replaced
23462:afa3fbbcabd3 23463:bb0143e12f35
   359 Resolve conflicted graft
   359 Resolve conflicted graft
   360   $ hg up -q 0
   360   $ hg up -q 0
   361   $ echo b > a
   361   $ echo b > a
   362   $ hg ci -m 8
   362   $ hg ci -m 8
   363   created new head
   363   created new head
   364   $ echo a > a
   364   $ echo c > a
   365   $ hg ci -m 9
   365   $ hg ci -m 9
   366   $ hg graft 1 --tool internal:fail
   366   $ hg graft 1 --tool internal:fail
   367   grafting revision 1
   367   grafting revision 1
   368   abort: unresolved conflicts, can't continue
   368   abort: unresolved conflicts, can't continue
   369   (use hg resolve and hg graft --continue)
   369   (use hg resolve and hg graft --continue)
   370   [255]
   370   [255]
   371   $ hg resolve --all
   371   $ hg resolve --all
   372   merging a
   372   merging a
       
   373   warning: conflicts during merge.
       
   374   merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
       
   375   [1]
       
   376   $ cat a
       
   377   <<<<<<< local: aaa4406d4f0a - test: 9
       
   378   c
       
   379   =======
       
   380   b
       
   381   >>>>>>> other: 5d205f8b35b6  - bar: 1
       
   382   $ echo b > a
       
   383   $ hg resolve -m a
   373   (no more unresolved files)
   384   (no more unresolved files)
   374   $ hg graft -c
   385   $ hg graft -c
   375   grafting revision 1
   386   grafting revision 1
   376   $ hg export tip --git
   387   $ hg export tip --git
   377   # HG changeset patch
   388   # HG changeset patch
   378   # User bar
   389   # User bar
   379   # Date 0 0
   390   # Date 0 0
   380   #      Thu Jan 01 00:00:00 1970 +0000
   391   #      Thu Jan 01 00:00:00 1970 +0000
   381   # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7
   392   # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be
   382   # Parent  4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c
   393   # Parent  aaa4406d4f0ae9befd6e58c82ec63706460cbca6
   383   1
   394   1
   384   
   395   
   385   diff --git a/a b/a
   396   diff --git a/a b/a
   386   --- a/a
   397   --- a/a
   387   +++ b/a
   398   +++ b/a
   388   @@ -1,1 +1,1 @@
   399   @@ -1,1 +1,1 @@
   389   -a
   400   -c
   390   +b
   401   +b
   391 
   402 
   392 Resolve conflicted graft with rename
   403 Resolve conflicted graft with rename
   393   $ echo c > a
   404   $ echo c > a
   394   $ hg ci -m 10
   405   $ hg ci -m 10
   405   $ hg export tip --git
   416   $ hg export tip --git
   406   # HG changeset patch
   417   # HG changeset patch
   407   # User test
   418   # User test
   408   # Date 0 0
   419   # Date 0 0
   409   #      Thu Jan 01 00:00:00 1970 +0000
   420   #      Thu Jan 01 00:00:00 1970 +0000
   410   # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11
   421   # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc
   411   # Parent  e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4
   422   # Parent  ee295f490a40b97f3d18dd4c4f1c8936c233b612
   412   2
   423   2
   413   
   424   
   414   diff --git a/a b/b
   425   diff --git a/a b/b
   415   rename from a
   426   rename from a
   416   rename to b
   427   rename to b
   535   parent:      1:5d205f8b35b6
   546   parent:      1:5d205f8b35b6
   536   user:        foo
   547   user:        foo
   537   date:        Thu Jan 01 00:00:00 1970 +0000
   548   date:        Thu Jan 01 00:00:00 1970 +0000
   538   summary:     3
   549   summary:     3
   539   
   550   
   540   changeset:   17:64ecd9071ce8
   551   changeset:   17:f67661df0c48
   541   user:        bar
   552   user:        bar
   542   date:        Thu Jan 01 00:00:00 1970 +0000
   553   date:        Thu Jan 01 00:00:00 1970 +0000
   543   summary:     1
   554   summary:     1
   544   
   555   
   545   changeset:   19:2e80e1351d6e
   556   changeset:   19:9627f653b421
   546   user:        test
   557   user:        test
   547   date:        Thu Jan 01 00:00:00 1970 +0000
   558   date:        Thu Jan 01 00:00:00 1970 +0000
   548   summary:     2
   559   summary:     2
   549   
   560   
   550   changeset:   21:7e61b508e709
   561   changeset:   21:7e61b508e709
   564   changeset:   13:9db0f28fd374
   575   changeset:   13:9db0f28fd374
   565   user:        foo
   576   user:        foo
   566   date:        Thu Jan 01 00:00:00 1970 +0000
   577   date:        Thu Jan 01 00:00:00 1970 +0000
   567   summary:     2
   578   summary:     2
   568   
   579   
   569   changeset:   19:2e80e1351d6e
   580   changeset:   19:9627f653b421
   570   user:        test
   581   user:        test
   571   date:        Thu Jan 01 00:00:00 1970 +0000
   582   date:        Thu Jan 01 00:00:00 1970 +0000
   572   summary:     2
   583   summary:     2
   573   
   584   
   574   changeset:   21:7e61b508e709
   585   changeset:   21:7e61b508e709
   606   changeset:   13:9db0f28fd374
   617   changeset:   13:9db0f28fd374
   607   user:        foo
   618   user:        foo
   608   date:        Thu Jan 01 00:00:00 1970 +0000
   619   date:        Thu Jan 01 00:00:00 1970 +0000
   609   summary:     2
   620   summary:     2
   610   
   621   
   611   changeset:   19:2e80e1351d6e
   622   changeset:   19:9627f653b421
   612   user:        test
   623   user:        test
   613   date:        Thu Jan 01 00:00:00 1970 +0000
   624   date:        Thu Jan 01 00:00:00 1970 +0000
   614   summary:     2
   625   summary:     2
   615   
   626   
   616   changeset:   21:7e61b508e709
   627   changeset:   21:7e61b508e709
   667   $ cat a
   678   $ cat a
   668   abc
   679   abc
   669 
   680 
   670 graft --continue after --force
   681 graft --continue after --force
   671 
   682 
   672   $ hg backout 30
   683   $ echo def > a
   673   reverting a
   684   $ hg ci -m 31
   674   changeset 31:3b96c18b7a1b backs out changeset 30:8f539994be33
       
   675   $ hg graft 28 --force --tool internal:fail
   685   $ hg graft 28 --force --tool internal:fail
   676   grafting revision 28
   686   grafting revision 28
   677   abort: unresolved conflicts, can't continue
   687   abort: unresolved conflicts, can't continue
   678   (use hg resolve and hg graft --continue)
   688   (use hg resolve and hg graft --continue)
   679   [255]
   689   [255]
   680   $ hg resolve --all
   690   $ hg resolve --all
   681   merging a
   691   merging a
       
   692   warning: conflicts during merge.
       
   693   merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
       
   694   [1]
       
   695   $ echo abc > a
       
   696   $ hg resolve -m a
   682   (no more unresolved files)
   697   (no more unresolved files)
   683   $ hg graft -c
   698   $ hg graft -c
   684   grafting revision 28
   699   grafting revision 28
   685   $ cat a
   700   $ cat a
   686   abc
   701   abc