pager: add a function in compats to start pager
This will help us enabling pager when ui.pager API exists. Also we can try
plugging in the old pager API in this function and we won't have to change
anything.
$cat>>$HGRCPATH<<EOF>[defaults]>amend=-d"0 0">[extensions]>hgext.rebase=>EOF$echo"evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/">>$HGRCPATH$glog(){>hglog-G--template \>'{rev}:{node|short}@{branch}({phase}) bk:[{bookmarks}] {desc|firstline}\n'"$@">}Testevolveremovingthechangesetbeingevolved$hginitempty$cdempty$echoa>a$hgci-Amaddaa$echob>b$hgci-Amaddbb$echoa>>a$hgci-mchangea$hgbookmarkchangea$hgup11filesupdated,0filesmerged,0filesremoved,0filesunresolved(leavingbookmarkchangea)$echoa>>a$hgamend-mchangea1newunstablechangesets$hgevolve-v--confirmmove:[2]changeaatop:[4]changeaperformevolve?[Ny]nabort:evolveabortedbyuser[255]$echoy|hgevolve-v--confirm--configui.interactive=Truemove:[2]changeaatop:[4]changeaperformevolve?[Ny]yhgrebase-rcce2c55b8965-dfb9d051ec0a4resolvingmanifests$glog--hidden@4:fb9d051ec0a4@default(draft)bk:[changea]changea||x3:c5727dbded3c@default(draft)bk:[]temporaryamendcommitfor102a90ea7b4a||||x2:cce2c55b8965@default(draft)bk:[]changea||/|x1:102a90ea7b4a@default(draft)bk:[]addb|/o0:07f494440405@default(draft)bk:[]adda$hgdebugobsolete102a90ea7b4a3361e4082ed620918c261189a36afb9d051ec0a450a4aa2ffc8c324979832ef880650(*){'ef1':'*','user':'test'}(glob)c5727dbded3c3a6877cf60d6bb552a76812cb8440{102a90ea7b4a3361e4082ed620918c261189a36a}(*){'ef1':'*','user':'test'}(glob)cce2c55b896511e0b6e04173c9450ba822ebc7400{102a90ea7b4a3361e4082ed620918c261189a36a}(*){'ef1':'*','user':'test'}(glob)Testevolvewithconflict$lsab$hgpdiffadiff-r07f494440405a---a/a*(glob)+++b/a*(glob)@@-1,1+1,2@@a+a$echo'newer a'>>a$hgci-m'newer a'$hggdowngdownhavebeendeprecatedinfavorofprevious1filesupdated,0filesmerged,0filesremoved,0filesunresolved[4]changea$echo'a'>a$hgamend1newunstablechangesets$hgevolvemove:[5]neweraatop:[7]changeamergingawarning:conflictswhilemerginga!(edit,thenuse'hg resolve --mark')evolvefailed!fixconflictandrun'hg evolve --continue'oruse'hg update -C .'toabortabort:unresolvedmergeconflicts(seehghelpresolve)[255]$hgrevert-r'unstable()'a$hgdiffdiff-r66719795a494a---a/a*(glob)+++b/a*(glob)@@-1,1+1,3@@a+a+newera$hgevolve--continuegrafting5:3655f0f50885"newer a"abort:unresolvedmergeconflicts(see'hg help resolve')[255]$hgresolve-ma(nomoreunresolvedfiles)$hgevolve--continuegrafting5:3655f0f50885"newer a"Stabilizelatecomerwithdifferentparent=========================================(thesame-parentcaseishandledintest-evolve.t)$glog@8:1cf0aacfd363@default(draft)bk:[]newera|o7:66719795a494@default(draft)bk:[changea]changea|o0:07f494440405@default(draft)bk:[]addaAddanothercommit$hggdowngdownhavebeendeprecatedinfavorofprevious1filesupdated,0filesmerged,0filesremoved,0filesunresolved[7]changea$echo'c'>c$hgaddc$hgcommit-m'add c'creatednewheadGetasuccessorsof8onit$hggrab1cf0aacfd363rebasing8:1cf0aacfd363"newer a"?filesupdated,0filesmerged,0filesremoved,0filesunresolved(glob)Addrealchangetothesuccessors$echo'babar'>>a$hgamendMakeprecursorspublic$hgphase--hidden--public1cf0aacfd3631newbumpedchangesets$glog@12:(73b15c7566e9|d5c7ef82d003)@default\(draft\)bk:\[\]newera(re)|o9:7bc2f5967f5e@default(draft)bk:[]addc||o8:1cf0aacfd363@default(public)bk:[]newera|/o7:66719795a494@default(public)bk:[changea]changea|o0:07f494440405@default(public)bk:[]addaStabilize!$hgevolve--any--dry-run--phasedivergentrecreate:[12]neweraatop:[8]newerahgrebase--rev(73b15c7566e9|d5c7ef82d003)--dest66719795a494;(re)hgupdate1cf0aacfd363;hgrevert--all--rev(73b15c7566e9|d5c7ef82d003);(re)hgcommit--msg"bumped update to %s"(no-eol)$hgevolve--any--confirm--phasedivergentrecreate:[12]neweraatop:[8]neweraperformevolve?[Ny]nabort:evolveabortedbyuser[255]$echoy|hgevolve--any--confirm--configui.interactive=True--phasedivergentrecreate:[12]neweraatop:[8]neweraperformevolve?[Ny]yrebasingtodestinationparent:66719795a494computingnewdiffcommittedasc2c1151aa854workingdirectoryisnowatc2c1151aa854$glog@14:c2c1151aa854@default(draft)bk:[]bumpedupdateto1cf0aacfd363:||o9:7bc2f5967f5e@default(draft)bk:[]addc||o|8:1cf0aacfd363@default(public)bk:[]newera|/o7:66719795a494@default(public)bk:[changea]changea|o0:07f494440405@default(public)bk:[]addaStabilizedivergentchangesetswithsameparent===============================================$rma.orig$hgup7bc2f5967f5e1filesupdated,0filesmerged,0filesremoved,0filesunresolved$cat<<EOF>>a>flore>arthur>zephir>some>less>conflict>EOF$hgci-m'More addition'$glog@15:3932c176bbaa@default(draft)bk:[]Moreaddition||o14:(a7cabd7bd9c2|671b9d7eeaec)@default\(draft\)bk:\[\]bumpedupdateto1cf0aacfd363:(re)||o|9:7bc2f5967f5e@default(draft)bk:[]addc|||o8:1cf0aacfd363@default(public)bk:[]newera|/o7:66719795a494@default(public)bk:[changea]changea|o0:07f494440405@default(public)bk:[]adda$echo'babar'>>a$hgamend$hgup--hidden3932c176bbaa1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(3932c176bbaa)(use'hg evolve'toupdatetoitssuccessor:d2f173e25686)$mvaa.old$echo'jungle'>a$cata.old>>a$rma.old$hgamend2newdivergentchangesets$glog@19:eacc9c8240fe@default(draft)bk:[]Moreaddition||o17:d2f173e25686@default(draft)bk:[]Moreaddition|/|o14:(a7cabd7bd9c2|671b9d7eeaec)@default\(draft\)bk:\[\]bumpedupdateto1cf0aacfd363:(re)||o|9:7bc2f5967f5e@default(draft)bk:[]addc|||o8:1cf0aacfd363@default(public)bk:[]newera|/o7:66719795a494@default(public)bk:[changea]changea|o0:07f494440405@default(public)bk:[]addaStabilizeit$hgevolve-qn--confirm--contentdivergentmerge:[19]Moreadditionwith:[17]Moreadditionbase:[15]Moreadditionperformevolve?[Ny]nabort:evolveabortedbyuser[255]$echoy|hgevolve-qn--confirm--configui.interactive=True--contentdivergentmerge:[19]Moreadditionwith:[17]Moreadditionbase:[15]Moreadditionperformevolve?[Ny]yhgupdate-ceacc9c8240fe&&hgmerged2f173e25686&&hgcommit-m"auto merge resolving conflict between eacc9c8240fe and d2f173e25686"&&hgup-C3932c176bbaa&&hgrevert--all--revtip&&hgcommit-m"`hg log -r eacc9c8240fe --template={desc}`";$hgevolve-v--contentdivergentmerge:[19]Moreadditionwith:[17]Moreadditionbase:[15]Moreadditionmergingdivergentchangesetresolvingmanifestsmerginga0filesupdated,1filesmerged,0filesremoved,0filesunresolvedamendingchangeseteacc9c8240fecommittingfiles:acommittingmanifestcommittingchangelogcopyingchangeset283ccd10e2b8to7bc2f5967f5ecommittingfiles:acommittingmanifestcommittingchangelogcommittedchangeset21:f344982e63c4workingdirectoryisnowatf344982e63c4$hgst$glog@21:f344982e63c4@default(draft)bk:[]Moreaddition||o14:(a7cabd7bd9c2|671b9d7eeaec)@default\(draft\)bk:\[\]bumpedupdateto1cf0aacfd363:(re)||o|9:7bc2f5967f5e@default(draft)bk:[]addc|||o8:1cf0aacfd363@default(public)bk:[]newera|/o7:66719795a494@default(public)bk:[changea]changea|o0:07f494440405@default(public)bk:[]adda$hgsummaryparent:21:f344982e63c4tipMoreadditionbranch:defaultcommit:(clean)update:2newchangesets,2branchheads(merge)phases:3draft$hgexport. # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Node ID f344982e63c462b1e44c0371c804685389e673a9 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407cedMoreadditiondiff-r7bc2f5967f5e-rf344982e63c4a---a/aThuJan0100:00:001970+0000+++b/aThuJan0100:00:001970+0000@@-1,1+1,9@@+junglea+flore+arthur+zephir+some+less+conflict+babarCheckconflictduringdivergenceresolution-------------------------------------------------$hgup--hidden3932c176bbaa1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryparentisobsolete!(3932c176bbaa)(use'hg evolve'toupdatetoitssuccessor:f344982e63c4)$echo'gotta break'>>a$hgamend2newdivergentchangesets# reamend so that the case is not the first precursor.$hgamend-m"More addition (2)"$hgphase'divergent()'21:draft24:draft$hgevolve-qn--contentdivergenthgupdate-c0b336205a5d0&&hgmergef344982e63c4&&hgcommit-m"auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&&hgup-C3932c176bbaa&&hgrevert--all--revtip&&hgcommit-m"`hg log -r 0b336205a5d0 --template={desc}`";$hgevolve--contentdivergentmerge:[24]Moreaddition(2)with:[21]Moreadditionbase:[15]Moreadditionmergingawarning:conflictswhilemerginga!(edit,thenuse'hg resolve --mark')0filesupdated,0filesmerged,0filesremoved,1filesunresolveduse'hg resolve'toretryunresolvedfilemergesor'hg update -C .'toabortabort:mergeconflictbetweenseveralamendments(thisisnotautomatedyet)(/!\ Youcantry:/!\ *manualmerge+resolve=>newcsetX/!\ *hguptotheparentoftheamendedchangeset(whicharenamedWandZ)/!\ *hgrevert--all-rX/!\ *hgci-m"same message as the amended changeset"=>newcsetY/!\ *hgprune-nYWZ)[255]