keyword expansion for archive only

Christian Ebert blacktrash at gmx.net
Sat Feb 24 11:05:56 UTC 2007


* Christian Ebert on Thursday, February 22, 2007 at 09:40:07 +0100:
> * Christian Ebert on Thursday, February 15, 2007 at 21:48:10 +0100:
>> * Rafael Villar Burke on Wednesday, February 14, 2007 at 05:24:24 +0100:
>>> What would probably be a nice feature is being able to expand keywords 
>>> only when using hg archive with an --expand-keywords option. That way 
>>> you don't mess with keyword expansion on normal operation, but you can 
>>> get it when using archive, that I understand is hg's unversioned way to 
>>> ease releasing the code.
>> 
>> I've done this now. Not by option though, but via config:
>> 
>> [keyword]
>> ** = archive
> 
> Unfortunately this breaks "hg diff -r" -- not "hg diff" w/o
> options.

This is fixed now.
 
> def reposetup()
> ...
>     cmd = commands.parse(ui, sys.argv[1:])[1:][0]

of course this could've been done simpler for my purposes with
commands.parse(ui, sys.argv[1:])[0]

But it breaks "hd diff -r"; I don't know why. -- Anyway, as
stated above, it should be fixed because now I get the current
command via fancyopts.

c
-- 
keyword extension for Mercurial (http://selenic.com/mercurial):
<http://www.blacktrash.org/cgi-bin/mercurial/hgkeyword/>
Mercurial crew development repository + keyword extension:
<http://www.blacktrash.org/cgi-bin/mercurial/hg-crew-keyword/>



More information about the Mercurial-devel mailing list