Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 43997:6e8678e7223a
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 27 Dec 2019 19:00:38 -0500 |
parents | 6c6d67fc45cb |
children | 8561ad49915d |
comparison
equal
deleted
inserted
replaced
43996:6dbb18e1ac8d | 43997:6e8678e7223a |
---|---|
2023 if len(l) > 1: | 2023 if len(l) > 1: |
2024 # i18n: "remote" is a keyword | 2024 # i18n: "remote" is a keyword |
2025 dest = getstring(l[1], _(b"remote requires a repository path")) | 2025 dest = getstring(l[1], _(b"remote requires a repository path")) |
2026 dest = repo.ui.expandpath(dest or b'default') | 2026 dest = repo.ui.expandpath(dest or b'default') |
2027 dest, branches = hg.parseurl(dest) | 2027 dest, branches = hg.parseurl(dest) |
2028 revs, checkout = hg.addbranchrevs(repo, repo, branches, []) | 2028 |
2029 if revs: | |
2030 revs = [repo.lookup(rev) for rev in revs] | |
2031 other = hg.peer(repo, {}, dest) | 2029 other = hg.peer(repo, {}, dest) |
2032 n = other.lookup(q) | 2030 n = other.lookup(q) |
2033 if n in repo: | 2031 if n in repo: |
2034 r = repo[n].rev() | 2032 r = repo[n].rev() |
2035 if r in subset: | 2033 if r in subset: |