Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 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 | dffd2ed9a7c4 |
children | d46db4390715 |
comparison
equal
deleted
inserted
replaced
27621:39845b064041 | 27622:0bc71f45d362 |
---|---|
1306 if matchfn: | 1306 if matchfn: |
1307 stat = self.diffopts.get('stat') | 1307 stat = self.diffopts.get('stat') |
1308 diff = self.diffopts.get('patch') | 1308 diff = self.diffopts.get('patch') |
1309 diffopts = patch.diffallopts(self.ui, self.diffopts) | 1309 diffopts = patch.diffallopts(self.ui, self.diffopts) |
1310 node = ctx.node() | 1310 node = ctx.node() |
1311 prev = ctx.p1() | 1311 prev = ctx.p1().node() |
1312 if stat: | 1312 if stat: |
1313 diffordiffstat(self.ui, self.repo, diffopts, prev, node, | 1313 diffordiffstat(self.ui, self.repo, diffopts, prev, node, |
1314 match=matchfn, stat=True) | 1314 match=matchfn, stat=True) |
1315 if diff: | 1315 if diff: |
1316 if stat: | 1316 if stat: |