Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 38519: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 | 5d88fd1bc2af |
children | 54d7aaa243cc |
line wrap: on
line diff
--- a/mercurial/revset.py Sun Jul 01 01:00:39 2018 +0530 +++ b/mercurial/revset.py Tue May 22 15:02:52 2018 +0200 @@ -1802,7 +1802,7 @@ 'phase': lambda r: repo[r].phase(), 'substate': lambda r: repo[r].substate, 'summary': lambda r: repo[r].description().splitlines()[0], - 'diff': lambda r: list(repo[r].diff(git=True),) + 'diff': lambda r: list(repo[r].diff(opts={'git': True}),) } for info in fields: getfield = _funcs.get(info, None)