D7764: revset: drop some unused code in the `remote` revset
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Sat Dec 28 03:05:05 UTC 2019
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
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:
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list