Comments
Patch
@@ -44,10 +44,12 @@ class pushoperation(object):
self.ret = None
# discover.outgoing object (contains common and outgoin data)
self.outgoing = None
# all remote heads before the push
self.remoteheads = None
+ # testable as a boolean indicating if any nodes are missing locally.
+ self.incoming = None
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:
- None means nothing to push
@@ -105,10 +107,11 @@ def push(repo, remote, force=False, revs
fco = discovery.findcommonoutgoing
outgoing = fco(unfi, pushop.remote, onlyheads=pushop.revs,
commoninc=commoninc, force=pushop.force)
pushop.outgoing = outgoing
pushop.remoteheads = remoteheads
+ pushop.incoming = inc
if not outgoing.missing:
# nothing to push
scmutil.nochangesfound(unfi.ui, unfi, outgoing.excluded)
@@ -138,11 +141,11 @@ def push(repo, remote, force=False, revs
% (ctx.troubles()[0],
ctx))
newbm = pushop.ui.configlist('bookmarks', 'pushing')
discovery.checkheads(unfi, pushop.remote, outgoing,
remoteheads, pushop.newbranch,
- bool(inc), newbm)
+ bool(pushop.incoming), newbm)
_pushchangeset(pushop)
_pushsyncphase(pushop)
_pushobsolete(pushop)
finally:
if lock is not None: