Bug 1258 - hgweb doesn't follow diff.git=1 option (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Dirkjan Ochtman (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2008-08-12 03:37 EDT by Michal Zlamal
Modified: 2008-11-04 01:43 EST (History)
7 users (show)

(add)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Zlamal 2008-08-12 03:37:11 EDT
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.
Comment 1 Thomas Arendsen Hein 2008-08-12 04:47:13 EDT
Confirmed with hgweb and hg serve, and I think this could be useful.
Comment 2 Dirkjan Ochtman 2008-08-12 05:13:40 EDT
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...
Comment 3 Matt Mackall 2008-10-18 13:20:20 EDT
I'm all for this, if it's not already working.
Comment 4 Matt Mackall 2008-10-18 13:41:44 EDT
see issue1223
Comment 5 Dirkjan Ochtman 2008-11-02 07:10:21 EST
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.)
Comment 6 Matt Mackall 2008-11-02 13:50:23 EST
The fp interface keeps getting worked around, so yes, let's do that.
Comment 7 Dirkjan Ochtman 2008-11-03 14:41:45 EST
This is fixed in e74a9173c2d7, in crew.
Comment 8 Dirkjan Ochtman 2008-11-04 01:43:50 EST
In main, resolving.
Comment 9 Bugzilla 2012-05-12 08:52:47 EDT

--- 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