Skip to content
Snippets Groups Projects
Commit d36a7da9 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

discovery: drop some unused sets

Differential Revision: https://phab.mercurial-scm.org/D6145
parent 98908e36
No related branches found
No related tags found
No related merge requests found
......@@ -208,9 +208,8 @@
ctx = repo[n]
missingctx.add(ctx)
branches.add(ctx.branch())
nbranches = branches.copy()
with remote.commandexecutor() as e:
remotemap = e.callcommand('branchmap', {}).result()
remotebranches = set(remotemap)
......@@ -212,10 +211,8 @@
with remote.commandexecutor() as e:
remotemap = e.callcommand('branchmap', {}).result()
remotebranches = set(remotemap)
newbranches = branches - remotebranches
branches.difference_update(newbranches)
# A. register remote heads
for branch, heads in remotemap.iteritems():
......@@ -229,8 +226,8 @@
unsynced.append(h)
headssum[branch] = (known, list(known), unsynced)
# B. add new branch data
for branch in nbranches:
for branch in branches:
if branch not in headssum:
headssum[branch] = (None, [], [])
# C drop data about untouched branches:
......@@ -233,8 +230,8 @@
if branch not in headssum:
headssum[branch] = (None, [], [])
# C drop data about untouched branches:
for branch in remotebranches - nbranches:
for branch in remotebranches - branches:
del headssum[branch]
# D. Update newmap with outgoing changes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment