Test unbundle null revision containing empty symlink
Spotted by pmezard.
%helpkeywordextension-keywordexpansioninlocalrepositoriesThisextensionexpandsRCS/CVS-likeorself-customized$Keywords$intrackedtextfilesselectedbyyourconfiguration.Keywordsareonlyexpandedinlocalrepositoriesandnotstoredinthechangehistory.Themechanismcanberegardedasaconvenienceforthecurrentuserorforarchivedistribution.Configurationisdoneinthe[keyword]and[keywordmaps]sectionsofhgrcfiles.Example:[keyword]#expandkeywordsineverypythonfileexceptthosematching"x*"**.py=x*=ignoreNote:themorespecificyouareinyourfilenamepatternsthelessyoulosespeedinhugerepos.For[keywordmaps]templatemappingandexpansiondemonstrationandcontrolrun"hg kwdemo".Anadditionaldatetemplatefilter{date|utcdate}isprovided.Thedefaulttemplatemappings(viewwith"hg kwdemo -d")canbereplacedwithcustomizedkeywordsandtemplates.Again,run"hg kwdemo"tocontroltheresultsofyourconfigchanges.Beforechanging/disablingactivekeywords,run"hg kwshrink"toavoidtheriskofinadvertedlystoringexpandedkeywordsinthechangehistory.Toforceexpansionafterenablingit,oraconfigurationchange,run"hg kwexpand".Also,whencommittingwiththerecordextensionorusingmq's qrecord, be awarethat keywords cannot be updated. Again, run "hg kwexpand" on the files inquestion to update keyword expansions after all changes have been checked in.Expansions spanning more than one line and incremental expansions,like CVS'$Log$,arenotsupported.Akeywordtemplatemap"Log = {desc}"expandstothefirstlineofthechangesetdescription.listofcommands:kwcatoutputthecurrentorgivenrevisionoffilesexpandingkeywordskwdemoprint[keywordmaps]configurationandanexpansionexamplekwexpandexpandkeywordsinworkingdirectorykwfilesprintfilescurrentlyconfiguredforkeywordexpansionkwshrinkrevertexpandedkeywordsinworkingdirectoryuse"hg -v help keyword"toshowaliasesandglobaloptions%hgkwdemo[extensions]hgext.keyword=[keyword]*=b=ignoredemo.txt=[keywordmaps]RCSFile={file|basename},vAuthor={author|user}Header={root}/{file},v{node|short}{date|utcdate}{author|user}Source={root}/{file},vDate={date|utcdate}Id={file|basename},v{node|short}{date|utcdate}{author|user}Revision={node|short}$RCSFile:demo.txt,v$$Author:test$$Header:/TMP/demo.txt,vxxxxxxxxxxxx2000/00/0000:00:00test$$Source:/TMP/demo.txt,v$$Date:2000/00/0000:00:00$$Id:demo.txt,vxxxxxxxxxxxx2000/00/0000:00:00test$$Revision:xxxxxxxxxxxx$[extensions]hgext.keyword=[keyword]*=b=ignoredemo.txt=[keywordmaps]Branch={branches}$Branch:demobranch$%kwshrinkshouldexitsilentlyinempty/invalidrepo%symlinknonexistingfile%commithookmustfailwithmissingfilecp:a:Nosuchfileordirectoryaddingsymsymrunninghookcommit.test:cpahooktestwarning:commit.testhookexitedwithstatus1%bundlenullrevisioncontainingemptysymlink1changesetsfound%pullfrombundlepullingfrom../test-keyword.hgrequestingallchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files1filesupdated,0filesmerged,0filesremoved,0filesunresolved%catexpand$Id$donotprocess$Id:xxx$expand$Id$donotprocess$Id:xxx$ignore$Id$%addremoveaddingaaddingb%statusAaAb%defaultkeywordexpansionincludingcommithook%interruptedcommitshouldnotchangestateorruncommithookabtransactionabort!rollbackcompletedabort:emptycommitmessage%statusAaAb%commitaboverwritingaexpandingkeywordsrunninghookcommit.test:cpahooktest%status?hooktest%identifycecf1e2cc3d3%catexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$expand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$ignore$Id$%hgkwcatexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$ignore$Id$a%diffahooktest%removingcommithookfromconfig%touch%status%update3filesupdated,0filesmerged,0filesremoved,0filesunresolved%catexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$expand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$ignore$Id$%checkwhetherexpansionisfilewise%commitcaddingc%forceexpansionoverwritingaexpandingkeywordsoverwritingcexpandingkeywords%comparechangenodesinacexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$$Id:c,vc033759cd8fd1970/01/0100:00:02user$testsfordifferentchangenodes%qinit-c%qimport%qcommit%keywordsshouldnotbeexpandedinpatch#HGchangesetpatch#UserUserName<user@example.com>#Date20#NodeIDc033759cd8fd162b7863dc4e5d1eea433603880f#Parentcecf1e2cc3d3447fcc20dd4eac5c4faa8a615df3cndiffdiff-rcecf1e2cc3d3-rc033759cd8fdc---/dev/nullThuJan0100:00:001970+0000+++b/cThuJan0100:00:021970+0000@@-0,0+1,2@@+$Id$+testsfordifferentchangenodes%qpopPatchqueuenowempty%qgoto-shouldimplyqpushapplyingmqtest.diffNowat:mqtest.diff%cat$Id:c,vc033759cd8fd1970/01/0100:00:02user$testsfordifferentchangenodes%qpopandmoveonPatchqueuenowempty%copy%kwfilesaddedac%commitcc:copya:0045e12f6c5791aac80ca6cbfd97709a88307292overwritingcexpandingkeywords%catacexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$expand$Id:c,v1fed52d26fd01970/01/0100:00:02user$donotprocess$Id:xxx$%touchcopiedcafter1second%status%kwfilesac%diff--revdiff-rcecf1e2cc3d3c---/dev/nullThuJan0100:00:001970+0000@@-0,0+1,3@@+expand$Id$+donotprocess$Id:+xxx$%rollbackrollingbacklasttransaction%statusAc%update-C0filesupdated,0filesmerged,1filesremoved,0filesunresolved%customkeywordexpansion%trywithkwdemo[extensions]hgext.keyword=[keyword]*=b=ignoredemo.txt=[keywordmaps]Xinfo={author}:{desc}$Xinfo:test:hgkeywordconfigandexpansionexample$%catexpand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$expand$Id:a,vcecf1e2cc3d31970/01/0100:00:01user$donotprocess$Id:xxx$ignore$Id$%hgkwcatexpand$Id:acecf1e2cc3d3Thu,01Jan197000:00:01+0000user$donotprocess$Id:xxx$ignore$Id$a%interruptedcommitshouldnotchangestatetransactionabort!rollbackcompletedabort:emptycommitmessage%statusMa?log%commitaoverwritingaexpandingkeywords%status%catexpand$Id:aa576e5647736Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$expand$Id:aa576e5647736Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$%hgkwcatexpand$Id:aa576e5647736Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$a%remove%status%rollbackrollingbacklasttransaction%statusRa%reverta%cataexpand$Id:aa576e5647736Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$%clonetotestincomingrequestingallchangesaddingchangesetsaddingmanifestsaddingfilechangesadded2changesetswith3changesto3files3filesupdated,0filesmerged,0filesremoved,0filesunresolved%incomingcomparingwithtest-keyword/Testsearchingforchangeschangeset:2:a576e5647736tag:tipuser:UserName<user@example.com>date:ThuJan0100:00:031970+0000summary:firstline%commitrejecttestaoverwritingaexpandingkeywords%export%importapplying../rejecttest.diff%catexpand$Id:a97b8d4afd122Thu,01Jan197000:00:04+0000user$rejecttestdonotprocess$Id:rejecttestxxx$$Xinfo:UserName<user@example.com>:rejects?$expand$Id:a97b8d4afd122Thu,01Jan197000:00:04+0000user$rejecttestdonotprocess$Id:rejecttestxxx$$Xinfo:UserName<user@example.com>:rejects?$ignore$Id$%rollbackrollingbacklasttransaction%cleanupdate1filesupdated,0filesmerged,0filesremoved,0filesunresolved%kwexpand/kwshrinkonselectedfiles%copyax/a%kwexpandaoverwritingaexpandingkeywords%kwexpandx/ashouldabortabort:outstandinguncommittedchangesingivenfilesx/ax/a:copya:779c764182ce5d43e2b1eb66ce06d7b47bfe342eoverwritingx/aexpandingkeywords%cataexpand$Id:x/a6ae8e7fbf16cThu,01Jan197000:00:04+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:xa$%kwshrinkainsidedirectoryxoverwritingx/ashrinkingkeywords%cataexpand$Id$donotprocess$Id:xxx$$Xinfo$%kwexpandnonexistentnonexistent:Nosuchfileordirectory%kwshrinkwithunknownfileuoverwritingashrinkingkeywordsoverwritingx/ashrinkingkeywords%catexpand$Id$donotprocess$Id:xxx$$Xinfo$expand$Id$donotprocess$Id:xxx$$Xinfo$ignore$Id$%hgkwcatexpand$Id:aa576e5647736Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$a