# HG changeset patch # User Matt Harbison # Date 2019-12-28 00:00:38 # Node ID 6e8678e7223a361f486ca21491b7584fad386501 # Parent 6dbb18e1ac8d8d41a43f0ae4086d54eb974c9a65 revset: drop some unused code in the `remote` revset 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. Differential Revision: https://phab.mercurial-scm.org/D7764 diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2025,9 +2025,7 @@ def remote(repo, subset, x): 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: