topic: use self instead of repo in topicrepo methods
Referring to repo here was somehow preventing it from being garbage-collected
(important in hgweb, where currently every request gets a new repo).
Testforthegrabcommand$cat>>$HGRCPATH<<EOF>[alias]>glog=log-G-T"{rev}:{node|short}{desc}\n">[extensions]>EOF$echo"evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/">>$HGRCPATH$mkcommit(){>echo"$1">"$1">hgadd"$1">hgci-m"add $1">}$hginitrepo$cdrepo$hghelpgrabhggrab[-r]revgrabsacommit,moveitonthetopofworkingdirectoryparentandupdatestoit.options:-r--revVALUErevisiontograb-c--continuecontinueinterruptedgrab-a--abortabortinterruptedgrab(somedetailshidden,use--verbosetoshowcompletehelp)$mkcommita$mkcommitb$mkcommitc$hgglog@2:4538525df7e2addc|o1:7c3bad9141dcaddb|o0:1f0dee641bb7addaGrabbinganancestor$hggrab-r7c3bad9141dcabort:cannotgrabanancestorrevision[255]Grabbingtheworkingdirectoryparent$hggrab-r.abort:cannotgrabanancestorrevision[255]Specifyingmultiplerevisionstograb$hggrab1f0dee641bb7-r7c3bad9141dcabort:specifyjustonerevision[255]Specifyingnorevisionstograb$hggrababort:emptyrevisionset[255]Continuingwithoutinterruptedgrab$hggrab--continueabort:nointerruptedgrabstateexists[255]Abortingwithoutinterruptedgrab$hggrab--abortabort:nointerruptedgrabstateexists[255]Specifyingbothcontinueandrevs$hgup1f0dee641bb70filesupdated,0filesmerged,2filesremoved,0filesunresolved$hggrab-r4538525df7e2--continueabort:cannotspecifyboth--continueandrevision[255]Makingnewbranchheads$mkcommitxcreatednewhead$mkcommity$hgglog@4:d46dc301d92faddy|o3:8e224524cd09addx||o2:4538525df7e2addc|||o1:7c3bad9141dcaddb|/o0:1f0dee641bb7addaGrabbingarevision$hggrab7c3bad9141dcgrabbing1:7c3bad9141dc"add b"1neworphanchangesets$hgglog@5:7c15c05db6faaddb|o4:d46dc301d92faddy|o3:8e224524cd09addx||*2:4538525df7e2addc|||x1:7c3bad9141dcaddb|/o0:1f0dee641bb7addaWhengrabdoesnotcreateanychanges$hggraft-r4538525df7e2grafting2:4538525df7e2"add c"$hgglog@6:c4636a81ebebaddc|o5:7c15c05db6faaddb|o4:d46dc301d92faddy|o3:8e224524cd09addx||*2:4538525df7e2addc|||x1:7c3bad9141dcaddb|/o0:1f0dee641bb7adda$hggrab-r4538525df7e2grabbing2:4538525df7e2"add c"note:grabof2:4538525df7e2creatednochangestocommit$hgglog@6:c4636a81ebebaddc|o5:7c15c05db6faaddb|o4:d46dc301d92faddy|o3:8e224524cd09addx|o0:1f0dee641bb7addainterruptedgrab$hgupd46dc301d92f0filesupdated,0filesmerged,2filesremoved,0filesunresolved$echofoo>c$hgci-Aqm"foo to c"$hggrab-rc4636a81ebebgrabbing6:c4636a81ebeb"add c"mergingcwarning:conflictswhilemergingc!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(seehghelpresolve)[1]$echofoobar>c$hgresolve--all--mark(nomoreunresolvedfiles)continue:hggrab--continue$hggrab--continue$hgglog@8:44e155eb95c7addc|o7:2ccc03d1d096footoc||o5:7c15c05db6faaddb|/o4:d46dc301d92faddy|o3:8e224524cd09addx|o0:1f0dee641bb7addaWheninterruptedgrabresultsinnochangestocommit$hgupd46dc301d92f0filesupdated,0filesmerged,1filesremoved,0filesunresolved$echobar>c$hgaddc$hgci-m"foo to c"creatednewhead$hgup44e155eb95c71filesupdated,0filesmerged,0filesremoved,0filesunresolved$hggrab4e04628911f6grabbing9:4e04628911f6"foo to c"mergingcwarning:conflictswhilemergingc!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(seehghelpresolve)[1]$echofoobar>c$hgresolve-m(nomoreunresolvedfiles)continue:hggrab--continue$hggrab--continuenote:grabof9:4e04628911f6creatednochangestocommitTestingtheabortfunctionalityofhggrab$echofoo>b$hgci-Aqm"foo to b"$hgglog-r.^::@10:c437988de89ffootob|o8:44e155eb95c7addc|~$hggrab-r7c15c05db6fagrabbing5:7c15c05db6fa"add b"mergingbwarning:conflictswhilemergingb!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(seehghelpresolve)[1]$hggrab--abortabortinggrab,updatingtoc437988de89f$hgglog@10:c437988de89ffootob|o8:44e155eb95c7addc|o7:2ccc03d1d096footoc||o5:7c15c05db6faaddb|/o4:d46dc301d92faddy|o3:8e224524cd09addx|o0:1f0dee641bb7addaTryingtograbapublicchangeset$hgphase-r7c15c05db6fa-p$hggrab-r7c15c05db6faabort:cannotgrabpublicchangesets:7c15c05db6fa(see'hg help phases'fordetails)[255]$hgglog@10:c437988de89ffootob|o8:44e155eb95c7addc|o7:2ccc03d1d096footoc||o5:7c15c05db6faaddb|/o4:d46dc301d92faddy|o3:8e224524cd09addx|o0:1f0dee641bb7addaCheckingphasepreservationwhilegrabbingsecretchangesetIncaseofmergeconflicts$hgphase-r7c15c05db6fa-s-f$hggrab-r7c15c05db6fagrabbing5:7c15c05db6fa"add b"mergingbwarning:conflictswhilemergingb!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(seehghelpresolve)[1]$echobar>b$hgresolve-m(nomoreunresolvedfiles)continue:hggrab--continue$hggrab--continue$hgphase-r.11:secretNomergeconflicts$hgupd46dc301d92f0filesupdated,0filesmerged,3filesremoved,0filesunresolved$echofoo>l$hgaddl$hgci-qm"added l"--secret$hgphase-r.12:secret$hgglog@12:508d572e7053addedl||o11:10427de9e26eaddb|||o10:c437988de89ffootob|||o8:44e155eb95c7addc|||o7:2ccc03d1d096footoc|/o4:d46dc301d92faddy|o3:8e224524cd09addx|o0:1f0dee641bb7adda$hgup10427de9e26e3filesupdated,0filesmerged,1filesremoved,0filesunresolved$hggrab-r508d572e7053grabbing12:508d572e7053"added l"$hgphase-r.13:secret