Patchwork [7,of,8] changegroup: remove now-unused 'wasempty' variable and parameter

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 10:56 p.m.
Message ID <31f80b5ac39a73e760b2.1452639391@waste.org>
Download mbox | patch
Permalink /patch/12735/
State Accepted
Commit bd37212c20ed99babd8fb865fe686dbabd7f4122
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 10:56 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1452316448 28800
#      Fri Jan 08 21:14:08 2016 -0800
# Node ID 31f80b5ac39a73e760b22a4a1c97352f4d494d82
# Parent  86bdb5382cd077082a0365f2b4c5fe69561b451c
changegroup: remove now-unused 'wasempty' variable and parameter

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -314,7 +314,6 @@ 
         - number of heads stays the same: 1
         """
         repo = repo.unfiltered()
-        wasempty = (len(repo.changelog) == 0)
         def csmap(x):
             repo.ui.debug("add changeset %s\n" % short(x))
             return len(cl)
@@ -389,7 +388,7 @@ 
             self.callback = None
             pr = prog(_('files'), efiles)
             newrevs, newfiles = _addchangegroupfiles(
-                repo, self, revmap, trp, pr, needfiles, wasempty)
+                repo, self, revmap, trp, pr, needfiles)
             revisions += newrevs
             files += newfiles
 
@@ -1033,7 +1032,7 @@ 
     # to avoid a race we use changegroupsubset() (issue1320)
     return changegroupsubset(repo, basenodes, repo.heads(), source)
 
-def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles, wasempty):
+def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles):
     revisions = 0
     files = 0
     while True: