[PATCH 1 of 1 default] hgweb: column / side-by-side diff functionality

Patrick Mézard patrick at mezard.eu
Mon Jun 11 08:04:22 CDT 2012


Le 11/06/12 14:57, Laurens Holst a écrit :
> Op 11-06-12 14:36, Patrick Mézard schreef:
>> Le 11/06/12 12:09, Laurens Holst a écrit :
>>> Actually ideally you would be able to variably specify the amount of context with an URL parameter. context=3 (default), context=5 (more), context=full (complete). 
>> Sounds good to me.
>>
>> Wujek, what do you think about replacing `fullcoldiff` with `fullcolcontext` or `comparisoncontext`, where a negative value would mean everything and a positive or nul one would be the maximum number of context lines surrounding the blocks? (SequenceMatcher.get_grouped_opcodes(n) supports this since 2.3, should not be too hard to change).
> 
> Not my call obviously, but just a note that I think "comparisoncontext" is unnecessarily verbose compared to just "context" (the subject -a column-diff- is already clear from the base URL so no need to repeat it), and also that it’s nicer to use a "full" keyword instead of a "-1" magic number whose meaning is not as apparent. HTTP won’t mind ;p.

I was considering the configuration entry rather, not the HTTP parameter. "context" is bit more ambiguous in [web] section.

I think handling negative value as "full" can be convenient, it lets the parameter have a single simple type. "full" could be supported, it just requires a little more work when parsing it, which can be done later.
--
Patrick Mézard


More information about the Mercurial-devel mailing list