Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webutil.py @ 34855:35c6a54ec1ff
diff: also yield file context objects in patch.trydiff() (API)
And retrieve them in patch.diffhunks(). We'll use these in forthcoming
changesets to filter diff hunks by line range.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 05 Oct 2017 21:20:08 +0200 |
parents | 3caec3c032c8 |
children | a9454beb9dd8 0279c2267d00 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Wed Oct 04 15:27:43 2017 +0200 +++ b/mercurial/hgweb/webutil.py Thu Oct 05 21:20:08 2017 +0200 @@ -479,7 +479,7 @@ parity = paritygen(web.stripecount) diffhunks = patch.diffhunks(repo, node1, node2, m, opts=diffopts) - for blockno, (header, hunks) in enumerate(diffhunks, 1): + for blockno, (fctx1, fctx2, header, hunks) in enumerate(diffhunks, 1): if style != 'raw': header = header[1:] lines = [h + '\n' for h in header]