revset: drop some unused code in the `remote` revset
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 27 Dec 2019 19:00:38 -0500
changeset 43997 6e8678e7223a
parent 43996 6dbb18e1ac8d
child 44000 60de488cad11
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
mercurial/revset.py
--- a/mercurial/revset.py	Fri Dec 27 18:52:48 2019 -0500
+++ b/mercurial/revset.py	Fri Dec 27 19:00:38 2019 -0500
@@ -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: