--- a/mercurial/discovery.py Mon May 29 05:45:59 2017 +0200
+++ b/mercurial/discovery.py Mon May 29 10:56:00 2017 +0200
@@ -182,7 +182,7 @@
return og
-def _headssummary(repo, remote, outgoing):
+def _headssummary(pushop):
"""compute a summary of branch and heads status before and after push
return {'branch': ([remoteheads], [newheads], [unsyncedheads])} mapping
@@ -193,6 +193,9 @@
- newheads: the new remote heads (known locally) with outgoing pushed
- unsyncedheads: the list of remote heads unknown locally.
"""
+ repo = pushop.repo.unfiltered()
+ remote = pushop.remote
+ outgoing = pushop.outgoing
cl = repo.changelog
headssum = {}
# A. Create set of branches involved in the push.
@@ -311,7 +314,7 @@
return
if remote.capable('branchmap'):
- headssum = _headssummary(repo, remote, outgoing)
+ headssum = _headssummary(pushop)
else:
headssum = _oldheadssummary(repo, remoteheads, outgoing, inc)
newbranches = [branch for branch, heads in headssum.iteritems()