##// END OF EJS Templates
discovery: prevent recomputing info about server and outgoing changesets...
Pulkit Goyal -
r42193:98908e36 default
parent child Browse files
Show More
@@ -201,19 +201,24 b' def _headssummary(pushop):'
201 201 outgoing = pushop.outgoing
202 202 cl = repo.changelog
203 203 headssum = {}
204 missingctx = set()
204 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 213 with remote.commandexecutor() as e:
208 214 remotemap = e.callcommand('branchmap', {}).result()
209 215
210 newbranches = branches - set(remotemap)
216 remotebranches = set(remotemap)
217 newbranches = branches - remotebranches
211 218 branches.difference_update(newbranches)
212 219
213 220 # A. register remote heads
214 remotebranches = set()
215 221 for branch, heads in remotemap.iteritems():
216 remotebranches.add(branch)
217 222 known = []
218 223 unsynced = []
219 224 knownnode = cl.hasnode # do not use nodemap until it is filtered
@@ -224,16 +229,12 b' def _headssummary(pushop):'
224 229 unsynced.append(h)
225 230 headssum[branch] = (known, list(known), unsynced)
226 231 # B. add new branch data
227 missingctx = list(repo[n] for n in outgoing.missing)
228 touchedbranches = set()
229 for ctx in missingctx:
230 branch = ctx.branch()
231 touchedbranches.add(branch)
232 for branch in nbranches:
232 233 if branch not in headssum:
233 234 headssum[branch] = (None, [], [])
234 235
235 236 # C drop data about untouched branches:
236 for branch in remotebranches - touchedbranches:
237 for branch in remotebranches - nbranches:
237 238 del headssum[branch]
238 239
239 240 # D. Update newmap with outgoing changes.
General Comments 0
You need to be logged in to leave comments. Login now