[PATCH 3 of 4] hgmerge: remove obsoleted code, update docs

Jesse Glick jesse.glick at sun.com
Fri Jan 11 15:28:36 CST 2008


Jesse Glick wrote:
> This is assuming that '**' is automatically taken to be more general and 
> not take precedence. [...]
> 
> Unfortunately encode/decode hooks do _not_ do this sensibly, so
> 
> [encode]
> ** = cleverencode:
> **.gz = gunzip
> 
> will not work: Hg sorts these hooks before applying them, and '**' sorts 
> before just about everything. The workaround is a bit nasty:
> 
> [encode]
> glob:** = cleverencode:
> **.gz = gunzip

I have to apologize for the incorrect example. In fact ':' is treated 
like '=' in config files and so terminates the key. Revised workaround:

[encode]
{}** = cleverencode:
**.gz = gunzip

'{}**' should sort after practically any other plausible pattern, I 
think ('{' is near the end of the ASCII range), so it would suffice for 
most purposes to just always use '{}**' in place of '**' as a match-all 
pattern for filters. In fact I would suggest patching 
contrib/win32/mercurial.ini and doc/hgrc.5.txt accordingly.



More information about the Mercurial-devel mailing list