[PATCH 4 of 4 STABLE] exchange: accept phases part in unbundle response
Martin von Zweigbergk
martinvonz at google.com
Mon Aug 3 11:37:45 CDT 2015
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1437422167 25200
# Mon Jul 20 12:56:07 2015 -0700
# Branch stable
# Node ID 70471ff28775f016ec4fc1a0ef299c03c3e6101c
# Parent 0a97524ab5dfa8f6a2ca022f74ba65895a04d9bf
exchange: accept phases part in unbundle response
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -111,6 +111,8 @@
self.outdatedphases = None
# phases changes that must be pushed if changeset push fails
self.fallbackoutdatedphases = None
+ # phases returned from server in bundle2 response
+ self.remotephases = None
# outgoing obsmarkers
self.outobsmarkers = set()
# outgoing bookmarks
@@ -664,6 +666,9 @@
pushop.pkfailcb[partid](pushop, exc)
for rephand in replyhandlers:
rephand(op)
+ for namespace, value in op.records['listkeys']:
+ if namespace == 'phases':
+ pushop.remotephases = value
def _pushchangeset(pushop):
"""Make the actual push of changeset bundle to remote repo"""
@@ -718,7 +723,11 @@
"""synchronise phase information locally and remotely"""
cheads = pushop.commonheads
# even when we don't push, exchanging phase data is useful
- remotephases = pushop.remote.listkeys('phases')
+ if pushop.remotephases is not None:
+ # phase data received in bundle2 part reply
+ remotephases = pushop.remotephases
+ else:
+ remotephases = pushop.remote.listkeys('phases')
if (pushop.ui.configbool('ui', '_usedassubrepo', False)
and remotephases # server supports phases
and pushop.cgresult is None # nothing was pushed
More information about the Mercurial-devel
mailing list