branchmap: update cache of 'unserved' filter on new changesets
The `commitctx` and `addchangegroup` methods of repo upgrade branchcache after
completion. This behavior aims to keep the branchcache in sync for read only
process as hgweb. See ee317dbfb9d0 for details.
Since changelog filtering is used, those calls only update the cache for unfiltered repo.
One of no interest for typical read only process like hgweb.
Note: By chance in basic case, `repo.unfiltered() == repo.filtered('unserved')`
This changesets have the "unserved" cache updated instead. I think this is the
only cache that matter for hgweb.
We could imagine updating all possible branchcaches instead but:
- I'm not sure it would have any benefit impact. It may even increase the odd of
all cache being invalidated.
- This is more complicated change.
So I'm going for updating a single cache only which is already better that
updating a cache nobody cares about.
This changeset have a few expected impact on the testsuite are different cache
are updated.
[ original upstream message ]
$cat<<EOF>>$HGRCPATH>[extensions]>keyword=>mq=>notify=>record=>transplant=>[ui]>interactive=true>EOFhideouterrepo$hginitRunkwdemobefore[keyword]filesaresetupasitwouldsucceedwithoutuisetupotherwise$hg--quietkwdemo[extensions]keyword=[keyword]demo.txt=[keywordset]svn=False[keywordmaps]Author={author|user}Date={date|utcdate}Header={root}/{file},v{node|short}{date|utcdate}{author|user}Id={file|basename},v{node|short}{date|utcdate}{author|user}RCSFile={file|basename},vRCSfile={file|basename},vRevision={node|short}Source={root}/{file},v$Author:test$$Date:????/??/????:??:??$(glob)$Header:*/demo.txt,v????????????????/??/????:??:??test$(glob)$Id:demo.txt,v????????????????/??/????:??:??test$(glob)$RCSFile:demo.txt,v$$RCSfile:demo.txt,v$$Revision:????????????$(glob)$Source:*/demo.txt,v$(glob)$hg--quietkwdemo"Branch = {branches}"[extensions]keyword=[keyword]demo.txt=[keywordset]svn=False[keywordmaps]Branch={branches}$Branch:demobranch$$cat<<EOF>>$HGRCPATH>[keyword]>**=>b=ignore>i=ignore>[hooks]>EOF$cp$HGRCPATH$HGRCPATH.nohooks>cat<<EOF>>$HGRCPATH>commit=>commit.test=cpahooktest>EOF$hginitTest-bndl$cdTest-bndlkwshrinkshouldexitsilentlyinempty/invalidrepo$hgkwshrinkSymlinkscannotbecreatedonWindows.Abundletotestthiswasmadewith:hginittcdtechoa>aln-sasymhgaddsymhgci-maddsym-umercurialhgbundle--basenull../test-keyword.hg$hgpull-u"$TESTDIR"/bundles/test-keyword.hgpullingfrom*test-keyword.hg(glob)requestingallchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files1filesupdated,0filesmerged,0filesremoved,0filesunresolved$echo'expand $Id$'>a$echo'do not process $Id:'>>a$echo'xxx $'>>a$echo'ignore $Id$'>bOutputfilesastheywerecreated$catabexpand$Id$donotprocess$Id:xxx$ignore$Id$nokwfiles$hgkwfilesuntrackedcandidates$hg-vkwfiles--unknownkaAddfilesandcheckstatus$hgaddremoveaddingaaddingb$hgstatusAaAbDefaultkeywordexpansionincludingcommithookInterruptedcommitshouldnotchangestateorruncommithook$hg--debugcommitabort:emptycommitmessage[255]$hgstatusAaAbCommitwithseveralchecks$hg--debugcommit-mabsym-u'User Name <user@example.com>'aboverwritingaexpandingkeywordsrunninghookcommit.test:cpahooktestcommittedchangeset1:ef63ca68695bc9495032c6fda1350c71e6d256e9$hgstatus?hooktest$hgdebugrebuildstate$hg--quietidentifyef63ca68695bcatfilesinworkingdirectorywithkeywordsexpanded$catabexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$hgcatfilesandsymlink,noexpansion$hgcatsymab&&echoexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$a$diffahooktest$cp$HGRCPATH.nohooks$HGRCPATH$rmhooktesthgstatusofkw-ignoredbinaryfilestartingwith'\1\n'>>>open("i","wb").write("\1\nfoo")$hg-qcommit-Ammetasepi$hgstatus>>>open("i","wb").write("\1\nbar")$hgstatusMi$hg-qcommit-m"modify metasep"i$hgstatus--rev2:3Mi$touchempty$hg-qcommit-A-m"another file"$hgstatus-A--rev3:4iCi$hg-qstrip-n2Testhookexecutionbundle$hgbundle--basenull../kw.hg2changesetsfound$cd..$hginitTest$cdTestNotifyonpulltocheckwhetherkeywordsstayasisinemailie.ifpatch.diffwrapperactsasitshould$cat<<EOF>>$HGRCPATH>[hooks]>incoming.notify=python:hgext.notify.hook>[notify]>sources=pull>diffstat=False>maxsubject=15>[reposubs]>*=Test>EOFPullfrombundleandtriggernotify$hgpull-u../kw.hgpullingfrom../kw.hgrequestingallchangesaddingchangesetsaddingmanifestsaddingfilechangesadded2changesetswith3changesto3filesContent-Type:text/plain;charset="us-ascii"MIME-Version:1.0Content-Transfer-Encoding:7bitDate:*(glob)Subject:changesetin...From:mercurialX-Hg-Notification:changeseta2392c293916Message-Id:<hg.a2392c293916*>(glob)To:Testchangeseta2392c293916in$TESTTMP/Test(glob)details:$TESTTMP/Test?cmd=changeset;node=a2392c293916description:addsymdiffs(6lines):diff-r000000000000-ra2392c293916sym---/dev/nullThuJan0100:00:001970+0000+++b/symSatFeb0920:25:472008+0100@@-0,0+1,1@@+a \ NonewlineatendoffileContent-Type:text/plain;charset="us-ascii"MIME-Version:1.0Content-Transfer-Encoding:7bitDate:*(glob)Subject:changesetin...From:UserName<user@example.com>X-Hg-Notification:changesetef63ca68695bMessage-Id:<hg.ef63ca68695b*>(glob)To:Testchangesetef63ca68695bin$TESTTMP/Test(glob)details:$TESTTMP/Test?cmd=changeset;node=ef63ca68695bdescription:absymdiffs(12lines):diff-ra2392c293916-ref63ca68695ba---/dev/nullThuJan0100:00:001970+0000+++b/aThuJan0100:00:001970+0000@@-0,0+1,3@@+expand$Id$+donotprocess$Id:+xxx$diff-ra2392c293916-ref63ca68695bb---/dev/nullThuJan0100:00:001970+0000+++b/bThuJan0100:00:001970+0000@@-0,0+1,1@@+ignore$Id$3filesupdated,0filesmerged,0filesremoved,0filesunresolved$cp$HGRCPATH.nohooks$HGRCPATHTouchfilesandcheckwithstatus$touchab$hgstatusUpdateandexpand$rmsymab$hgupdate-C3filesupdated,0filesmerged,0filesremoved,0filesunresolved$catabexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$Checkwhetherexpansionisfilewiseandfilemodeispreserved$echo'$Id$'>c$echo'tests for different changenodes'>>c#if unix-permissions$chmod600c$ls-lc|cut-b1-10-rw-------#endifcommitfilec$hgcommit-A-mcndiff-d'1 0'-u'User Name <user@example.com>'addingc#if unix-permissions$ls-lc|cut-b1-10-rw-------#endifforceexpansion$hg-vkwexpandoverwritingaexpandingkeywordsoverwritingcexpandingkeywordscomparechangenodesinaandc$catacexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$$Id:c,v40a904bbbe4c1970/01/0100:00:01user$testsfordifferentchangenodesrecord$echo'$Id$'>r$hgaddrrecordchunk>>>lines=open('a','rb').readlines()>>>lines.insert(1,'foo\n')>>>lines.append('bar\n')>>>open('a','wb').writelines(lines)$hgrecord-d'10 1'-mrectesta<<EOF>y>y>n>EOFdiff--gita/ab/a2hunks,2lineschangedexaminechangesto'a'?[Ynesfdaq?]@@-1,3+1,4@@expand$Id$+foodonotprocess$Id:xxx$recordchange1/2to'a'?[Ynesfdaq?]@@-2,2+3,3@@donotprocess$Id:xxx$+barrecordchange2/2to'a'?[Ynesfdaq?]$hgidentify5f5eb23505c3+tip$hgstatusMaArCatmodifiedfilea$cataexpand$Id:a,v5f5eb23505c31970/01/0100:00:10test$foodonotprocess$Id:xxx$barDiffremainingchunk$hgdiffadiff-r5f5eb23505c3a---a/aThuJan0100:00:091970-0000+++b/a*(glob)@@-2,3+2,4@@foodonotprocess$Id:xxx$+bar$hgrollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2Recordallchunksinfilea$echofoo>msg-donotuse"hg record -m"here!$hgrecord-lmsg-d'11 1'a<<EOF>y>y>y>EOFdiff--gita/ab/a2hunks,2lineschangedexaminechangesto'a'?[Ynesfdaq?]@@-1,3+1,4@@expand$Id$+foodonotprocess$Id:xxx$recordchange1/2to'a'?[Ynesfdaq?]@@-2,2+3,3@@donotprocess$Id:xxx$+barrecordchange2/2to'a'?[Ynesfdaq?]Fileashouldbeclean$hgstatus-AaCarollbackandrevertexpansion$cataexpand$Id:a,v78e0a02d76aa1970/01/0100:00:11test$foodonotprocess$Id:xxx$bar$hg--verboserollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2overwritingaexpandingkeywords$hgstatusaMa$cataexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$foodonotprocess$Id:xxx$bar$echo'$Id$'>y$echo'$Id$'>z$hgaddy$hgcommit-Am"rollback only"z$catz$Id:z,v45a5d3adce531970/01/0100:00:00test$$hg--verboserollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2overwritingzshrinkingkeywordsOnlyzshouldbeoverwritten$hgstatusayzMaAyAz$catz$Id$$hgforgetyz$rmyzrecordaddedfilealone$hg-vrecord-lmsg-d'12 2'r<<EOF>y>EOFdiff--gita/rb/rnewfilemode100644examinechangesto'r'?[Ynesfdaq?]rcommittedchangeset3:82a2f715724doverwritingrexpandingkeywords-statuscallrequiredfordirstate.normallookup()check$hgstatusr$hg--verboserollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2overwritingrshrinkingkeywords$hgforgetr$rmmsgr$hgupdate-C1filesupdated,0filesmerged,0filesremoved,0filesunresolvedrecordaddedkeywordignoredfile$echo'$Id$'>i$hgaddi$hg--verboserecord-d'13 1'-mrecignored<<EOF>y>EOFdiff--gita/ib/inewfilemode100644examinechangesto'i'?[Ynesfdaq?]icommittedchangeset3:9f40ceb5a072$cati$Id$$hg-qrollback$hgforgeti$rmiamend$echoamend>>a$echoamend>>b$hg-qcommit-d'14 1'-m'prepare amend'$hg--debugcommit--amend-d'15 1'-m'amend without changes'|grepkeywordsoverwritingaexpandingkeywords$hg-qid67d8c481a6be$head-1aexpand$Id:a,v67d8c481a6be1970/01/0100:00:15test$$hg-qstrip-ntipTestpatchqueuerepo$hginit--mq$hgqimport-rtip-nmqtest.diff$hgcommit--mq-mmqtestKeywordsshouldnotbeexpandedinpatch$cat.hg/patches/mqtest.diff # HG changeset patch # User User Name <user@example.com> # Date 1 0 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9cndiffdiff-ref63ca68695b-r40a904bbbe4cc---/dev/nullThuJan0100:00:001970+0000+++b/cThuJan0100:00:011970+0000@@-0,0+1,2@@+$Id$+testsfordifferentchangenodes$hgqpoppoppingmqtest.diffpatchqueuenowemptyqgoto,implyingqpush,shouldexpand$hgqgotomqtest.diffapplyingmqtest.diffnowat:mqtest.diff$catc$Id:c,v40a904bbbe4c1970/01/0100:00:01user$testsfordifferentchangenodes$hgcatc$Id:c,v40a904bbbe4c1970/01/0100:00:01user$testsfordifferentchangenodesKeywordsshouldnotbeexpandedinfilelog$hg--config'extensions.keyword=!'catc$Id$testsfordifferentchangenodesqpopandmoveon$hgqpoppoppingmqtest.diffpatchqueuenowemptyCopyandshowaddedkwfiles$hgcpac$hgkwfilesacCommitandshowexpansioninoriginalandcopy$hg--debugcommit-ma2c-d'1 0'-u'User Name <user@example.com>'invalidbranchheadscache(served):tipdifferscc:copya:0045e12f6c5791aac80ca6cbfd97709a88307292invalidbranchheadscache(served):tipdiffersoverwritingcexpandingkeywordscommittedchangeset2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d$catacexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$expand$Id:c,v25736cf2f5cb1970/01/0100:00:01user$donotprocess$Id:xxx$Touchcopiedcandcheckitsstatus$touchc$hgstatusCopykwfiletokeywordignoredfileunexpandingkeywords$hg--verbosecopyaicopyingatoioverwritingishrinkingkeywords$head-n1iexpand$Id$$hgforgeti$rmiCopyignoredfiletoignoredfile:nooverwriting$hg--verbosecopybicopyingbtoi$hgforgeti$rmicpsymlinkfile;hgcp-Asymlinkfile(part1)-copiedsymlinkpointstokwfile:overwrite#if symlink$cpsymi$ls-li-rw-r--r--*(glob)$head-1iexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$$hgcopy--after--verbosesymicopyingsymtoioverwritingishrinkingkeywords$head-1iexpand$Id$$hgforgeti$rmi#endifTestdifferentoptionsofhgkwfiles$hgkwfilesac$hg-vkwfiles--ignoreIbIsym$hgkwfiles--allKaKcIbIsymDiffspecificrevision$hgdiff--rev1diff-ref63ca68695bc---/dev/nullThuJan0100:00:001970+0000+++b/c*(glob)@@-0,0+1,3@@+expand$Id$+donotprocess$Id:+xxx$Statusafterrollback:$hgrollbackrepositorytiprolledbacktorevision1(undocommit)workingdirectorynowbasedonrevision1$hgstatusAc$hgupdate--clean0filesupdated,0filesmerged,0filesremoved,0filesunresolved#if symlinkcpsymlinkfile;hgcp-Asymlinkfile(part2)-copiedsymlinkpointstokwignoredfile:donotoverwrite$cata>i$ln-sisymignored$hgcommit-Am'fake expansion in ignored and symlink'isymignored$cpsymignoredx$hgcopy--after--verbosesymignoredxcopyingsymignoredtox$head-n1xexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$$hgforgetx$rmx$hgrollbackrepositorytiprolledbacktorevision1(undocommit)workingdirectorynowbasedonrevision1$hgupdate--clean0filesupdated,0filesmerged,0filesremoved,0filesunresolved$rmisymignored#endifCustomkeywordmapsasargumenttokwdemo$hg--quietkwdemo"Xinfo = {author}: {desc}"[extensions]keyword=[keyword]**=b=ignoredemo.txt=i=ignore[keywordset]svn=False[keywordmaps]Xinfo={author}:{desc}$Xinfo:test:hgkeywordconfigurationandexpansionexample$Configurecustomkeywordmaps$cat<<EOF>>$HGRCPATH>[keywordmaps]>Id={file}{node|short}{date|rfc822date}{author|user}>Xinfo={author}:{desc}>EOFCatandhgcatfilesbeforecustomexpansion$catabexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$donotprocess$Id:xxx$ignore$Id$$hgcatsymab&&echoexpand$Id:aef63ca68695bThu,01Jan197000:00:00+0000user$donotprocess$Id:xxx$ignore$Id$aWritecustomkeywordandpreparemulti-linecommitmessage$echo'$Xinfo$'>>a$cat<<EOF>>log>firstline>secondline>EOFInterruptedcommitshouldnotchangestate$hgcommitabort:emptycommitmessage[255]$hgstatusMa?c?logCommitwithmulti-linemessageandcustomexpansion|Note:||Afterthelastrollback,the"unserved"branchheadscachebecameinvalid,but|allchangesetsintherepowerepublic.Forfilteringthismeans:|"mutable"=="unserved"==??.||Asthe"unserved"cacheisinvalid,wefallbacktothe"mutable"cache.But|noupdateisneededbetween"mutable"and"unserved"andthe"unserved"cache|isnotupdatedondisk.Theon-diskversionthereforestaysinvalidforsome|time.Thisexplainswhythe"unserved"branchheadscacheisdetectedas|invalidhere.$hg--debugcommit-llog-d'2 0'-u'User Name <user@example.com>'invalidbranchheadscache(served):tipdiffersainvalidbranchheadscache(served):tipdiffersoverwritingaexpandingkeywordscommittedchangeset2:bb948857c743469b22bbf51f7ec8112279ca5d83$rmlogStat,verifyandshowcustomexpansion(firstline)$hgstatus?c$hgverifycheckingchangesetscheckingmanifestscrosscheckingfilesinchangesetsandmanifestscheckingfiles3files,3changesets,4totalrevisions$catabexpand$Id:abb948857c743Thu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$$hgcatsymab&&echoexpand$Id:abb948857c743Thu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$ignore$Id$aannotate$hgannotatea1:expand$Id$1:donotprocess$Id:1:xxx$2:$Xinfo$removewithstatuschecks$hgdebugrebuildstate$hgremovea$hg--debugcommit-mrmacommittedchangeset3:d14c712653769de926994cf7fbb06c8fbd68f012$hgstatus?cRollback,revert,andcheckexpansion$hgrollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2$hgstatusRa?c$hgrevert--no-backup--revtipa$cataexpand$Id:abb948857c743Thu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$Clonetotestglobalandlocalconfigurations$cd..Expansionindestinationwithglobalconfiguration$hg--quietcloneTestglobalconf$catglobalconf/aexpand$Id:abb948857c743Thu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$Noexpansionindestinationwithlocalconfigurationinoriginonly$hg--quiet--config'keyword.**=ignore'cloneTestlocalconf$catlocalconf/aexpand$Id$donotprocess$Id:xxx$$Xinfo$Clonetotestincoming$hgclone-r1TestTest-aaddingchangesetsaddingmanifestsaddingfilechangesadded2changesetswith3changesto3filesupdatingtobranchdefault3filesupdated,0filesmerged,0filesremoved,0filesunresolved$cdTest-a$cat<<EOF>>.hg/hgrc>[paths]>default=../Test>EOF$hgincomingcomparingwith$TESTTMP/Test(glob)searchingforchangeschangeset:2:bb948857c743tag:tipuser:UserName<user@example.com>date:ThuJan0100:00:021970+0000summary:firstlineImportedpatchshouldnotberejected>>>importre>>>text=re.sub(r'(Id.*)',r'\1 rejecttest',open('a').read())>>>open('a','wb').write(text)$hg--debugcommit-m'rejects?'-d'3 0'-u'User Name <user@example.com>'aoverwritingaexpandingkeywordscommittedchangeset2:85e279d709ffc28c9fdd1b868570985fc3d87082$hgexport-o../rejecttest.difftip$cd../Test$hgimport../rejecttest.diffapplying../rejecttest.diff$catabexpand$Id:a4e0994474d25Thu,01Jan197000:00:03+0000user$rejecttestdonotprocess$Id:rejecttestxxx$$Xinfo:UserName<user@example.com>:rejects?$ignore$Id$$hgrollbackrepositorytiprolledbacktorevision2(undoimport)workingdirectorynowbasedonrevision2$hgupdate--clean1filesupdated,0filesmerged,0filesremoved,0filesunresolvedkwexpand/kwshrinkonselectedfiles$mkdirx$hgcopyax/a$hg--verbosekwshrinkaoverwritingashrinkingkeywords-sleeprequiredfordirstate.normal()check$sleep1$hgstatusa$hg--verbosekwexpandaoverwritingaexpandingkeywords$hgstatusakwexpandx/ashouldabort$hg--verbosekwexpandx/aabort:outstandinguncommittedchanges[255]$cdx$hg--debugcommit-mxa-d'3 0'-u'User Name <user@example.com>'x/ax/a:copya:779c764182ce5d43e2b1eb66ce06d7b47bfe342eoverwritingx/aexpandingkeywordscommittedchangeset3:b4560182a3f9a358179fd2d835c15e9da379c1e4$cataexpand$Id:x/ab4560182a3f9Thu,01Jan197000:00:03+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:xa$kwshrinkainsidedirectoryx$hg--verbosekwshrinkaoverwritingx/ashrinkingkeywords$cataexpand$Id$donotprocess$Id:xxx$$Xinfo$$cd..kwexpandnonexistent$hgkwexpandnonexistentnonexistent:*(glob)#if servehgserve-expandwithhgwebfile-noexpansionwithhgwebannotate/changeset/filediff-checkerrors$hgserve-p$HGPORT-d--pid-file=hg.pid-Aaccess.log-Eerrors.log$cathg.pid>>$DAEMON_PIDS$"$TESTDIR/get-with-headers.py"localhost:$HGPORT'file/tip/a/?style=raw'200Scriptoutputfollowsexpand$Id:abb948857c743Thu,01Jan197000:00:02+0000user$donotprocess$Id:xxx$$Xinfo:UserName<user@example.com>:firstline$$"$TESTDIR/get-with-headers.py"localhost:$HGPORT'annotate/tip/a/?style=raw'200Scriptoutputfollowsuser@1:expand$Id$user@1:donotprocess$Id:user@1:xxx$user@2:$Xinfo$$"$TESTDIR/get-with-headers.py"localhost:$HGPORT'rev/tip/?style=raw'200Scriptoutputfollows # HG changeset patch # User User Name <user@example.com> # Date 3 0 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83xadiff-rbb948857c743-rb4560182a3f9x/a---/dev/nullThuJan0100:00:001970+0000+++b/x/aThuJan0100:00:031970+0000@@-0,0+1,4@@+expand$Id$+donotprocess$Id:+xxx$+$Xinfo$$"$TESTDIR/get-with-headers.py"localhost:$HGPORT'diff/bb948857c743/a?style=raw'200Scriptoutputfollowsdiff-ref63ca68695b-rbb948857c743a---a/aThuJan0100:00:001970+0000+++b/aThuJan0100:00:021970+0000@@-1,3+1,4@@expand$Id$donotprocess$Id:xxx$+$Xinfo$$caterrors.log#endifPreparemergeandresolvetests$echo'$Id$'>m$hgaddm$hgcommit-m4kw$echofoo>>m$hgcommit-m5foosimplemerge$hgupdate41filesupdated,0filesmerged,0filesremoved,0filesunresolved$echofoo>>m$hgcommit-m6foocreatednewhead$hgmerge0filesupdated,0filesmerged,0filesremoved,0filesunresolved(branchmerge,don't forget to commit) $ hg commit -m simplemerge $ cat m $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ fooconflict: keyword should stay outside conflict zone $ hg update 4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo bar >> m $ hg commit -m 8bar created new head $ hg merge merging m warning: conflicts during merge. merging m incomplete! (edit conflicts, then use 'hgresolve--mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hgresolve' to retry unresolved file merges or 'hgupdate-C.' to abandon [1] $ cat m $Id$<<<<<<<localbar=======foo>>>>>>>otherresolvetolocal$HGMERGE=internal:localhgresolve-a$hgcommit-mlocalresolve$catm$Id:m800511b3a22dThu,01Jan197000:00:00+0000test$barTestrestrictedmodewithtransplant-b$hgupdate61filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgbranchfoomarkedworkingdirectoryasbranchfoo(branchesarepermanentandglobal,didyouwantabookmark?)$mvaa.bak$echofoobranch>a$cata.bak>> a $ rm a.bak $ hg commit -m 9foobranch $ hg update default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -y transplant -b foo tip applying 4aa30d025d50 4aa30d025d50 transplanted to e00abbf63521Expansion in changeset but not in file $ hg tip -p changeset: 11:e00abbf63521 tag: tip parent: 9:800511b3a22d user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 9foobranch diff -r 800511b3a22d -r e00abbf63521 a --- a/a Thu Jan 01 00:00:00 1970 +0000 +++ b/a Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +1,4 @@ +foobranch expand $Id$ do not process $Id: xxx $ $ head -n 2 a foobranch expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $Turn off expansion $ hg -q rollback $ hg -q update -Ckwshrink with unknown file u $ cp a u $ hg --verbose kwshrink overwriting a shrinking keywords overwriting m shrinking keywords overwriting x/a shrinking keywordsKeywords shrunk in working directory, but not yet disabled - cat shows unexpanded keywords - hg cat shows expanded keywords $ cat a b expand $Id$ do not process $Id: xxx $ $Xinfo$ ignore $Id$ $ hg cat sym a b && echo expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ do not process $Id: xxx $ $Xinfo: User Name <user@example.com>: firstline $ ignore $Id$ aNow disable keyword expansion $ rm "$HGRCPATH" $ cat a b expand $Id$ do not process $Id: xxx $ $Xinfo$ ignore $Id$ $ hg cat sym a b && echo expand $Id$ do not process $Id: xxx $ $Xinfo$ ignore $Id$ a $ cd ..