Mercurial > hg-stable
changeset 27622:0bc71f45d362
cmdutil: pass node instead of ctx to diffordiffstat
93bcc73df8d5 changed showpatch to use ctx's more, but it accidentally passed
prev as a context and node as a binary string, when both should be passed as
binary strings (since diffordiffstat tries to resolve them via repo[X]).
This affected hggit since the existing ctx belongs to the git overlay, but the
resolved context (from the repo[X] resolution) should belong to the main repo.
This broke a test because it tried to look in the git repo for data that didn't
exist.
This feels like a deeper issue in hggit somewhere, but the fix is here trivial and
obviously more correct
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 04 Jan 2016 16:14:04 -0800 |
parents | 39845b064041 |
children | b3376fba4ab9 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sun Dec 27 23:37:14 2015 +0900 +++ b/mercurial/cmdutil.py Mon Jan 04 16:14:04 2016 -0800 @@ -1308,7 +1308,7 @@ diff = self.diffopts.get('patch') diffopts = patch.diffallopts(self.ui, self.diffopts) node = ctx.node() - prev = ctx.p1() + prev = ctx.p1().node() if stat: diffordiffstat(self.ui, self.repo, diffopts, prev, node, match=matchfn, stat=True)