tests/test-evolve.t
branchstable
changeset 499 a9c27df23129
parent 492 7ecd41520dae
child 549 b047e9417d96
equal deleted inserted replaced
476:f17a0f801e0b 499:a9c27df23129
    13   > unified = 0
    13   > unified = 0
    14   > [extensions]
    14   > [extensions]
    15   > hgext.rebase=
    15   > hgext.rebase=
    16   > hgext.graphlog=
    16   > hgext.graphlog=
    17   > EOF
    17   > EOF
    18   $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
       
    19   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
    18   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
    20   $ mkcommit() {
    19   $ mkcommit() {
    21   >    echo "$1" > "$1"
    20   >    echo "$1" > "$1"
    22   >    hg add "$1"
    21   >    hg add "$1"
    23   >    hg ci -m "add $1"
    22   >    hg ci -m "add $1"
    57 test kill and immutable changeset
    56 test kill and immutable changeset
    58 
    57 
    59   $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
    58   $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
    60   1 public stable
    59   1 public stable
    61   $ hg kill 1
    60   $ hg kill 1
    62   cannot kill immutable changeset 7c3bad9141dc
    61   abort: Cannot obsolete immutable changeset: 7c3bad9141dc
       
    62   [255]
    63   $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
    63   $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
    64   1 public stable
    64   1 public stable
    65 
    65 
    66 test simple kill
    66 test simple kill
    67 
    67 
   243   $ hg amend -c 2
   243   $ hg amend -c 2
   244   abort: cannot amend non ancestor changeset
   244   abort: cannot amend non ancestor changeset
   245   [255]
   245   [255]
   246 
   246 
   247   $ hg amend --note 'french looks better'
   247   $ hg amend --note 'french looks better'
   248   1 new unstables changesets
   248   1 new unstable changesets
   249   $ hg log
   249   $ hg log
   250   6	feature-A: a nifty feature - test
   250   6	feature-A: a nifty feature - test
   251   4	feature-B: another feature - test
   251   4	feature-B: another feature - test
   252   1	: a nifty feature - test
   252   1	: a nifty feature - test
   253   0	: base - test
   253   0	: base - test
   254   $ hg up -q 0
   254   $ hg up -q 0
   255   $ glog --hidden
   255   $ glog --hidden
   256   o  6:23409eba69a0@default(draft) a nifty feature
   256   o  6:23409eba69a0@default(draft) a nifty feature
   257   |
   257   |
   258   | o  5:e416e48b2742@default(secret) french looks better
   258   | x  5:e416e48b2742@default(draft) french looks better
   259   | |
   259   | |
   260   | | o  4:f8111a076f09@default(draft) another feature
   260   | | o  4:f8111a076f09@default(draft) another feature
   261   | |/
   261   | |/
   262   | | o  3:524e478d4811@default(secret) fix spelling of Zwei
   262   | | x  3:524e478d4811@default(draft) fix spelling of Zwei
   263   | | |
   263   | | |
   264   | | o  2:7b36850622b2@default(secret) another feature
   264   | | x  2:7b36850622b2@default(draft) another feature
   265   | |/
   265   | |/
   266   | o  1:568a468b60fc@default(draft) a nifty feature
   266   | x  1:568a468b60fc@default(draft) a nifty feature
   267   |/
   267   |/
   268   @  0:e55e0562ee93@default(public) base
   268   @  0:e55e0562ee93@default(public) base
   269   
   269   
   270   $ hg debugsuccessors
   270   $ hg debugobsolete
   271   524e478d4811 f8111a076f09
   271   524e478d4811d405c8771e4c441de4483bdf8b33 f8111a076f0975cbecb336e2bd3411be22b673fb 0 {'date': '* *', 'user': 'test'} (glob)
   272   568a468b60fc 23409eba69a0
   272   7b36850622b2fd159fa30a4fb2a1edd2043b4a14 f8111a076f0975cbecb336e2bd3411be22b673fb 0 {'date': '* *', 'user': 'test'} (glob)
   273   7b36850622b2 f8111a076f09
   273   e416e48b27428695d00c2a2cc4a0b9619482e63f 23409eba69a0986e90cd42252852c1e6da97af5b 0 {'date': '* *', 'user': 'test'} (glob)
   274   e416e48b2742 23409eba69a0
   274   568a468b60fc99a42d5d4ddbe181caff1eef308d 23409eba69a0986e90cd42252852c1e6da97af5b 0 {'date': '* *', 'user': 'test'} (glob)
   275   $ hg stabilize
   275   $ hg evolve
   276   move:[4] another feature
   276   move:[4] another feature
   277   atop:[6] a nifty feature
   277   atop:[6] a nifty feature
   278   merging main-file-1
   278   merging main-file-1
   279   $ hg log
   279   $ hg log
   280   7	feature-B: another feature - test
   280   7	feature-B: another feature - test
   297   0	: base - test
   297   0	: base - test
   298 
   298 
   299 phase change turning obsolete changeset public issue a latecomer warning
   299 phase change turning obsolete changeset public issue a latecomer warning
   300 
   300 
   301   $ hg phase --public 7
   301   $ hg phase --public 7
   302   1 new latecomers changesets
   302   1 new latecomer changesets
       
   303 
       
   304 all solving latecomer troubled
       
   305 
       
   306   $ hg glog
       
   307   @  8	feature-B: another feature that rox - test
       
   308   |
       
   309   | o  7	: another feature - test
       
   310   |/
       
   311   o  6	feature-A: a nifty feature - test
       
   312   |
       
   313   o  0	: base - test
       
   314   
       
   315   $ hg evolve --any --traceback
       
   316   recreate:[8] another feature that rox
       
   317   atop:[7] another feature
       
   318   computing new diff
       
   319   commited as 8d77fa12ab0c
       
   320   $ hg glog
       
   321   @  9	feature-B: latecomer update to 5f4744038ed5: - test
       
   322   |
       
   323   o  7	: another feature - test
       
   324   |
       
   325   o  6	feature-A: a nifty feature - test
       
   326   |
       
   327   o  0	: base - test
       
   328   
       
   329   $ hg diff -r 9 -r 8
       
   330   $ hg diff -r 9^ -r 9
       
   331   diff --git a/main-file-1 b/main-file-1
       
   332   --- a/main-file-1
       
   333   +++ b/main-file-1
       
   334   @@ -3,1 +3,1 @@
       
   335   -Zwei
       
   336   +deux
       
   337   $ hg log -r 'latecomer()' # no more latecomer
   303 
   338 
   304   $ cd ..
   339   $ cd ..
   305 
   340 
   306 enable general delta
   341 enable general delta
   307 
   342 
   403   | |
   438   | |
   404   | o  1:73d38bb17fd7@default(draft) add 1
   439   | o  1:73d38bb17fd7@default(draft) add 1
   405   |/
   440   |/
   406   o  0:8685c6d34325@default(draft) add 0
   441   o  0:8685c6d34325@default(draft) add 0
   407   
   442   
   408   $ hg graft 3 -O
   443   $ hg graft -r3 -O
   409   grafting revision 3
   444   grafting revision 3
   410   $ hg graft 1 -o 2
   445   $ hg graft -r1 -o 2
   411   grafting revision 1
   446   grafting revision 1
   412   $ glog --hidden
   447   $ glog --hidden
   413   @  6:acb28cd497b7@default(draft) add 1
   448   @  6:acb28cd497b7@default(draft) add 1
   414   |
   449   |
   415   o  5:0b9e50c35132@default(draft) add 3
   450   o  5:0b9e50c35132@default(draft) add 3
   416   |
   451   |
   417   o  4:ce341209337f@default(draft) add 4
   452   o  4:ce341209337f@default(draft) add 4
   418   |
   453   |
   419   | o  3:0e84df4912da@default(secret) add 3
   454   | x  3:0e84df4912da@default(draft) add 3
   420   | |
   455   | |
   421   | o  2:db038628b9e5@default(secret) add 2
   456   | x  2:db038628b9e5@default(draft) add 2
   422   | |
   457   | |
   423   | o  1:73d38bb17fd7@default(draft) add 1
   458   | o  1:73d38bb17fd7@default(draft) add 1
   424   |/
   459   |/
   425   o  0:8685c6d34325@default(draft) add 0
   460   o  0:8685c6d34325@default(draft) add 0
   426   
   461   
   427   $ hg debugsuccessors
   462   $ hg debugobsolete
   428   0e84df4912da 0b9e50c35132
   463   0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 0b9e50c35132ff548ec0065caea6a87e1ebcef32 0 {'date': '* *', 'user': 'test'} (glob)
   429   db038628b9e5 acb28cd497b7
   464   db038628b9e56f51a454c0da0c508df247b41748 acb28cd497b7f8767e01ef70f68697a959573c2d 0 {'date': '* *', 'user': 'test'} (glob)
   430 
   465 
   431 Test graft --continue
   466 Test graft --continue
   432 
   467 
   433   $ hg up -qC 0
   468   $ hg up -qC 0
   434   $ echo 2 > 1
   469   $ echo 2 > 1
   450   $ hg graft --continue -O
   485   $ hg graft --continue -O
   451   grafting revision 7
   486   grafting revision 7
   452   $ glog --hidden
   487   $ glog --hidden
   453   @  8:920e58bb443b@default(draft) conflict
   488   @  8:920e58bb443b@default(draft) conflict
   454   |
   489   |
   455   | o  7:a5bfd90a2f29@default(secret) conflict
   490   | x  7:a5bfd90a2f29@default(draft) conflict
   456   | |
   491   | |
   457   o |  6:acb28cd497b7@default(draft) add 1
   492   o |  6:acb28cd497b7@default(draft) add 1
   458   | |
   493   | |
   459   o |  5:0b9e50c35132@default(draft) add 3
   494   o |  5:0b9e50c35132@default(draft) add 3
   460   | |
   495   | |
   461   o |  4:ce341209337f@default(draft) add 4
   496   o |  4:ce341209337f@default(draft) add 4
   462   |/
   497   |/
   463   | o  3:0e84df4912da@default(secret) add 3
   498   | x  3:0e84df4912da@default(draft) add 3
   464   | |
   499   | |
   465   | o  2:db038628b9e5@default(secret) add 2
   500   | x  2:db038628b9e5@default(draft) add 2
   466   | |
   501   | |
   467   | o  1:73d38bb17fd7@default(draft) add 1
   502   | o  1:73d38bb17fd7@default(draft) add 1
   468   |/
   503   |/
   469   o  0:8685c6d34325@default(draft) add 0
   504   o  0:8685c6d34325@default(draft) add 0
   470   
   505   
   471   $ hg debugsuccessors
   506   $ hg debugobsolete
   472   0e84df4912da 0b9e50c35132
   507   0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 0b9e50c35132ff548ec0065caea6a87e1ebcef32 0 {'date': '* *', 'user': 'test'} (glob)
   473   a5bfd90a2f29 920e58bb443b
   508   db038628b9e56f51a454c0da0c508df247b41748 acb28cd497b7f8767e01ef70f68697a959573c2d 0 {'date': '* *', 'user': 'test'} (glob)
   474   db038628b9e5 acb28cd497b7
   509   a5bfd90a2f29c7ccb8f917ff4e5013a9053d0a04 920e58bb443b73eea9d6d65570b4241051ea3229 0 {'date': '* *', 'user': 'test'} (glob)
   475 
   510 
   476   $ cd ..
   511 Test touch
   477 
   512 
       
   513   $ glog
       
   514   @  8:920e58bb443b@default(draft) conflict
       
   515   |
       
   516   o  6:acb28cd497b7@default(draft) add 1
       
   517   |
       
   518   o  5:0b9e50c35132@default(draft) add 3
       
   519   |
       
   520   o  4:ce341209337f@default(draft) add 4
       
   521   |
       
   522   | o  1:73d38bb17fd7@default(draft) add 1
       
   523   |/
       
   524   o  0:8685c6d34325@default(draft) add 0
       
   525   
       
   526   $ hg touch
       
   527   $ glog
       
   528   @  9:*@default(draft) conflict (glob)
       
   529   |
       
   530   o  6:acb28cd497b7@default(draft) add 1
       
   531   |
       
   532   o  5:0b9e50c35132@default(draft) add 3
       
   533   |
       
   534   o  4:ce341209337f@default(draft) add 4
       
   535   |
       
   536   | o  1:73d38bb17fd7@default(draft) add 1
       
   537   |/
       
   538   o  0:8685c6d34325@default(draft) add 0
       
   539   
       
   540   $ hg touch .
       
   541   $ glog
       
   542   @  10:*@default(draft) conflict (glob)
       
   543   |
       
   544   o  6:acb28cd497b7@default(draft) add 1
       
   545   |
       
   546   o  5:0b9e50c35132@default(draft) add 3
       
   547   |
       
   548   o  4:ce341209337f@default(draft) add 4
       
   549   |
       
   550   | o  1:73d38bb17fd7@default(draft) add 1
       
   551   |/
       
   552   o  0:8685c6d34325@default(draft) add 0
       
   553   
       
   554 
       
   555 Test fold
       
   556 
       
   557   $ hg fold 6::10
       
   558   2 changesets folded
       
   559   $ glog
       
   560   @  11:*@default(draft) add 1 (glob)
       
   561   |
       
   562   o  5:0b9e50c35132@default(draft) add 3
       
   563   |
       
   564   o  4:ce341209337f@default(draft) add 4
       
   565   |
       
   566   | o  1:73d38bb17fd7@default(draft) add 1
       
   567   |/
       
   568   o  0:8685c6d34325@default(draft) add 0
       
   569   
       
   570   $ hg log -r 11 --template '{desc}\n'
       
   571   add 1
       
   572   
       
   573   ***
       
   574   
       
   575   conflict
       
   576 
       
   577 Test olog
       
   578 
       
   579   $ hg olog
       
   580   6	: add 1 - test
       
   581   10	: conflict - test