[PATCH 1 of 1] hgweb: side-by-side comparison functionality

Patrick Mézard patrick at mezard.eu
Mon Jun 18 09:24:38 CDT 2012


Le 16/06/12 14:24, wujek srujek a écrit :
> # HG changeset patch
> # User wujek srujek
> # Date 1339796087 -7200
> # Node ID 42dcd87d2a3472da563003824e19d92380a78a7c
> # Parent  622aa57a90b1d1f09b3204458b087de12ce2de82
> hgweb: side-by-side comparison functionality
> 
> Adds new web command to the core, ``comparison``, which enables colorful
> side-by-side change display, which for some might be much easier to work with
> than the standard line diff output. The idea how to implement comes from the
> SonicHq extension.
> 
> The web interface gets a new link to call the comparison functionality. It lets
> users configure the amount of context lines around change blocks, or to show
> full files - check help (also in this changeset) for details and defaults. The
> setting in hgrc can be overridden by adding ``context=<value>`` to the request
> query string. The comparison creates addressable lines, so as to enable sharing
> links to specific lines, just as standard diff does.
> 
> Known limitations:
> * the column diff is done against the first parent, just as the standard diff
> * this change allows examining diffs for single files only (as I am not sure if
>   examining the whole changeset in this way would be helpful)
> * syntax highlighting of the output changes is not performed (enabling the
>   highlight extension has no influence on it)
> * * *
> hgweb, comparison: adapts monoblue style templates

(You probably want to remove this last line ^ )


+1 for the python part, I would have named the "context" URL argument "comparisoncontext" for consistency, but I will let Matt decide on that.


I see an horizontal scrollbar at the bottom of:

  http://mezard.eu/hg/hg-does-it-look-good-for-you/?style=monoblue

I have it in Firefox 14.0 (beta) on OSX. It does not appear with the original monoblue template. Is it just me?

--
Patrick Mézard


More information about the Mercurial-devel mailing list