diff hgext/mq.py @ 44823:3b7aabd02e11

cleanup: avoid extra node/ctx conversions in logcmdutil.diffordiffstat I'm about to write some code that wants to pass a memctx to diffordiffstat, but this feels like a meritorious cleanup anyway, since the first thing this method does is turn nodes into contexts, and most callers have a context handy. Differential Revision: https://phab.mercurial-scm.org/D8502
author Augie Fackler <augie@google.com>
date Thu, 07 May 2020 16:54:17 -0400
parents 9d2b2df2c2ba
children 8c466bcb0879
line wrap: on
line diff
--- a/hgext/mq.py	Tue May 12 13:06:34 2020 -0700
+++ b/hgext/mq.py	Thu May 07 16:54:17 2020 -0400
@@ -836,7 +836,15 @@
         stat = opts.get(b'stat')
         m = scmutil.match(repo[node1], files, opts)
         logcmdutil.diffordiffstat(
-            self.ui, repo, diffopts, node1, node2, m, changes, stat, fp
+            self.ui,
+            repo,
+            diffopts,
+            repo[node1],
+            repo[node2],
+            m,
+            changes,
+            stat,
+            fp,
         )
 
     def mergeone(self, repo, mergeq, head, patch, rev, diffopts):