diff -r f1b532a310e4 -r d032417db243 mercurial/exchange.py --- a/mercurial/exchange.py Thu Jan 30 20:44:55 2014 -0800 +++ b/mercurial/exchange.py Thu Jan 30 21:01:13 2014 -0800 @@ -46,6 +46,8 @@ 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 @@ -107,6 +109,7 @@ commoninc=commoninc, force=pushop.force) pushop.outgoing = outgoing pushop.remoteheads = remoteheads + pushop.incoming = inc if not outgoing.missing: @@ -140,7 +143,7 @@ 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)