evolve: use registrar.revsetpredicate to register revset predicate functions
Now, using registrar.revsetpredicate of Mercurial directly in evolve
extension should be safe enough. because it has been available since
Mercurial 3.8, and minimum Mercurial version for evolve extension is
3.8, too.
Thistestfiletestthevarioustemplatesforprecursorsandsuccessors.Globalsetup============$.$TESTDIR/testlib/common.sh$cat>>$HGRCPATH<<EOF>[ui]>interactive=true>[phases]>publish=False>[extensions]>evolve=>[alias]>tlog=log-G-T'{node|short}\ > {if(precursors, "\n Precursors: {precursors}")}\ > {if(precursors, "\n semi-colon: {join(precursors, "; ")}")}\ > {if(successors, "\n Successors: {successors}")}\ > {if(successors, "\n semi-colon: {join(successors, "; ")}")}\ > {if(obsfate, "\n Fate: {join(obsfate, "\n Fate: ")}\n")}\n'>fatelog=log-G-T'{node|short}\n{if(obsfate, " Obsfate: {join(obsfate, "; ")}\n\n")}'>fatelogjson=log-G-T'{node|short}{obsfate|json}\n'>EOFTesttemplatesonamendedcommit================================Testsetup----------$hginit$TESTTMP/templates-local-amend$cd$TESTTMP/templates-local-amend$mkcommitROOT$mkcommitA0$echo42>>A0$HGUSER=test1hgamend-m"A1"--configdevel.default-date="1234567890 0"$HGUSER=test2hgamend-m"A2"--configdevel.default-date="987654321 0"$hglog--hidden-G@changeset:4:d004c8f274b9|tag:tip|parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|summary:A2||xchangeset:3:a468dc9b3633|/parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|obsolete:rewordedbytest2asd004c8f274b9|summary:A1||xchangeset:2:f137d23bb3e1||user:test||date:ThuJan0100:00:001970+0000||obsolete:prunedbytest1||summary:temporaryamendcommitfor471f378eab4c|||xchangeset:1:471f378eab4c|/user:test|date:ThuJan0100:00:001970+0000|obsolete:rewrittenbytest1asa468dc9b3633|summary:A0|ochangeset:0:ea207398892euser:testdate:ThuJan0100:00:001970+0000summary:ROOTChecktemplates---------------$hgup'desc(A0)'--hidden1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(471f378eab4c)(use'hg evolve'toupdatetoitssuccessor:d004c8f274b9)Precursorstemplateshouldshowcurrentrevisionasitistheworkingcopy$hgologtipod004c8f274b9(4)A2|xa468dc9b3633(3)A1|rewritten(description)asd004c8f274b9bytest2(ThuApr1904:25:212001+0000)|@471f378eab4c(1)A0rewritten(description,content)asa468dc9b3633bytest1(FriFeb1323:31:302009+0000)$hgtlogod004c8f274b9|Precursors:471f378eab4c|semi-colon:471f378eab4c|@471f378eab4c|/Successors:[d004c8f274b9]|semi-colon:[d004c8f274b9]|Fate:rewrittenasd004c8f274b9bytest1,test2|oea207398892e$hgfatelog-qod004c8f274b9||@471f378eab4c|/Obsfate:rewrittenasd004c8f274b9|oea207398892e$hgfatelogod004c8f274b9||@471f378eab4c|/Obsfate:rewrittenasd004c8f274b9bytest1,test2|oea207398892e$hgfatelog-vod004c8f274b9||@471f378eab4c|/Obsfate:rewrittenasd004c8f274b9bytest1,test2(between2001-04-1904:25+0000and2009-02-1323:31+0000)|oea207398892e(checkjson)$hglog-GT'{precursors|json}\n'o["471f378eab4c5e25f6c77f785b27c936efb22874"]||@[]|/o[]$hglog-GT'{successors|json}\n'o""||@[["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]|/o""$hgup'desc(A1)'--hidden1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(a468dc9b3633)(use'hg evolve'toupdatetoitssuccessor:d004c8f274b9)Precursorstemplateshouldshowcurrentrevisionasitistheworkingcopy$hgtlogod004c8f274b9|Precursors:a468dc9b3633|semi-colon:a468dc9b3633|@a468dc9b3633|/Successors:[d004c8f274b9]|semi-colon:[d004c8f274b9]|Fate:rewordedasd004c8f274b9bytest2|oea207398892ePrecursorstemplateshouldshowtheprecursorasweforceitsdisplaywith--hidden$hgtlog--hiddenod004c8f274b9|Precursors:a468dc9b3633|semi-colon:a468dc9b3633|@a468dc9b3633|/Precursors:471f378eab4c|semi-colon:471f378eab4c|Successors:[d004c8f274b9]|semi-colon:[d004c8f274b9]|Fate:rewordedasd004c8f274b9bytest2||xf137d23bb3e1||Fate:prunedbytest1|||x471f378eab4c|/Successors:[a468dc9b3633]|semi-colon:[a468dc9b3633]|Fate:rewrittenasa468dc9b3633bytest1|oea207398892e$hgfatelog-vod004c8f274b9||@a468dc9b3633|/Obsfate:rewordedasd004c8f274b9bytest2(at2001-04-1904:25+0000)|oea207398892e$hgup'desc(A2)'0filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgtlog@d004c8f274b9|oea207398892e$hgtlog--hidden@d004c8f274b9|Precursors:a468dc9b3633|semi-colon:a468dc9b3633|xa468dc9b3633|/Precursors:471f378eab4c|semi-colon:471f378eab4c|Successors:[d004c8f274b9]|semi-colon:[d004c8f274b9]|Fate:rewordedasd004c8f274b9bytest2||xf137d23bb3e1||Fate:prunedbytest1|||x471f378eab4c|/Successors:[a468dc9b3633]|semi-colon:[a468dc9b3633]|Fate:rewrittenasa468dc9b3633bytest1|oea207398892e$hgfatelog-v@d004c8f274b9|oea207398892e$hgfatelog-v--hidden@d004c8f274b9||xa468dc9b3633|/Obsfate:rewordedasd004c8f274b9bytest2(at2001-04-1904:25+0000)||xf137d23bb3e1||Obsfate:prunedbytest1(at2009-02-1323:31+0000)|||x471f378eab4c|/Obsfate:rewrittenasa468dc9b3633bytest1(at2009-02-1323:31+0000)|oea207398892e$hgfatelogjson--hidden@d004c8f274b9""||xa468dc9b3633[{"markers":[["a468dc9b36338b14fdb7825f55ce3df4e71517ad",["d004c8f274b9ec480a47a93c10dac5eee63adb78"],0,[["ef1","1"],["user","test2"]],[987654321.0,0],null]],"max_date":[987654321.0,0],"min_date":[987654321.0,0],"successors":["d004c8f274b9ec480a47a93c10dac5eee63adb78"],"users":["test2"],"verb":"reworded"}]|/|xf137d23bb3e1[{"markers":[["f137d23bb3e11dc1daeb6264fac9cb2433782e15",[],0,[["ef1","0"],["user","test1"]],[1234567890.0,0],["471f378eab4c5e25f6c77f785b27c936efb22874"]]],"max_date":[1234567890.0,0],"min_date":[1234567890.0,0],"successors":[],"users":["test1"],"verb":"pruned"}]|||x471f378eab4c[{"markers":[["471f378eab4c5e25f6c77f785b27c936efb22874",["a468dc9b36338b14fdb7825f55ce3df4e71517ad"],0,[["ef1","9"],["user","test1"]],[1234567890.0,0],null]],"max_date":[1234567890.0,0],"min_date":[1234567890.0,0],"successors":["a468dc9b36338b14fdb7825f55ce3df4e71517ad"],"users":["test1"],"verb":"rewritten"}]|/oea207398892e""Testtemplateswithsplittedcommit===================================$hginit$TESTTMP/templates-local-split$cd$TESTTMP/templates-local-split$mkcommitROOT$echo42>>a$echo43>>b$hgcommit-A-m"A0"addingaaddingb$hglog--hidden-G@changeset:1:471597cad322|tag:tip|user:test|date:ThuJan0100:00:001970+0000|summary:A0|ochangeset:0:ea207398892euser:testdate:ThuJan0100:00:001970+0000summary:ROOT$hgsplit-r'desc(A0)'-d"0 0"<<EOF>y>y>n>n>y>y>EOF0filesupdated,0filesmerged,2filesremoved,0filesunresolvedaddingaaddingbdiff--gita/ab/anewfilemode100644examinechangesto'a'?[Ynesfdaq?]y@@-0,0+1,1@@+42recordchange1/2to'a'?[Ynesfdaq?]ydiff--gita/bb/bnewfilemode100644examinechangesto'b'?[Ynesfdaq?]ncreatednewheadDonesplitting?[yN]ndiff--gita/bb/bnewfilemode100644examinechangesto'b'?[Ynesfdaq?]y@@-0,0+1,1@@+43recordthischangeto'b'?[Ynesfdaq?]ynomorechangetosplit$hglog--hidden-G@changeset:3:f257fde29c7a|tag:tip|user:test|date:ThuJan0100:00:001970+0000|summary:A0|ochangeset:2:337fec4d2edc|parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|summary:A0||xchangeset:1:471597cad322|/user:test|date:ThuJan0100:00:001970+0000|obsolete:splitas337fec4d2edc,f257fde29c7a|summary:A0|ochangeset:0:ea207398892euser:testdate:ThuJan0100:00:001970+0000summary:ROOTChecktemplates---------------$hgup'obsolete()'--hidden0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(471597cad322)(use'hg evolve'toupdatetoitstipmostsuccessor:337fec4d2edc,f257fde29c7a)Precursorstemplateshouldshowcurrentrevisionasitistheworkingcopy$hgtlogof257fde29c7a|Precursors:471597cad322|semi-colon:471597cad322o337fec4d2edc|Precursors:471597cad322|semi-colon:471597cad322|@471597cad322|/Successors:[337fec4d2edc,f257fde29c7a]|semi-colon:[337fec4d2edc,f257fde29c7a]|Fate:splitas337fec4d2edc,f257fde29c7a|oea207398892e$hgfatelogof257fde29c7a|o337fec4d2edc||@471597cad322|/Obsfate:splitas337fec4d2edc,f257fde29c7a|oea207398892e$hgupf257fde29c7a0filesupdated,0filesmerged,0filesremoved,0filesunresolvedPrecursorstemplateshouldnotshowaprecursorasit's not displayed in thelog $ hg tlog @ f257fde29c7a | o 337fec4d2edc | o ea207398892ePrecursors template should show the precursor as we force its display with--hidden $ hg tlog --hidden @ f257fde29c7a | Precursors: 471597cad322 | semi-colon: 471597cad322 o 337fec4d2edc | Precursors: 471597cad322 | semi-colon: 471597cad322 | x 471597cad322 |/ Successors: [337fec4d2edc, f257fde29c7a] | semi-colon: [337fec4d2edc, f257fde29c7a] | Fate: split as 337fec4d2edc, f257fde29c7a | o ea207398892e $ hg fatelog --hidden @ f257fde29c7a | o 337fec4d2edc | | x 471597cad322 |/ Obsfate: split as 337fec4d2edc, f257fde29c7a | o ea207398892e $ hg fatelogjson --hidden @ f257fde29c7a "" | o 337fec4d2edc "" | | x 471597cad322 [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["ef1", "12"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], "users": ["test"], "verb": "split"}] |/ o ea207398892e ""Test templates with folded commit==============================Test setup---------- $ hg init $TESTTMP/templates-local-fold $ cd $TESTTMP/templates-local-fold $ mkcommit ROOT $ mkcommit A0 $ mkcommit B0 $ hg log --hidden -G @ changeset: 2:0dec01379d3b | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: B0 | o changeset: 1:471f378eab4c | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOT $ hg fold --exact -r 'desc(A0)+desc(B0)' --date "0 0" -m "C0" 2 changesets folded 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --hidden -G @ changeset: 3:eb5a0daa2192 | tag: tip | parent: 0:ea207398892e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: C0 | | x changeset: 2:0dec01379d3b | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | obsolete: rewritten as eb5a0daa2192 | | summary: B0 | | | x changeset: 1:471f378eab4c |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: rewritten as eb5a0daa2192 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOTCheck templates--------------- $ hg up 'desc(A0)' --hidden 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hgevolve' to update to its successor: eb5a0daa2192)Precursors template should show current revision as it is the working copy $ hg tlog o eb5a0daa2192 | Precursors: 471f378eab4c | semi-colon: 471f378eab4c | @ 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog o eb5a0daa2192 | | @ 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg up 'desc(B0)' --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hgevolve' to update to its successor: eb5a0daa2192)Precursors template should show both precursors as they should be bothdisplayed $ hg tlog o eb5a0daa2192 | Precursors: 0dec01379d3b 471f378eab4c | semi-colon: 0dec01379d3b; 471f378eab4c | @ 0dec01379d3b | | Successors: [eb5a0daa2192] | | semi-colon: [eb5a0daa2192] | | Fate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog o eb5a0daa2192 | | @ 0dec01379d3b | | Obsfate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg up 'desc(C0)' 0 files updated, 0 files merged, 0 files removed, 0 files unresolvedPrecursors template should not show precursors as it'snotdisplayedinthelog$hgtlog@eb5a0daa2192|oea207398892ePrecursorstemplateshouldshowbothprecursorsasweforceitsdisplaywith--hidden$hgtlog--hidden@eb5a0daa2192|Precursors:0dec01379d3b471f378eab4c|semi-colon:0dec01379d3b;471f378eab4c|x0dec01379d3b||Successors:[eb5a0daa2192]||semi-colon:[eb5a0daa2192]||Fate:rewrittenaseb5a0daa2192|||x471f378eab4c|/Successors:[eb5a0daa2192]|semi-colon:[eb5a0daa2192]|Fate:rewrittenaseb5a0daa2192|oea207398892e$hgfatelog--hidden@eb5a0daa2192||x0dec01379d3b||Obsfate:rewrittenaseb5a0daa2192|||x471f378eab4c|/Obsfate:rewrittenaseb5a0daa2192|oea207398892e$hgfatelogjson--hidden@eb5a0daa2192""||x0dec01379d3b[{"markers":[["0dec01379d3be6318c470ead31b1fe7ae7cb53d5",["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"],0,[["ef1","13"],["user","test"]],[0.0,0],null]],"max_date":[0.0,0],"min_date":[0.0,0],"successors":["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"],"users":["test"],"verb":"rewritten"}]|||x471f378eab4c[{"markers":[["471f378eab4c5e25f6c77f785b27c936efb22874",["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"],0,[["ef1","9"],["user","test"]],[0.0,0],null]],"max_date":[0.0,0],"min_date":[0.0,0],"successors":["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"],"users":["test"],"verb":"rewritten"}]|/oea207398892e""Testtemplateswithdivergence==============================Testsetup----------$hginit$TESTTMP/templates-local-divergence$cd$TESTTMP/templates-local-divergence$mkcommitROOT$mkcommitA0$hgamend-m"A1"$hglog--hidden-G@changeset:2:fdf9bde5129a|tag:tip|parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|summary:A1||xchangeset:1:471f378eab4c|/user:test|date:ThuJan0100:00:001970+0000|obsolete:rewordedasfdf9bde5129a|summary:A0|ochangeset:0:ea207398892euser:testdate:ThuJan0100:00:001970+0000summary:ROOT$hgupdate--hidden'desc(A0)'0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(471f378eab4c)(use'hg evolve'toupdatetoitssuccessor:fdf9bde5129a)$hgamend-m"A2"2newcontent-divergentchangesets$hglog--hidden-G@changeset:3:65b757b745b9|tag:tip|parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|instability:content-divergent|summary:A2||ochangeset:2:fdf9bde5129a|/parent:0:ea207398892e|user:test|date:ThuJan0100:00:001970+0000|instability:content-divergent|summary:A1||xchangeset:1:471f378eab4c|/user:test|date:ThuJan0100:00:001970+0000|obsolete:rewordedasfdf9bde5129a|obsolete:rewordedas65b757b745b9|summary:A0|ochangeset:0:ea207398892euser:testdate:ThuJan0100:00:001970+0000summary:ROOT$hgamend-m'A3'Checktemplates---------------$hgup'desc(A0)'--hidden0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(471f378eab4c)(471f378eab4chasdiverged,use'hg evolve --list --contentdivergent'toresolvetheissue)Precursorstemplateshouldshowcurrentrevisionasitistheworkingcopy$hgtlogo019fadeab383|Precursors:471f378eab4c|semi-colon:471f378eab4c|ofdf9bde5129a|/Precursors:471f378eab4c|semi-colon:471f378eab4c|@471f378eab4c|/Successors:[fdf9bde5129a],[019fadeab383]|semi-colon:[fdf9bde5129a];[019fadeab383]|Fate:rewordedasfdf9bde5129a|Fate:rewordedas019fadeab383|oea207398892e$hgfatelogo019fadeab383||ofdf9bde5129a|/|@471f378eab4c|/Obsfate:rewordedasfdf9bde5129a;rewordedas019fadeab383|oea207398892e$hgup'desc(A1)'0filesupdated,0filesmerged,0filesremoved,0filesunresolvedPrecursorstemplateshouldnotshowprecursorsasit's not displayed in thelog $ hg tlog o 019fadeab383 | | @ fdf9bde5129a |/ o ea207398892e $ hg fatelog o 019fadeab383 | | @ fdf9bde5129a |/ o ea207398892ePrecursors template should a precursor as we force its display with --hidden $ hg tlog --hidden o 019fadeab383 | Precursors: 65b757b745b9 | semi-colon: 65b757b745b9 | x 65b757b745b9 |/ Precursors: 471f378eab4c | semi-colon: 471f378eab4c | Successors: [019fadeab383] | semi-colon: [019fadeab383] | Fate: reworded as 019fadeab383 | | @ fdf9bde5129a |/ Precursors: 471f378eab4c | semi-colon: 471f378eab4c | x 471f378eab4c |/ Successors: [fdf9bde5129a], [65b757b745b9] | semi-colon: [fdf9bde5129a]; [65b757b745b9] | Fate: reworded as fdf9bde5129a | Fate: reworded as 65b757b745b9 | o ea207398892e $ hg fatelog --hidden o 019fadeab383 | | x 65b757b745b9 |/ Obsfate: reworded as 019fadeab383 | | @ fdf9bde5129a |/ | x 471f378eab4c |/ Obsfate: reworded as fdf9bde5129a; reworded as 65b757b745b9 | o ea207398892e $ hg fatelogjson --hidden o 019fadeab383 "" | | x 65b757b745b9 [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], "users": ["test"], "verb": "reworded"}] |/ | @ fdf9bde5129a "" |/ | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], "users": ["test"], "verb": "reworded"}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"], "users": ["test"], "verb": "reworded"}] |/ o ea207398892e ""Test templates with amended + folded commit===========================================Test setup---------- $ hg init $TESTTMP/templates-local-amend-fold $ cd $TESTTMP/templates-local-amend-fold $ mkcommit ROOT $ mkcommit A0 $ mkcommit B0 $ hg amend -m "B1" $ hg log --hidden -G @ changeset: 3:b7ea6d14e664 | tag: tip | parent: 1:471f378eab4c | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: B1 | | x changeset: 2:0dec01379d3b |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: reworded as b7ea6d14e664 | summary: B0 | o changeset: 1:471f378eab4c | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOT $ hg fold --exact -r 'desc(A0)+desc(B1)' --date "0 0" -m "C0" 2 changesets folded 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --hidden -G @ changeset: 4:eb5a0daa2192 | tag: tip | parent: 0:ea207398892e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: C0 | | x changeset: 3:b7ea6d14e664 | | parent: 1:471f378eab4c | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | obsolete: rewritten as eb5a0daa2192 | | summary: B1 | | | | x changeset: 2:0dec01379d3b | |/ user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | obsolete: reworded as b7ea6d14e664 | | summary: B0 | | | x changeset: 1:471f378eab4c |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: rewritten as eb5a0daa2192 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOTCheck templates--------------- $ hg up 'desc(A0)' --hidden 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hgevolve' to update to its successor: eb5a0daa2192) $ hg tlog o eb5a0daa2192 | Precursors: 471f378eab4c | semi-colon: 471f378eab4c | @ 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog o eb5a0daa2192 | | @ 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg up 'desc(B0)' --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hgevolve' to update to its successor: eb5a0daa2192) $ hg tlog o eb5a0daa2192 | Precursors: 0dec01379d3b 471f378eab4c | semi-colon: 0dec01379d3b; 471f378eab4c | @ 0dec01379d3b | | Successors: [eb5a0daa2192] | | semi-colon: [eb5a0daa2192] | | Fate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog o eb5a0daa2192 | | @ 0dec01379d3b | | Obsfate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg up 'desc(B1)' --hidden 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (b7ea6d14e664) (use 'hgevolve' to update to its successor: eb5a0daa2192) $ hg tlog o eb5a0daa2192 | Precursors: 471f378eab4c b7ea6d14e664 | semi-colon: 471f378eab4c; b7ea6d14e664 | @ b7ea6d14e664 | | Successors: [eb5a0daa2192] | | semi-colon: [eb5a0daa2192] | | Fate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog o eb5a0daa2192 | | @ b7ea6d14e664 | | Obsfate: rewritten as eb5a0daa2192 | | | x 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg up 'desc(C0)' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg tlog @ eb5a0daa2192 | o ea207398892e $ hg tlog --hidden @ eb5a0daa2192 | Precursors: 471f378eab4c b7ea6d14e664 | semi-colon: 471f378eab4c; b7ea6d14e664 | x b7ea6d14e664 | | Precursors: 0dec01379d3b | | semi-colon: 0dec01379d3b | | Successors: [eb5a0daa2192] | | semi-colon: [eb5a0daa2192] | | Fate: rewritten as eb5a0daa2192 | | | | x 0dec01379d3b | |/ Successors: [b7ea6d14e664] | | semi-colon: [b7ea6d14e664] | | Fate: reworded as b7ea6d14e664 | | | x 471f378eab4c |/ Successors: [eb5a0daa2192] | semi-colon: [eb5a0daa2192] | Fate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelog --hidden @ eb5a0daa2192 | | x b7ea6d14e664 | | Obsfate: rewritten as eb5a0daa2192 | | | | x 0dec01379d3b | |/ Obsfate: reworded as b7ea6d14e664 | | | x 471f378eab4c |/ Obsfate: rewritten as eb5a0daa2192 | o ea207398892e $ hg fatelogjson --hidden @ eb5a0daa2192 "" | | x b7ea6d14e664 [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "13"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}] | | | | x 0dec01379d3b [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], "users": ["test"], "verb": "reworded"}] | |/ | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "9"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}] |/ o ea207398892e ""Test template with pushed and pulled obs markers==============================================Test setup---------- $ hg init $TESTTMP/templates-local-remote-markers-1 $ cd $TESTTMP/templates-local-remote-markers-1 $ mkcommit ROOT $ mkcommit A0 $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2 updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd $TESTTMP/templates-local-remote-markers-2 $ hg log --hidden -G @ changeset: 1:471f378eab4c | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOT $ cd $TESTTMP/templates-local-remote-markers-1 $ hg amend -m "A1" $ hg amend -m "A2" $ hg log --hidden -G @ changeset: 3:7a230b46bf61 | tag: tip | parent: 0:ea207398892e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: A2 | | x changeset: 2:fdf9bde5129a |/ parent: 0:ea207398892e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: reworded as 7a230b46bf61 | summary: A1 | | x changeset: 1:471f378eab4c |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: reworded as fdf9bde5129a | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOT $ cd $TESTTMP/templates-local-remote-markers-2 $ hg pull pulling from $TESTTMP/templates-local-remote-markers-1 searching for changes adding changesets adding manifests adding file changes added 1 changesets with 0 changes to 1 files (+1 heads) 2 new obsolescence markers obsoleted 1 changesets (run 'hgheads' to see heads, 'hgmerge' to merge) working directory parent is obsolete! (471f378eab4c) (use 'hgevolve' to update to its successor: 7a230b46bf61) $ hg log --hidden -G o changeset: 2:7a230b46bf61 | tag: tip | parent: 0:ea207398892e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: A2 | | @ changeset: 1:471f378eab4c |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | obsolete: reworded as 7a230b46bf61 | summary: A0 | o changeset: 0:ea207398892e user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOTCheck templates--------------- $ hg tlog o 7a230b46bf61 | Precursors: 471f378eab4c | semi-colon: 471f378eab4c | @ 471f378eab4c |/ Successors: [7a230b46bf61] | semi-colon: [7a230b46bf61] | Fate: reworded as 7a230b46bf61 | o ea207398892e $ hg fatelog --hidden -v o 7a230b46bf61 | | @ 471f378eab4c |/ Obsfate: reworded as 7a230b46bf61 by test (at 1970-01-01 00:00 +0000) | o ea207398892e $ hg up 'desc(A2)' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg tlog @ 7a230b46bf61 | o ea207398892e $ hg fatelog -v @ 7a230b46bf61 | o ea207398892e $ hg tlog --hidden @ 7a230b46bf61 | Precursors: 471f378eab4c | semi-colon: 471f378eab4c | x 471f378eab4c |/ Successors: [7a230b46bf61] | semi-colon: [7a230b46bf61] | Fate: reworded as 7a230b46bf61 | o ea207398892e $ hg fatelog --hidden -v @ 7a230b46bf61 | | x 471f378eab4c |/ Obsfate: reworded as 7a230b46bf61 by test (at 1970-01-01 00:00 +0000) | o ea207398892e $ hg fatelogjson --hidden @ 7a230b46bf61 "" | | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null], ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e", ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], "users": ["test"], "verb": "reworded"}] |/ o ea207398892e ""Test templates with pruned commits==================================Test setup---------- $ hg init $TESTTMP/templates-local-prune $ cd $TESTTMP/templates-local-prune $ mkcommit ROOT $ mkcommit A0 $ hg prune . 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory now at ea207398892e 1 changesets prunedCheck output------------ $ hg up "desc(A0)" --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hgevolve' to update to its parent successor) $ hg tlog @ 471f378eab4c | Fate: pruned | o ea207398892e $ hg fatelog -v @ 471f378eab4c | Obsfate: pruned by test (at 1970-01-01 00:00 +0000) | o ea207398892e