comparison 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
comparison
equal deleted inserted replaced
38518:cf24f678adda 38519:4455e5d4d59c
1800 'files': lambda r: repo[r].files(), 1800 'files': lambda r: repo[r].files(),
1801 'parents': lambda r: repo[r].parents(), 1801 'parents': lambda r: repo[r].parents(),
1802 'phase': lambda r: repo[r].phase(), 1802 'phase': lambda r: repo[r].phase(),
1803 'substate': lambda r: repo[r].substate, 1803 'substate': lambda r: repo[r].substate,
1804 'summary': lambda r: repo[r].description().splitlines()[0], 1804 'summary': lambda r: repo[r].description().splitlines()[0],
1805 'diff': lambda r: list(repo[r].diff(git=True),) 1805 'diff': lambda r: list(repo[r].diff(opts={'git': True}),)
1806 } 1806 }
1807 for info in fields: 1807 for info in fields:
1808 getfield = _funcs.get(info, None) 1808 getfield = _funcs.get(info, None)
1809 if getfield is None: 1809 if getfield is None:
1810 raise error.ParseError( 1810 raise error.ParseError(