##// END OF EJS Templates
push: move `remoteheads` into the push object...
Pierre-Yves David -
r20462:0031ef5d default
parent child Browse files
Show More
@@ -44,6 +44,8 b' class pushoperation(object):'
44 self.ret = None
44 self.ret = None
45 # discover.outgoing object (contains common and outgoin data)
45 # discover.outgoing object (contains common and outgoin data)
46 self.outgoing = None
46 self.outgoing = None
47 # all remote heads before the push
48 self.remoteheads = None
47
49
48 def push(repo, remote, force=False, revs=None, newbranch=False):
50 def push(repo, remote, force=False, revs=None, newbranch=False):
49 '''Push outgoing changesets (limited by revs) from a local
51 '''Push outgoing changesets (limited by revs) from a local
@@ -104,6 +106,7 b' def push(repo, remote, force=False, revs'
104 outgoing = fco(unfi, pushop.remote, onlyheads=pushop.revs,
106 outgoing = fco(unfi, pushop.remote, onlyheads=pushop.revs,
105 commoninc=commoninc, force=pushop.force)
107 commoninc=commoninc, force=pushop.force)
106 pushop.outgoing = outgoing
108 pushop.outgoing = outgoing
109 pushop.remoteheads = remoteheads
107
110
108
111
109 if not outgoing.missing:
112 if not outgoing.missing:
@@ -163,6 +166,8 b' def push(repo, remote, force=False, revs'
163 # commit/push race), server aborts.
166 # commit/push race), server aborts.
164 if pushop.force:
167 if pushop.force:
165 remoteheads = ['force']
168 remoteheads = ['force']
169 else:
170 remoteheads = pushop.remoteheads
166 # ssh: return remote's addchangegroup()
171 # ssh: return remote's addchangegroup()
167 # http: return remote's addchangegroup() or 0 for error
172 # http: return remote's addchangegroup() or 0 for error
168 pushop.ret = pushop.remote.unbundle(cg, remoteheads,
173 pushop.ret = pushop.remote.unbundle(cg, remoteheads,
General Comments 0
You need to be logged in to leave comments. Login now