Mercurial > hg-stable
changeset 20464:d032417db243
push: move `incoming` into the push object
The fact that there is some unknown changes on remote one of the result of
discovery. It is then used by some push validation logic.
We move it in the object to be able to extract the said logic.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 30 Jan 2014 21:01:13 -0800 |
parents | f1b532a310e4 |
children | 170f71061069 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)