Bugzilla – Bug 1258
hgweb doesn't follow diff.git=1 option
Last modified: 2008-11-04 01:43:50 EST
The hgweb interface doesn't show the diffs in GIT style if set in hgrc. It is hard to track renames see http://hg.netbeans.org/core-main/rev/7feb73dd4871 as an example.
Confirmed with hgweb and hg serve, and I think this could be useful.
From hgweb_mod.py:456 and below (in crew-stable), it seems as if hgweb passes the repo.ui to patch.diffopts and passes the diffopts to the diff functions...
I'm all for this, if it's not already working.
see issue1223
So hgweb's diff currently uses mdiff.unidiff(), which means it doesn't get all the git-diff niceties from patch.diff(). patch.diff() wants a file-like object to write to however, which doesn't map nicely to WSGI primitives. I think patch.diff() could be implemented as a generator instead of writing to the argument fp, which seems to me like a more potent API anyway. I guess performance might be a concern. Would this be an acceptable change? (After this, showing git diffs in hgweb should be a lot easier.)
The fp interface keeps getting worked around, so yes, let's do that.
This is fixed in e74a9173c2d7, in crew.
In main, resolving.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:52 EDT --- This bug was previously known as _bug_ 1258 at http://mercurial.selenic.com/bts/issue1258