kwdemo fixes and tweaks
Write map arguments in repo hgrc, to simulate parsing
and parsing errors.
Add branch display; change demo verbosity for branch command.
Display current [keyword] files additionally to demo.txt, as they
might influence the result.
Formatting: status indented by tab.
#!/bin/shcat<<EOF >> $HGRCPATH[extensions]hgext.keyword =[keyword]* =b = ignoreEOFecho%help# sed for backwards compatibilityhghelpkeyword\|sed-e'/^list of commands/d'-e'/hg -v help keyword/d'-e'/^$/d'echo%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}"hginitTestcdTestecho%kwshrinkshouldabortinempty/invalidrepohgkwshrinkecho'expand $Id$'>aecho'ignore $Id$'>becho%catcatabecho%defaultkeywordexpansionecho%commithg--debugcommit-A-mab-d'0 0'-u'User Name <user@example.com>'echo%statushgstatusecho%identifyhg--quietidentifyecho%catcatabecho%hgcathgcatabecho%touchtouchabecho%statushgstatusrmabecho%updatehgupdateecho%catcatabecho%copyhgcpacecho%commithg--debugcommit-ma2c-d'1 0'-u'User Name <user@example.com>'echo%cataccatacecho%touchcopiedctouchcecho%statusecho%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%hgcathgcatabecho'$Xinfo$'>>acat<<EOF >> logfirstlinesecondlineEOFecho%interruptedcommit# redirection and sed for backwards compatibilityHGEDITOR=falsehgcommit2>&1|sed-e'/edit failed:/d'echo%statushgstatusecho%commithg--debugcommit-llog-d'2 0'-u'User Name <user@example.com>'rmlogecho%statushgstatusecho%catcatabecho%hgcathgcatabcd..hgclone-r0TestTest-acdTest-acat<<EOF >> .hg/hgrc[paths]default = ../TestEOFecho%incoming# remove path to temp dir for backwards compatibilityhgincoming|sed-e'/^comparing with/d'echo%switchoffexpansioncd../Testecho%kwshrinkhg--debugkwshrinkecho%catcatabecho%hgcathgcatabrm$HGRCPATHecho%catcatabecho%hgcathgcatab