Extended (Git) diff output for changeset diffs in Hgweb?

Stephen Lee sphen.lee at gmail.com
Sat Jun 21 05:46:06 UTC 2014


On Sat, Jun 21, 2014 at 7:24 AM, Lawrence Stewart <lstewart at room52.net> wrote:
> On 06/20/14 13:44, Matt Mackall wrote:
>> On Fri, 2014-06-20 at 11:22 -0700, Lawrence Stewart wrote:
>>> On 06/20/14 05:19, Stephen Lee wrote:
>>>> On 20 Jun 2014 12:35, "Lawrence Stewart" <lstewart at room52.net
>>>> <mailto:lstewart at room52.net>> wrote:
>>>>
>>>>     Hi all,
>>>>
>>>>     Is there a way to make Hgweb use extended diff format when displaying
>>>>     changeset diffs? Changesets which change file permissions for example
>>>>     show up as empty when viewed in Hgweb, but "diff -g -r <rev_hash>" on
>>>>     the command line shows the permissions change.
>>>>
>>>>     I tried various combinations to no avail of adding the following to the
>>>>      hgweb.conf and repo's hgrc files:
>>>>
>>>>     [diff]
>>>>     git = True
>>>>
>>>>
>>>>
>>>> I had a patch to do this... I might be able to drag it out...
>>>
>>> Ah, I obviously assumed this was functionality that existed but I was
>>> unable to figure out how to enable.
>>
>> The above DOES work, I've just confirmed it. However, there's a 99%
>> chance that you've fallen afoul of our security checks:
>>
>> http://mercurial.selenic.com/wiki/Trust
>
> huzzah! I was aware of the trust thing and do have:
>
> # cat /usr/local/etc/mercurial/hgrc
> [trusted]
> users = mercurial
>

Sorry - I should have tested it first.
I remembered having problems, but if was just the binary diff thing.
My patch allowed binary diffs to be disabled when in git diff mode.
[diff]
git = True
binary = False

Am updating it to apply on head now.

Steve



More information about the Mercurial mailing list