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

Laurens Holst laurens.nospam at grauw.nl
Mon Jun 11 08:13:52 CDT 2012


Op 11-06-12 15:04, Patrick Mézard schreef:
> 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.

Ah! I was thinking of an URL parameter with corresponding drop-down box. 
Given that I would want it to default to little context (~3 lines), but 
change it as needed to provide more.

Btw, the context parameter could apply not only to column diffs but also 
to plain old diffs. Maybe that’s something to consider when 
naming/implementing.

~Laurens



More information about the Mercurial-devel mailing list