[PATCH 1 of 2] phases: remove trace of addednodes in the 'phase-heads' handling

Boris Feld boris.feld at octobus.net
Fri Jul 14 13:44:29 UTC 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1499973055 -7200
#      Thu Jul 13 21:10:55 2017 +0200
# Node ID 23a2483541d50b8dce47a061a92a2b2089a42202
# Parent  50243c975fc2ee605ebac493f4ab18d37117e46a
# EXP-Topic cleanup.changegroup
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.

diff -r 50243c975fc2 -r 23a2483541d5 mercurial/bundle2.py
--- a/mercurial/bundle2.py	Tue Jul 11 05:06:01 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):
diff -r 50243c975fc2 -r 23a2483541d5 mercurial/phases.py
--- a/mercurial/phases.py	Tue Jul 11 05:06:01 2017 +0200
+++ b/mercurial/phases.py	Thu Jul 13 21:10:55 2017 +0200
@@ -446,7 +446,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]:


More information about the Mercurial-devel mailing list