changeset 24021:f51a822dcf3b

trydiff: remove unused argument to diffline() Now that diffline no longer knows about copies/renames, it only needs one argument for the path.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 16 Jan 2015 14:58:51 -0800
parents cc81e6da0757
children da63f557d0dc
files mercurial/patch.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Fri Jan 16 14:58:06 2015 -0800
+++ b/mercurial/patch.py	Fri Jan 16 14:58:51 2015 -0800
@@ -1753,13 +1753,13 @@
         aprefix = 'a/'
         bprefix = 'b/'
 
-    def diffline(a, b, revs):
+    def diffline(f, revs):
         if not repo.ui.quiet:
             if revs:
                 revinfo = ' '.join(["-r %s" % rev for rev in revs])
-                line = 'diff %s %s\n' % (revinfo, a)
+                line = 'diff %s %s\n' % (revinfo, f)
             else:
-                line = 'diff %s\n' % a
+                line = 'diff %s\n' % f
         else:
             line = ''
         return line
@@ -1846,7 +1846,7 @@
         path2 = posixpath.join(prefix, f2)
         header = []
         if revs:
-            header.append(diffline(path1, path2, revs))
+            header.append(diffline(path1, revs))
         elif opts.git:
             header.append('diff --git %s%s %s%s\n' %
                           (aprefix, path1, bprefix, path2))