Show More
@@ -201,19 +201,24 b' def _headssummary(pushop):' | |||||
201 | outgoing = pushop.outgoing |
|
201 | outgoing = pushop.outgoing | |
202 | cl = repo.changelog |
|
202 | cl = repo.changelog | |
203 | headssum = {} |
|
203 | headssum = {} | |
|
204 | missingctx = set() | |||
204 | # A. Create set of branches involved in the push. |
|
205 | # A. Create set of branches involved in the push. | |
205 | branches = set(repo[n].branch() for n in outgoing.missing) |
|
206 | branches = set() | |
|
207 | for n in outgoing.missing: | |||
|
208 | ctx = repo[n] | |||
|
209 | missingctx.add(ctx) | |||
|
210 | branches.add(ctx.branch()) | |||
|
211 | nbranches = branches.copy() | |||
206 |
|
212 | |||
207 | with remote.commandexecutor() as e: |
|
213 | with remote.commandexecutor() as e: | |
208 | remotemap = e.callcommand('branchmap', {}).result() |
|
214 | remotemap = e.callcommand('branchmap', {}).result() | |
209 |
|
215 | |||
210 |
|
|
216 | remotebranches = set(remotemap) | |
|
217 | newbranches = branches - remotebranches | |||
211 | branches.difference_update(newbranches) |
|
218 | branches.difference_update(newbranches) | |
212 |
|
219 | |||
213 | # A. register remote heads |
|
220 | # A. register remote heads | |
214 | remotebranches = set() |
|
|||
215 | for branch, heads in remotemap.iteritems(): |
|
221 | for branch, heads in remotemap.iteritems(): | |
216 | remotebranches.add(branch) |
|
|||
217 | known = [] |
|
222 | known = [] | |
218 | unsynced = [] |
|
223 | unsynced = [] | |
219 | knownnode = cl.hasnode # do not use nodemap until it is filtered |
|
224 | knownnode = cl.hasnode # do not use nodemap until it is filtered | |
@@ -224,16 +229,12 b' def _headssummary(pushop):' | |||||
224 | unsynced.append(h) |
|
229 | unsynced.append(h) | |
225 | headssum[branch] = (known, list(known), unsynced) |
|
230 | headssum[branch] = (known, list(known), unsynced) | |
226 | # B. add new branch data |
|
231 | # B. add new branch data | |
227 | missingctx = list(repo[n] for n in outgoing.missing) |
|
232 | for branch in nbranches: | |
228 | touchedbranches = set() |
|
|||
229 | for ctx in missingctx: |
|
|||
230 | branch = ctx.branch() |
|
|||
231 | touchedbranches.add(branch) |
|
|||
232 | if branch not in headssum: |
|
233 | if branch not in headssum: | |
233 | headssum[branch] = (None, [], []) |
|
234 | headssum[branch] = (None, [], []) | |
234 |
|
235 | |||
235 | # C drop data about untouched branches: |
|
236 | # C drop data about untouched branches: | |
236 |
for branch in remotebranches - |
|
237 | for branch in remotebranches - nbranches: | |
237 | del headssum[branch] |
|
238 | del headssum[branch] | |
238 |
|
239 | |||
239 | # D. Update newmap with outgoing changes. |
|
240 | # D. Update newmap with outgoing changes. |
General Comments 0
You need to be logged in to leave comments.
Login now