diff -r de5cee8ba088 -r 71083b020b4a mercurial/exchange.py --- a/mercurial/exchange.py Sat Aug 02 21:46:27 2014 +0900 +++ b/mercurial/exchange.py Tue Jul 01 17:20:31 2014 +0200 @@ -80,6 +80,11 @@ # set of all heads common after changeset bundle push self.commonheads = None + @util.propertycache + def futureheads(self): + """future remote heads if the changeset push succeeds""" + return self.outgoing.missingheads + def push(repo, remote, force=False, revs=None, newbranch=False): '''Push outgoing changesets (limited by revs) from a local repository to remote. Return an integer: @@ -310,8 +315,7 @@ def _pushcomputecommonheads(pushop): unfi = pushop.repo.unfiltered() if pushop.ret: - # push succeed, synchronize target of the push - cheads = pushop.outgoing.missingheads + cheads = pushop.futureheads elif pushop.revs is None: # All out push fails. synchronize all common cheads = pushop.outgoing.commonheads