[PATCH] Option --decode for hg cat to apply decode filters

Jesse Glick jesse.glick at sun.com
Mon Feb 11 22:37:01 UTC 2008


Christian Ebert wrote:
> keywords are expanded for "hg cat" because expansion happens
> before applying any filters.

OK, disregard the parenthetical comment in the patch then.

>> -        fp.write(ctx.filectx(abs).data())
>> +        data = ctx.filectx(abs).data()
> 
> ctx.filectx(abs).data() reads filelog, which is actually
> kwfilelog for files matching [keyword] config pattern, and thus
> contains data with keywords expanded.
> 
> Or do you want keywords expanded for "hg cat -d" even for files
> /not/ configured in [keyword] section?

I have no opinion and as far as I know my patch makes no change in the 
behavior of the keywords extension; it merely applies decode filters in 
case you specify --decode, and otherwise behaves as before. If you want 
to make some change in the behavior of hg cat w.r.t. keywords, that 
would probably be a separate patch.




More information about the Mercurial-devel mailing list