changegroup: remove now-unused 'wasempty' variable and parameter
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 08 Jan 2016 21:14:08 -0800
changeset 27735 bd37212c20ed
parent 27734 5c0fd878779c
child 27736 7644d3aeedec
changegroup: remove now-unused 'wasempty' variable and parameter
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Fri Jan 08 21:13:06 2016 -0800
+++ b/mercurial/changegroup.py	Fri Jan 08 21:14:08 2016 -0800
@@ -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: