(0.9.2compat) expand keywords in raw web output, and other changes from default branch
Comment out import related tests, as not always available.
%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.Caveat:WithMercurialversionspriorto4574925db5c0"hg import"mightcauserejectsifthepatchcontextcontainsanactivekeyword.Inthatcaserun"hg kwshrink",andthenreimport.Or,better,usebundle/unbundletosharechanges.kwcatoutputthecurrentorgivenrevisionoffilesexpandingkeywordskwdemoprint[keywordmaps]configurationandanexpansionexamplekwexpandexpandkeywordsinworkingdirectorykwfilesprintfilescurrentlyconfiguredforkeywordexpansionkwshrinkrevertexpandedkeywordsinworkingdirectory%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%catexpand$Id$donotprocess$Id:xxx$ignore$Id$%addremoveaddingaaddingb%statusAaAb%defaultkeywordexpansionincludingcommithook%commitaboverwritingaexpandingkeywordsrunninghookcommit.test:cpahooktest%status?hooktest%identify7f0665a496fd%catexpand$Id:a,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$%hgkwcatexpand$Id:a,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$%diffahooktest%removingcommithookfromconfig%touch%status%update2filesupdated,0filesmerged,0filesremoved,0filesunresolved%catexpand$Id:a,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$%checkwhetherexpansionisfilewise%commitcaddingc%forceexpansionoverwritingaexpandingkeywordsoverwritingcexpandingkeywords%comparechangenodesinacexpand$Id:a,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$$Id:c,v7fefeeacf3591970/01/0100:00:01user$testsfordifferentchangenodes%qinit-c%qimport%qcommit%keywordsshouldnotbeexpandedinpatch#HGchangesetpatch#UserUserName<user@example.com>#Date10#NodeID7fefeeacf3596ca401a248c183c2314cbf4661ee#Parent7f0665a496fd37c3627191bd02e26a1e230f2aa2cndiffdiff-r7f0665a496fd-r7fefeeacf359c---/dev/nullThuJan0100:00:001970+0000+++b/cThuJan0100:00:011970+0000@@-0,0+1,2@@+$Id$+testsfordifferentchangenodes%qpopandmoveonPatchqueuenowempty%copy%kwfilesaddedac%commitcc:copya:0045e12f6c5791aac80ca6cbfd97709a88307292overwritingcexpandingkeywords%catacexpand$Id:a,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$expand$Id:c,v6a127771f5db1970/01/0100:00:01user$donotprocess$Id:xxx$%touchcopiedcafter1second%status%kwfilesac%diff--revdiff-r7f0665a496fdc---/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,v7f0665a496fd1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$%hgkwcatexpand$Id:a7f0665a496fdThu,01Jan197000:00:00+0000user$donotprocess$Id:xxx$ignore$Id$%commitaoverwritingaexpandingkeywords%status%catexpand$Id:a576a35651b0aThu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$%hgkwcatexpand$Id:a576a35651b0aThu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$%remove%status%rollbackrollingbacklasttransaction%statusRa%reverta%cataexpand$Id:a576a35651b0aThu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$%clonetotestincomingrequestingallchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith2changesto2files2filesupdated,0filesmerged,0filesremoved,0filesunresolved%incomingsearchingforchangeschangeset:1:576a35651b0atag:tipuser:UserName<user@example.com>date:ThuJan0100:00:021970+0000summary:firstline%kwexpand/kwshrinkonselectedfiles%copyax/a%kwexpandaoverwritingaexpandingkeywords%kwexpandx/ashouldabortabort:outstandinguncommittedchangesingivenfilesx/ax/a:copya:779c764182ce5d43e2b1eb66ce06d7b47bfe342eoverwritingx/aexpandingkeywords%cataexpand$Id:x/a2d19a72f00daThu,01Jan197000:00:03+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$ignore$Id$%hgkwcatexpand$Id:a576a35651b0aThu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$