[PATCH 1 of 2] patchbomb: remove unused git parameter from patch.diffstat()

Henning Schild henning at hennsch.de
Sat Nov 12 09:36:52 EST 2016


# HG changeset patch
# User Henning Schild <henning at hennsch.de>
# Date 1478954177 -3600
#      Sat Nov 12 13:36:17 2016 +0100
# Node ID a2012c6555da7b6d3a4e70df26a04040adb58471
# Parent  e1d6aa0e4c3aed73e0dc523b8a8fd5f9fe23510a
patchbomb: remove unused git parameter from patch.diffstat()

Since 628a4a9e411d the parameter is not used anymore.

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -166,7 +166,7 @@
         while patchlines and not patchlines[0].strip():
             patchlines.pop(0)
 
-    ds = patch.diffstat(patchlines, git=opts.get('git'))
+    ds = patch.diffstat(patchlines)
     if opts.get('diffstat'):
         body += ds + '\n\n'
 
diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -476,8 +476,7 @@
                 for chunk, label in patch.difflabel(iter, difflines):
                     ui.write(chunk, label=label)
             if opts['stat']:
-                for chunk, label in patch.diffstatui(difflines, width=width,
-                                                     git=True):
+                for chunk, label in patch.diffstatui(difflines, width=width):
                     ui.write(chunk, label=label)
 
 def singlepatchcmds(ui, repo, pats, opts, subcommand):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1202,8 +1202,7 @@
         chunks = patch.diff(repo, node1, node2, match, changes, diffopts,
                             prefix=prefix, relroot=relroot)
         for chunk, label in patch.diffstatui(util.iterlines(chunks),
-                                             width=width,
-                                             git=diffopts.git):
+                                             width=width):
             write(chunk, label=label)
     else:
         for chunk, label in patch.diffui(repo, node1, node2, match,
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2550,7 +2550,7 @@
     addresult()
     return results
 
-def diffstat(lines, width=80, git=False):
+def diffstat(lines, width=80):
     output = []
     stats = diffstatdata(lines)
     maxname, maxtotal, totaladds, totalremoves, hasbinary = diffstatsum(stats)


More information about the Mercurial-devel mailing list