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.
$."$TESTDIR/testlib/topic_setup.sh"$hginitjungle$cdjungle$cat<<EOF>>.hg/hgrc>[extensions]>rebase=>histedit=>[phases]>publish=false>EOF$cat<<EOF>>$HGRCPATH>[ui]>logtemplate='{rev} ({topics}) {desc}\n'>EOF$forxinalphabetagammadelta;do>echofile$x>>$x>hgadd$x>hgci-m"c_$x">doneTestNGTipfeature==================Simplelinearcase$echobabar>>jungle$hgaddjungle$hgci-telephant-mbabaractivetopic'elephant'grewitsfirstchangeset$hglog-G@4(elephant)babar|o3()c_delta|o2()c_gamma|o1()c_beta|o0()c_alpha$hglog-r'ngtip(.)'3()c_delta$hglog-r'default'3()c_deltamultipleheadswithtopic$hgup"desc('c_beta')"0filesupdated,0filesmerged,3filesremoved,0filesunresolved$echozephir>>jungle$hgaddjungle$hgci-tmonkey-mzephiractivetopic'monkey'grewitsfirstchangeset$hglog-G@5(monkey)zephir||o4(elephant)babar|||o3()c_delta|||o2()c_gamma|/o1()c_beta|o0()c_alpha$hglog-r'ngtip(.)'3()c_delta$hglog-r'default'3()c_deltaoneoftheheadisavalidtip$hgup"desc('c_delta')"2filesupdated,0filesmerged,1filesremoved,0filesunresolved$echoepsilon>>epsilon$hgaddepsilon$hgci-m"c_epsilon"$hglog-G@6()c_epsilon||o5(monkey)zephir||+---o4(elephant)babar||o|3()c_delta||o|2()c_gamma|/o1()c_beta|o0()c_alpha$hglog-r'ngtip(.)'6()c_epsilon$hglog-r'default'6()c_epsilonrebasedestination==================rebaseonbranchngtip$hgupelephantswitchingtotopicelephant1filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgrebaserebasing4:cb7ae72f4a80"babar"switchingtotopicelephant$hglog-G@7(elephant)babar|o6()c_epsilon||o5(monkey)zephir||o|3()c_delta||o|2()c_gamma|/o1()c_beta|o0()c_alpha$hgupmonkeyswitchingtotopicmonkey1filesupdated,0filesmerged,3filesremoved,0filesunresolved$hgrebaserebasing5:d832ddc604ec"zephir"switchingtotopicmonkey$hglog-G@8(monkey)zephir||o7(elephant)babar|/o6()c_epsilon|o3()c_delta|o2()c_gamma|o1()c_beta|o0()c_alphaRebaseonothertopicheadsifany$hgup'desc(c_delta)'0filesupdated,0filesmerged,2filesremoved,0filesunresolved$echo"General Huc">>monkeyville$hgaddmonkeyville$hgci-tmonkey-mHuc$hglog-G@9(monkey)Huc||o8(monkey)zephir||||o7(elephant)babar||/|o6()c_epsilon|/o3()c_delta|o2()c_gamma|o1()c_beta|o0()c_alpha$hgrebaserebasing9:d79a104e2902"Huc"(tip)$hglog-G@10(monkey)Huc|o8(monkey)zephir||o7(elephant)babar|/o6()c_epsilon|o3()c_delta|o2()c_gamma|o1()c_beta|o0()c_alphamergedestination=================$hgup'ngtip(default)'0filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgupdefault0filesupdated,0filesmerged,0filesremoved,0filesunresolved$echozeta>>zeta$hgaddzeta$hgci-m"c_zeta"$hglog-G@11()c_zeta||o10(monkey)Huc|||o8(monkey)zephir|/|o7(elephant)babar|/o6()c_epsilon|o3()c_delta|o2()c_gamma|o1()c_beta|o0()c_alpha$hgupelephantswitchingtotopicelephant1filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgrebase-d'desc(c_zeta)'#makesuretipiselsewhererebasing7:8d0b77140b05"babar"switchingtotopicelephant$hgupmonkeyswitchingtotopicmonkey2filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgmerge1filesupdated,0filesmerged,0filesremoved,0filesunresolved(branchmerge,don't forget to commit) $ hg topic elephant * monkey $ hg ci -m 'mergewithdefault' $ hg topic elephant * monkey $ hg log -G @ 13 (monkey) merge with default |\ | | o 12 (elephant) babar | |/ | o 11 () c_zeta | | o | 10 (monkey) Huc | | o | 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alphaCheck pull --rebase-------------------(we broke it a some point) $ cd .. $ hg clone jungle other --rev '2' adding changesets adding manifests adding file changes added 3 changesets with 3 changes to 3 files updating to branch default 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd other $ echo other > other $ hg add other $ hg ci -m 'c_other' $ hg pull -r default --rebase pulling from $TESTTMP/jungle (glob) searching for changes adding changesets adding manifests adding file changes added 3 changesets with 3 changes to 3 files (+1 heads) rebasing 3:dbc48dd9e743 "c_other" $ hg log -G @ 7 () c_other | o 6 () c_zeta | o 5 () c_epsilon | o 4 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alpha $ cd ../jungleDefault destination for update===============================initial setup $ hg up elephant switching to topic elephant 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo arthur >> jungle $ hg ci -m arthur $ echo pompadour >> jungle $ hg ci -m pompadour $ hg up 'roots(all())' 0 files updated, 0 files merged, 6 files removed, 0 files unresolved $ hg log -G o 15 (elephant) pompadour | o 14 (elephant) arthur | | o 13 (monkey) merge with default | |\ o---+ 12 (elephant) babar / / | o 11 () c_zeta | | o | 10 (monkey) Huc | | o | 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | @ 0 () c_alphatesting default destination on a branch $ hg up 5 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log -G o 15 (elephant) pompadour | o 14 (elephant) arthur | | o 13 (monkey) merge with default | |\ o---+ 12 (elephant) babar / / | @ 11 () c_zeta | | o | 10 (monkey) Huc | | o | 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alphaextra setup for topic(making sure tip is not the topic) $ hg up 'desc(c_zeta)' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo 'eta' >> 'eta' $ hg add 'eta' $ hg commit -m 'c_eta' $ hg log -G @ 16 () c_eta | | o 15 (elephant) pompadour | | | o 14 (elephant) arthur | | +---o 13 (monkey) merge with default | | | | o | 12 (elephant) babar |/ / o | 11 () c_zeta | | | o 10 (monkey) Huc | | | o 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alphaTesting default destination for topic $ hg up 'roots(topic(elephant))' switching to topic elephant 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg up 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log -G o 16 () c_eta | | @ 15 (elephant) pompadour | | | o 14 (elephant) arthur | | +---o 13 (monkey) merge with default | | | | o | 12 (elephant) babar |/ / o | 11 () c_zeta | | | o 10 (monkey) Huc | | | o 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alphaTesting default destination for topic $ hg up 'p1(roots(topic(elephant)))' 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg topic elephant marked working directory as topic: elephant $ hg up 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log -G o 16 () c_eta | | @ 15 (elephant) pompadour | | | o 14 (elephant) arthur | | +---o 13 (monkey) merge with default | | | | o | 12 (elephant) babar |/ / o | 11 () c_zeta | | | o 10 (monkey) Huc | | | o 8 (monkey) zephir |/ o 6 () c_epsilon | o 3 () c_delta | o 2 () c_gamma | o 1 () c_beta | o 0 () c_alphaDefault destination for histedit================================By default histedit should edit with the current topic only(even when based on other draft $ hg phase 'desc(c_zeta)' 11: draft $ HGEDITOR=cat hg histedit | grep pick pick e44744d9ad73 12 babar pick 38eea8439aee 14 arthur pick 411315c48bdc 15 pompadour # p, pick = use commit