https://bz.mercurial-scm.org/show_bug.cgi?id=5521
Bug ID: 5521 Summary: kwexpand / kwshrink: want a --force option Product: Mercurial Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: feature Priority: wish Component: keyword Assignee: bugzi...@mercurial-scm.org Reporter: r8yo1...@sneakemail.com CC: blacktr...@gmx.net, mercurial-devel@mercurial-scm.org Currently if you use kwexpand on a file and that file doesn't have unexpanded keywords that match your expansion template, you get 'abort: outstanding uncommitted changes'. I'd like a way to force the expansion in that case. example: cat > testkw << eof hg init foo cd foo echo '$KW$' > x hg ci -Am0 x hg --config keyword.'*'= --config extensions.hgext.keyword= --config keywordmaps.KW='{file} {node|short} {date|utcdate} {author|user}' kwexpand x cat x hg --config keyword.'*'= --config extensions.hgext.keyword= --config keywordmaps.KW='{file} {node|short} {date|utcdate} {author|user}' kwshrink x echo '$KW manual/cruft $' > x cat x hg --config keyword.'*'= --config extensions.hgext.keyword= --config keywordmaps.KW='{file} {node|short} {date|utcdate} {author|user}' kwexpand x eof sh -x testkw + hg init foo + cd foo + echo '$KW$' + hg ci -Am0 x + hg --config 'keyword.*=' --config extensions.hgext.keyword= --config 'keywordmaps.KW={file} {node|short} {date|utcdate} {author|user}' kwexpand x + cat x $KW: x 946614f451c8 2017/04/04 22:33:11 jhein $ + hg --config 'keyword.*=' --config extensions.hgext.keyword= --config 'keywordmaps.KW={file} {node|short} {date|utcdate} {author|user}' kwshrink x + echo '$KW manual/cruft $' + cat x $KW manual/cruft $ + hg --config 'keyword.*=' --config extensions.hgext.keyword= --config 'keywordmaps.KW={file} {node|short} {date|utcdate} {author|user}' kwexpand x abort: outstanding uncommitted changes I've wanted this for a while, but haven't had the chops to fashion a patch. Does this seem like a reasonable option for keyword? Might there be any gotchas to be wary of in the implementation of a --force? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel