tests/test-graft.t
changeset 23507 67045b5a903a
parent 23506 dc82f1a7436d
child 23508 2164226a5637
equal deleted inserted replaced
23506:dc82f1a7436d 23507:67045b5a903a
    48   [255]
    48   [255]
    49 
    49 
    50 Can't graft ancestor:
    50 Can't graft ancestor:
    51 
    51 
    52   $ hg graft 1 2
    52   $ hg graft 1 2
    53   skipping ancestor revision 1
    53   skipping ancestor revision 1:5d205f8b35b6
    54   skipping ancestor revision 2
    54   skipping ancestor revision 2:5c095ad7e90f
    55   [255]
    55   [255]
    56 
    56 
    57 Specify revisions with -r:
    57 Specify revisions with -r:
    58 
    58 
    59   $ hg graft -r 1 -r 2
    59   $ hg graft -r 1 -r 2
    60   skipping ancestor revision 1
    60   skipping ancestor revision 1:5d205f8b35b6
    61   skipping ancestor revision 2
    61   skipping ancestor revision 2:5c095ad7e90f
    62   [255]
    62   [255]
    63 
    63 
    64   $ hg graft -r 1 2
    64   $ hg graft -r 1 2
    65   skipping ancestor revision 2
    65   skipping ancestor revision 2:5c095ad7e90f
    66   skipping ancestor revision 1
    66   skipping ancestor revision 1:5d205f8b35b6
    67   [255]
    67   [255]
    68 
    68 
    69 Can't graft with dirty wd:
    69 Can't graft with dirty wd:
    70 
    70 
    71   $ hg up -q 0
    71   $ hg up -q 0
   130 Graft out of order, skipping a merge and a duplicate
   130 Graft out of order, skipping a merge and a duplicate
   131 (this also tests that editor is not invoked if '--edit' is not specified)
   131 (this also tests that editor is not invoked if '--edit' is not specified)
   132 
   132 
   133   $ hg graft 1 5 4 3 'merge()' 2 -n
   133   $ hg graft 1 5 4 3 'merge()' 2 -n
   134   skipping ungraftable merge revision 6
   134   skipping ungraftable merge revision 6
   135   skipping revision 2 (already grafted to 7)
   135   skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7)
   136   grafting 1:5d205f8b35b6 "1"
   136   grafting 1:5d205f8b35b6 "1"
   137   grafting 5:97f8bfe72746 "5"
   137   grafting 5:97f8bfe72746 "5"
   138   grafting 4:9c233e8e184d "4"
   138   grafting 4:9c233e8e184d "4"
   139   grafting 3:4c60f11aa304 "3"
   139   grafting 3:4c60f11aa304 "3"
   140 
   140 
   141   $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug
   141   $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug
   142   skipping ungraftable merge revision 6
   142   skipping ungraftable merge revision 6
   143   scanning for duplicate grafts
   143   scanning for duplicate grafts
   144   skipping revision 2 (already grafted to 7)
   144   skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7)
   145   grafting 1:5d205f8b35b6 "1"
   145   grafting 1:5d205f8b35b6 "1"
   146     searching for copies back to rev 1
   146     searching for copies back to rev 1
   147     unmatched files in local:
   147     unmatched files in local:
   148      b
   148      b
   149     all copies found (* = to merge, ! = divergent, % = renamed and deleted):
   149     all copies found (* = to merge, ! = divergent, % = renamed and deleted):
   211 
   211 
   212 Graft again:
   212 Graft again:
   213 
   213 
   214   $ hg graft 1 5 4 3 'merge()' 2
   214   $ hg graft 1 5 4 3 'merge()' 2
   215   skipping ungraftable merge revision 6
   215   skipping ungraftable merge revision 6
   216   skipping revision 2 (already grafted to 7)
   216   skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7)
   217   skipping revision 1 (already grafted to 8)
   217   skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e)
   218   skipping revision 5 (already grafted to 9)
   218   skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec)
   219   grafting 4:9c233e8e184d "4"
   219   grafting 4:9c233e8e184d "4"
   220   merging e
   220   merging e
   221   warning: conflicts during merge.
   221   warning: conflicts during merge.
   222   merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
   222   merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
   223   abort: unresolved conflicts, can't continue
   223   abort: unresolved conflicts, can't continue
   324   
   324   
   325   
   325   
   326 Disallow grafting an already grafted cset onto its original branch
   326 Disallow grafting an already grafted cset onto its original branch
   327   $ hg up -q 6
   327   $ hg up -q 6
   328   $ hg graft 7
   328   $ hg graft 7
   329   skipping already grafted revision 7 (was grafted from 2)
   329   skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f)
   330   [255]
   330   [255]
   331 
   331 
   332 Disallow grafting already grafted csets with the same origin onto each other
   332 Disallow grafting already grafted csets with the same origin onto each other
   333   $ hg up -q 13
   333   $ hg up -q 13
   334   $ hg graft 2
   334   $ hg graft 2
   335   skipping revision 2 (already grafted to 13)
   335   skipping revision 2:5c095ad7e90f (already grafted to 13:9db0f28fd374)
   336   [255]
   336   [255]
   337   $ hg graft 7
   337   $ hg graft 7
   338   skipping already grafted revision 7 (13 also has origin 2)
   338   skipping already grafted revision 7:ef0ef43d49e7 (13:9db0f28fd374 also has origin 2:5c095ad7e90f)
   339   [255]
   339   [255]
   340 
   340 
   341   $ hg up -q 7
   341   $ hg up -q 7
   342   $ hg graft 2
   342   $ hg graft 2
   343   skipping revision 2 (already grafted to 7)
   343   skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7)
   344   [255]
   344   [255]
   345   $ hg graft tip
   345   $ hg graft tip
   346   skipping already grafted revision 13 (7 also has origin 2)
   346   skipping already grafted revision 13:9db0f28fd374 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f)
   347   [255]
   347   [255]
   348 
   348 
   349 Graft with --log
   349 Graft with --log
   350 
   350 
   351   $ hg up -Cq 1
   351   $ hg up -Cq 1
   639   
   639   
   640 
   640 
   641 graft works on complex revset
   641 graft works on complex revset
   642 
   642 
   643   $ hg graft 'origin(13) or destination(origin(13))'
   643   $ hg graft 'origin(13) or destination(origin(13))'
   644   skipping ancestor revision 21
   644   skipping ancestor revision 21:7e61b508e709
   645   skipping ancestor revision 22
   645   skipping ancestor revision 22:1313d0a825e2
   646   skipping revision 2 (already grafted to 22)
   646   skipping revision 2:5c095ad7e90f (already grafted to 22:1313d0a825e2)
   647   grafting 7:ef0ef43d49e7 "2"
   647   grafting 7:ef0ef43d49e7 "2"
   648   grafting 13:9db0f28fd374 "2"
   648   grafting 13:9db0f28fd374 "2"
   649   grafting 19:9627f653b421 "2"
   649   grafting 19:9627f653b421 "2"
   650   merging b
   650   merging b
   651 
   651 
   652 graft with --force (still doesn't graft merges)
   652 graft with --force (still doesn't graft merges)
   653 
   653 
   654   $ hg graft 19 0 6
   654   $ hg graft 19 0 6
   655   skipping ungraftable merge revision 6
   655   skipping ungraftable merge revision 6
   656   skipping ancestor revision 0
   656   skipping ancestor revision 0:68795b066622
   657   skipping already grafted revision 19 (22 also has origin 2)
   657   skipping already grafted revision 19:9627f653b421 (22:1313d0a825e2 also has origin 2:5c095ad7e90f)
   658   [255]
   658   [255]
   659   $ hg graft 19 0 6 --force
   659   $ hg graft 19 0 6 --force
   660   skipping ungraftable merge revision 6
   660   skipping ungraftable merge revision 6
   661   grafting 19:9627f653b421 "2"
   661   grafting 19:9627f653b421 "2"
   662   merging b
   662   merging b
   668   $ hg ci -m 28
   668   $ hg ci -m 28
   669   $ hg backout 28
   669   $ hg backout 28
   670   reverting a
   670   reverting a
   671   changeset 29:484c03b8dfa4 backs out changeset 28:6c56f0f7f033
   671   changeset 29:484c03b8dfa4 backs out changeset 28:6c56f0f7f033
   672   $ hg graft 28
   672   $ hg graft 28
   673   skipping ancestor revision 28
   673   skipping ancestor revision 28:6c56f0f7f033
   674   [255]
   674   [255]
   675   $ hg graft 28 --force
   675   $ hg graft 28 --force
   676   grafting 28:6c56f0f7f033 "28"
   676   grafting 28:6c56f0f7f033 "28"
   677   merging a
   677   merging a
   678   $ cat a
   678   $ cat a
   706   $ hg up -qC 7
   706   $ hg up -qC 7
   707   $ hg tag -l -r 13 tmp
   707   $ hg tag -l -r 13 tmp
   708   $ hg --config extensions.mq= strip 2
   708   $ hg --config extensions.mq= strip 2
   709   saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-backup.hg (glob)
   709   saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-backup.hg (glob)
   710   $ hg graft tmp
   710   $ hg graft tmp
   711   skipping already grafted revision 8 (2 also has unknown origin 5c095ad7e90f871700f02dd1fa5012cb4498a2d4)
   711   skipping already grafted revision 8:9db0f28fd374 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f)
   712   [255]
   712   [255]
   713 
   713 
   714 Empty graft
   714 Empty graft
   715 
   715 
   716   $ hg up -qr 26
   716   $ hg up -qr 26