[PATCH 0 of 2] keyword: suppress additional differences due to expanded keywords

Christian Ebert blacktrash at gmx.net
Sun Jan 13 20:16:04 UTC 2008


Hi,

The following 2 patches try to make the keyword extension less
intrusive.

1. patch makes "hg diff" ignore expanded keywords that created
   additional differences.

This patch applies on top of my last patch to test-keyword*.

It would nice to have something similar for hgweb. Unfortunately
I haven't found a way to detect the corresponding commands on
runtime. An alternative would be to disable keyword expansion for
hgweb /display/ altogether, and just wrap repo.wwritedata for
archive downloads. However I hesitate to follow that route, as
keyword expansion is especially aimed at /single/ files and for
distribution to users not running a version control system, and
AFAIKS manually downloading 1 file would not expand keywords in
this file then.

2. patch stops "hg record" from potentially showing additional
   hunks due to expanded keywords.

The use of "record" in conjunction is still not ideal, as would
be very dirty (and too risky) to overwrite a file still
containing changes for keyword expansion. I added a note in the
help on how to work around this after all changes have been
checked in. On the upside all is fine for archiving and
distribution purposes.

c


More information about the Mercurial-devel mailing list