Show More
@@ -77,8 +77,6 b' class pushoperation(object):' | |||||
77 | self.remoteheads = None |
|
77 | self.remoteheads = None | |
78 | # testable as a boolean indicating if any nodes are missing locally. |
|
78 | # testable as a boolean indicating if any nodes are missing locally. | |
79 | self.incoming = None |
|
79 | self.incoming = None | |
80 | # set of all heads common after changeset bundle push |
|
|||
81 | self.commonheads = None |
|
|||
82 |
|
80 | |||
83 | @util.propertycache |
|
81 | @util.propertycache | |
84 | def futureheads(self): |
|
82 | def futureheads(self): | |
@@ -117,6 +115,13 b' class pushoperation(object):' | |||||
117 | cheads.extend(c.node() for c in revset) |
|
115 | cheads.extend(c.node() for c in revset) | |
118 | return cheads |
|
116 | return cheads | |
119 |
|
117 | |||
|
118 | @property | |||
|
119 | def commonheads(self): | |||
|
120 | """set of all common heads after changeset bundle push""" | |||
|
121 | if self.ret: | |||
|
122 | return self.futureheads | |||
|
123 | else: | |||
|
124 | return self.fallbackheads | |||
120 |
|
125 | |||
121 | def push(repo, remote, force=False, revs=None, newbranch=False): |
|
126 | def push(repo, remote, force=False, revs=None, newbranch=False): | |
122 | '''Push outgoing changesets (limited by revs) from a local |
|
127 | '''Push outgoing changesets (limited by revs) from a local | |
@@ -174,7 +179,6 b' def push(repo, remote, force=False, revs' | |||||
174 | and pushop.remote.capable('bundle2-exp')): |
|
179 | and pushop.remote.capable('bundle2-exp')): | |
175 | _pushbundle2(pushop) |
|
180 | _pushbundle2(pushop) | |
176 | _pushchangeset(pushop) |
|
181 | _pushchangeset(pushop) | |
177 | _pushcomputecommonheads(pushop) |
|
|||
178 | _pushsyncphase(pushop) |
|
182 | _pushsyncphase(pushop) | |
179 | _pushobsolete(pushop) |
|
183 | _pushobsolete(pushop) | |
180 | finally: |
|
184 | finally: | |
@@ -345,13 +349,6 b' def _pushchangeset(pushop):' | |||||
345 | # change |
|
349 | # change | |
346 | pushop.ret = pushop.remote.addchangegroup(cg, 'push', pushop.repo.url()) |
|
350 | pushop.ret = pushop.remote.addchangegroup(cg, 'push', pushop.repo.url()) | |
347 |
|
351 | |||
348 | def _pushcomputecommonheads(pushop): |
|
|||
349 | if pushop.ret: |
|
|||
350 | cheads = pushop.futureheads |
|
|||
351 | else: |
|
|||
352 | cheads = pushop.fallbackheads |
|
|||
353 | pushop.commonheads = cheads |
|
|||
354 |
|
||||
355 | def _pushsyncphase(pushop): |
|
352 | def _pushsyncphase(pushop): | |
356 | """synchronise phase information locally and remotely""" |
|
353 | """synchronise phase information locally and remotely""" | |
357 | unfi = pushop.repo.unfiltered() |
|
354 | unfi = pushop.repo.unfiltered() |
General Comments 0
You need to be logged in to leave comments.
Login now