rollback: clarifies the message about the reverted state (issue2628)
Previously, when rolling back a transaction, some users could be confused
between the level to which the store is rolled back, and the new parents
of the working directory.
$ hg rollback
rolling back to revision 4 (undo commit)
With this change:
$ hg rollback
repository tip rolled back to tip revision 4 (undo commit)
working directory now based on revision 2 and 1
So now the user can realize that the store has been rolled back to an older
tip, but also that the working directory may not on the tip (here we are
rolling back the merge of the heads 2 and 1)
[ original upstream message ]
$cat<<EOF>>$HGRCPATH>[extensions]>keyword=>mq=>notify=>record=>transplant=>[ui]>interactive=true>EOFRunkwdemobefore[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"/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$aTesthookexecution$diffahooktest$cp$HGRCPATH.nohooks$HGRCPATH$rmhooktestbundle$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/Testdetails:*cmd=changeset;node=a2392c293916(glob)description: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/Testdetails:$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$Checkwhetherexpansionisfilewise$echo'$Id$'>c$echo'tests for different changenodes'>>ccommitfilec$hgcommit-A-mcndiff-d'1 0'-u'User Name <user@example.com>'addingcforceexpansion$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$python-c \>'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'$hgrecord-d'1 10'-mrectesta<<EOF>y>y>n>EOFdiff--gita/ab/a2hunks,2lineschangedexaminechangesto'a'?[Ynsfdaq?]@@-1,3+1,4@@expand$Id$+foodonotprocess$Id:xxx$recordchange1/2to'a'?[Ynsfdaq?]@@-2,2+3,3@@donotprocess$Id:xxx$+barrecordchange2/2to'a'?[Ynsfdaq?]$hgidentifyd17e03c92c97+tip$hgstatusMaArCatmodifiedfilea$cataexpand$Id:a,vd17e03c92c971970/01/0100:00:01test$foodonotprocess$Id:xxx$barDiffremainingchunk$hgdiffadiff-rd17e03c92c97a---a/aWedDec3123:59:511969-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'1 11'a<<EOF>y>y>y>EOFdiff--gita/ab/a2hunks,2lineschangedexaminechangesto'a'?[Ynsfdaq?]@@-1,3+1,4@@expand$Id$+foodonotprocess$Id:xxx$recordchange1/2to'a'?[Ynsfdaq?]@@-2,2+3,3@@donotprocess$Id:xxx$+barrecordchange2/2to'a'?[Ynsfdaq?]Fileashouldbeclean$hgstatus-AaCarollbackandrevertexpansion$cataexpand$Id:a,v59f969a3b52c1970/01/0100:00:01test$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'1 12'r<<EOF>y>EOFdiff--gita/rb/rnewfilemode100644examinechangesto'r'?[Ynsfdaq?]rcommittedchangeset3:899491280810overwritingrexpandingkeywords$hg--verboserollbackrepositorytiprolledbacktorevision2(undocommit)workingdirectorynowbasedonrevision2overwritingrshrinkingkeywords$hgforgetr$rmmsgr$hgupdate-C1filesupdated,0filesmerged,0filesremoved,0filesunresolvedrecordaddedkeywordignoredfile$echo'$Id$'>i$hgaddi$hg--verboserecord-d'1 13'-mrecignored<<EOF>y>EOFdiff--gita/ib/inewfilemode100644examinechangesto'i'?[Ynsfdaq?]icommittedchangeset3:5f40fe93bbdc$cati$Id$$hg-qrollback$hgforgeti$rmiTestpatchqueuerepo$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>'cc:copya:0045e12f6c5791aac80ca6cbfd97709a88307292overwritingcexpandingkeywordscommittedchangeset2: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$cpsymi$ls-li-rw-r--r--*(glob)$head-1iexpand$Id:a,vef63ca68695b1970/01/0100:00:00user$$hgcopy--after--verbosesymicopyingsymtoioverwritingishrinkingkeywords$head-1iexpand$Id$$hgforgeti$rmiTestdifferentoptionsofhgkwfiles$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,0filesunresolvedcpsymlinkfile;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$rmisymignoredCustomkeywordmapsasargumenttokwdemo$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$aWritecustomkeywordandpreparemultilinecommitmessage$echo'$Xinfo$'>>a$cat<<EOF>>log>firstline>secondline>EOFInterruptedcommitshouldnotchangestate$hgcommitabort:emptycommitmessage[255]$hgstatusMa?c?logCommitwithmultilinemessageandcustomexpansion$hg--debugcommit-llog-d'2 0'-u'User Name <user@example.com>'aoverwritingaexpandingkeywordscommittedchangeset2: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..Expansionindestinatonwithglobalconfiguration$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/Testsearchingforchangeschangeset:2:bb948857c743tag:tipuser:UserName<user@example.com>date:ThuJan0100:00:021970+0000summary:firstlineImportedpatchshouldnotberejected$python-c \>'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'$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(undocommit)workingdirectorynowbasedonrevision2$hgupdate--clean1filesupdated,0filesmerged,0filesremoved,0filesunresolvedkwexpand/kwshrinkonselectedfiles$mkdirx$hgcopyax/a$hg--verbosekwshrinkaoverwritingashrinkingkeywords$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)hgserve-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.pylocalhost:$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.pylocalhost:$HGPORT'/annotate/tip/a/?style=raw'200Scriptoutputfollowsuser@1:expand$Id$user@1:donotprocess$Id:user@1:xxx$user@2:$Xinfo$$$TESTDIR/get-with-headers.pylocalhost:$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.pylocalhost:$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.logPreparemergeandresolvetests$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 failed! 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:m41efa6d38e9bThu,01Jan197000:00:00+0000test$barTestrestrictedmodewithtransplant-b$hgupdate61filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgbranchfoomarkedworkingdirectoryasbranchfoo$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 5a4da427c162Expansion in changeset but not in file $ hg tip -p changeset: 11:5a4da427c162 tag: tip parent: 9:41efa6d38e9b user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 9foobranch diff -r 41efa6d38e9b -r 5a4da427c162 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 5a4da427c162 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