Mercurial > hg
changeset 42027:d36a7da96a5a
discovery: drop some unused sets
Differential Revision: https://phab.mercurial-scm.org/D6145
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sun, 17 Mar 2019 18:34:28 +0300 |
parents | 98908e36d58a |
children | 0cc9d7918754 |
files | mercurial/discovery.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/discovery.py Sun Mar 17 18:29:23 2019 +0300 +++ b/mercurial/discovery.py Sun Mar 17 18:34:28 2019 +0300 @@ -208,14 +208,11 @@ 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) - newbranches = branches - remotebranches - branches.difference_update(newbranches) # A. register remote heads for branch, heads in remotemap.iteritems(): @@ -229,12 +226,12 @@ 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: - for branch in remotebranches - nbranches: + for branch in remotebranches - branches: del headssum[branch] # D. Update newmap with outgoing changes.