Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.py @ 38523:4455e5d4d59c
context: explicitly take diffopts in `context.diff` (API)
To provide a proper replacement for the `patch.diff(?)` function, the
`context.diff(?)` method needs to be able to take more parameters. To
distinguish the diff options from the new other arguments, we upgrade the diff
options to its own explicit argument.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 22 May 2018 15:02:52 +0200 |
parents | 67dc32d4e790 |
children | 1770416de208 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Sun Jul 01 01:00:39 2018 +0530 +++ b/mercurial/hgweb/webutil.py Tue May 22 15:02:52 2018 +0200 @@ -658,7 +658,7 @@ '''Generator function that provides the diffstat data.''' stats = patch.diffstatdata( - util.iterlines(ctx.diff(basectx, noprefix=False))) + util.iterlines(ctx.diff(basectx, opts={'noprefix': False}))) maxname, maxtotal, addtotal, removetotal, binary = patch.diffstatsum(stats) while True: yield stats, maxname, maxtotal, addtotal, removetotal, binary