phases: remove trace of addednodes in the 'phase-heads' handling
authorBoris Feld <boris.feld@octobus.net>
Thu, 13 Jul 2017 21:10:55 +0200
changeset 33460 57a017f79e96
parent 33459 67a3204c83c1
child 33461 bb72031f0ea8
phases: remove trace of addednodes in the 'phase-heads' handling updatephases have no use of the 'addednodes' parameter since 50243c975fc2. However caller are still passing it for nothing, remove the parameter and remove computing of the added nodes in caller.
mercurial/bundle2.py
mercurial/phases.py
--- a/mercurial/bundle2.py	Wed Jul 12 22:39:48 2017 +0200
+++ b/mercurial/bundle2.py	Thu Jul 13 21:10:55 2017 +0200
@@ -1788,11 +1788,7 @@
 def handlephases(op, inpart):
     """apply phases from bundle part to repo"""
     headsbyphase = _readphaseheads(inpart)
-    addednodes = []
-    for entry in op.records['changegroup']:
-        addednodes.extend(entry['addednodes'])
-    phases.updatephases(op.repo.unfiltered(), op.gettransaction(), headsbyphase,
-                        addednodes)
+    phases.updatephases(op.repo.unfiltered(), op.gettransaction(), headsbyphase)
 
 @parthandler('reply:pushkey', ('return', 'in-reply-to'))
 def handlepushkeyreply(op, inpart):
--- a/mercurial/phases.py	Wed Jul 12 22:39:48 2017 +0200
+++ b/mercurial/phases.py	Thu Jul 13 21:10:55 2017 +0200
@@ -527,7 +527,7 @@
         headsbyphase[phase] = [cl.node(r) for r in repo.revs(revset, subset)]
     return headsbyphase
 
-def updatephases(repo, tr, headsbyphase, addednodes):
+def updatephases(repo, tr, headsbyphase):
     """Updates the repo with the given phase heads"""
     # Now advance phase boundaries of all but secret phase
     for phase in allphases[:-1]: