Patchwork [2,of,5] basectx: pass raw context objects to patch.diff

login
register
mail settings
Submitter Sean Farley
Date June 13, 2014, 11:56 p.m.
Message ID <2c35a9d4b14a62fa13cc.1402703763@laptop.local>
Download mbox | patch
Permalink /patch/5002/
State Accepted
Headers show

Comments

Sean Farley - June 13, 2014, 11:56 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1398807839 18000
#      Tue Apr 29 16:43:59 2014 -0500
# Node ID 2c35a9d4b14a62fa13cc2f3a06a4a729a90ed85f
# Parent  b8c00606fe83ee6ac806908fd48a182b1eb6f2e8
basectx: pass raw context objects to patch.diff

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -254,12 +254,11 @@  class basectx(object):
         if ctx2 is None:
             ctx2 = self.p1()
         if ctx2 is not None:
             ctx2 = self._repo[ctx2]
         diffopts = patch.diffopts(self._repo.ui, opts)
-        return patch.diff(self._repo, ctx2.node(), self.node(),
-                          match=match, opts=diffopts)
+        return patch.diff(self._repo, ctx2, self, match=match, opts=diffopts)
 
     @propertycache
     def _dirs(self):
         return scmutil.dirs(self._manifest)