Lowercase status flags of untracked files in kwfile output
Document the flags and their meanings in the command help
(thanks to timeless for bringing this to my attention).
#!/bin/shcat<<EOF >> $HGRCPATH[extensions]hgext.keyword =hgext.mq =hgext.notify =[keyword]* =b = ignore[hooks]commit=commit.test=cp a hooktestEOFecho%helphghelpkeywordecho%hgkwdemohg--quietkwdemo--default\|sed-e's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!'\-e's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /'\-e'/[$]Revision/ s/: [a-z0-9][a-z0-9]* /: xxxxxxxxxxxx /'\-e's! 20[0-9][0-9]/[01][0-9]/[0-3][0-9] [0-2][0-9]:[0-6][0-9]:[0-6][0-9]! 2000/00/00 00:00:00!'hg--quietkwdemo"Branch = {branches}"hginitTest-bndlcdTest-bndlecho%kwshrinkshouldexitsilentlyinempty/invalidrepohgkwshrink# Symlinks cannot be created on Windows. The bundle was made with:## hg init t# cd t# echo a > a# ln -s a sym# hg add sym# hg ci -m addsym -u mercurial# hg bundle --base null ../test-keyword.hg#hgpull-u"$TESTDIR/test-keyword.hg"\|sed's/pulling from.*test-keyword.hg/pulling from test-keyword.hg/'echo'expand $Id$'>aecho'do not process $Id:'>>aecho'xxx $'>>aecho'ignore $Id$'>becho%catcatabecho%addremovehgaddremoveecho%statushgstatusecho%defaultkeywordexpansionincludingcommithookecho%interruptedcommitshouldnotchangestateorruncommithookhg--debugcommitecho%statushgstatusecho%commithg--debugcommit-mabsym-u'User Name <user@example.com>'echo%statushgstatusecho%identifyhgdebugrebuildstatehg--quietidentifyecho%catcatabecho%hgcathgcatsymabechoecho%diffahooktestdiffahooktestecho%removingcommithookfromconfigsed-e'/\[hooks\]/,$ d'$HGRCPATH>$HGRCPATH.nohookmv$HGRCPATH.nohook$HGRCPATHrmhooktestecho%bundlehgbundle--basenull../kw.hgcd..hginitTestcdTestecho%notifyonpulltocheckwhetherkeywordsstayasisinemailecho%ie.ifpatch.diffwrapperactsasitshouldcat<<EOF >> $HGRCPATH[hooks]incoming.notify = python:hgext.notify.hook[notify]sources = pulldiffstat = False[reposubs]* = TestEOFecho%pullfrombundlehgpull-u../kw.hg2>&1|sed-e'/^Content-Type:/,/^diffs (/ d'echo%removenotifyconfigsed-e'/\[hooks\]/,$ d'$HGRCPATH>$HGRCPATH.nonotifymv$HGRCPATH.nonotify$HGRCPATHecho%touchtouchabecho%statushgstatusrmsymabecho%updatehgupdate-Cecho%catcatabecho%checkwhetherexpansionisfilewiseecho'$Id$'>cecho'tests for different changenodes'>>cecho%commitchgcommit-A-mcndiff-d'1 0'-u'User Name <user@example.com>'echo%forceexpansionhg-vkwexpandecho%comparechangenodesinaccatacecho%qinit-chgqinit-cecho%qimporthgqimport-rtip-nmqtest.diffecho%qcommithgqcommit-mqtestecho%keywordsshouldnotbeexpandedinpatchcat.hg/patches/mqtest.diffecho%qpophgqpopecho%qgoto-shouldimplyqpushhgqgotomqtest.diffecho%catcatcecho%qpopandmoveonhgqpopecho%copyhgcpacecho%kwfilesaddedhgkwfilesecho%commithg--debugcommit-ma2c-d'1 0'-u'User Name <user@example.com>'echo%cataccatacecho%touchcopiedctouchcecho%statushgstatusecho%kwfileshgkwfilesecho%diff--revhgdiff--rev1|grep-v'b/c'echo%rollbackhgrollbackecho%statushgstatusecho%update-Chgupdate--cleanecho%customkeywordexpansionecho%trywithkwdemohg--quietkwdemo"Xinfo = {author}: {desc}"cat<<EOF >>$HGRCPATH[keywordmaps]Id = {file} {node|short} {date|rfc822date} {author|user}Xinfo = {author}: {desc}EOFecho%catcatabecho%hgcathgcatsymabechoecho'$Xinfo$'>>acat<<EOF >> logfirstlinesecondlineEOFecho%interruptedcommitshouldnotchangestatehgcommitecho%statushgstatusecho%commithg--debugcommit-llog-d'2 0'-u'User Name <user@example.com>'rmlogecho%statushgstatusecho%verifyhgverifyecho%catcatabecho%hgcathgcatsymabechoecho%annotatehgannotateaecho%removehgdebugrebuildstatehgremoveahg--debugcommit-mrmaecho%statushgstatusecho%rollbackhgrollbackecho%statushgstatusecho%revertahgrevert--no-backup--revtipaecho%catacataecho%clonetotestincomingcd..hgclone-r1TestTest-acdTest-acat<<EOF >> .hg/hgrc[paths]default = ../TestEOFecho%incoming# remove path to temp dirhgincoming|sed-e's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'sed-e's/Id.*/& rejecttest/'a>a.newmva.newaecho%commitrejecttesthg--debugcommit-m'rejects?'-d'3 0'-u'User Name <user@example.com>'echo%exporthgexport-o../rejecttest.difftipcd../Testecho%importhgimport../rejecttest.diffecho%catcatabechoecho%rollbackhgrollbackecho%cleanupdatehgupdate--cleanecho%kwexpand/kwshrinkonselectedfilesmkdirxecho%copyax/ahgcopyax/aecho%kwexpandahg--verbosekwexpandaecho%kwexpandx/ashouldaborthg--verbosekwexpandx/acdxhg--debugcommit-mxa-d'3 0'-u'User Name <user@example.com>'echo%catacataecho%kwshrinkainsidedirectoryxhg--verbosekwshrinkaecho%catacatacd..echo%kwexpandnonexistenthgkwexpandnonexistent2>&1|sed's/nonexistent:.*/nonexistent:/'echo%hgservehgserve-p$HGPORT-d--pid-file=hg.pid-Aaccess.log-Eerrors.logcathg.pid>>$DAEMON_PIDSecho%expansionecho%hgwebfile("$TESTDIR/get-with-headers.py"localhost:$HGPORT'/file/tip/a/?style=raw')echo%noexpansionecho%hgwebannotate("$TESTDIR/get-with-headers.py"localhost:$HGPORT'/annotate/tip/a/?style=raw')echo%hgwebchangeset("$TESTDIR/get-with-headers.py"localhost:$HGPORT'/rev/tip/?style=raw')echo%hgwebfilediff("$TESTDIR/get-with-headers.py"localhost:$HGPORT'/diff/bb948857c743/a?style=raw')echo%errorsencounteredcaterrors.logecho%merge/resolveecho'$Id$'>mhgaddmhgcommit-m4kwechofoo>>mhgcommit-m5fooecho%simplemergehgupdate4echofoo>>mhgcommit-m6foohgmergehgcommit-msimplemergecatmecho%conflicthgupdate4echobar>>mhgcommit-m8barhgmergeecho%keywordstaysoutsideconflictzonecatmecho%resolvetolocalHGMERGE=internal:localhgresolve-ahgcommit-mlocalresolvecatmecho%switchoffexpansionecho%kwshrinkwithunknownfileucpauhg--verbosekwshrinkecho%catcatabecho%hgcathgcatsymabechorm$HGRCPATHecho%catcatabecho%hgcathgcatsymabecho