From patchwork Sat Dec 28 03:05:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7764: revset: drop some unused code in the `remote` revset From: phabricator X-Patchwork-Id: 44108 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 28 Dec 2019 03:05:05 +0000 mharbison72 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY PyCharm flagged the `revs = [..]` as an unused assignment. But then neither `revs` nor `checkout` is used, and I can't see where `hg.addbranchrevs()` has external side effects. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7764 AFFECTED FILES mercurial/revset.py CHANGE DETAILS To: mharbison72, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2025,9 +2025,7 @@ dest = getstring(l[1], _(b"remote requires a repository path")) dest = repo.ui.expandpath(dest or b'default') dest, branches = hg.parseurl(dest) - revs, checkout = hg.addbranchrevs(repo, repo, branches, []) - if revs: - revs = [repo.lookup(rev) for rev in revs] + other = hg.peer(repo, {}, dest) n = other.lookup(q) if n in repo: