Patchwork D7764: revset: drop some unused code in the `remote` revset

login
register
mail settings
Submitter phabricator
Date Dec. 28, 2019, 3:05 a.m.
Message ID <differential-rev-PHID-DREV-6y4pdh7z5itmir2wuawv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44108/
State Superseded
Headers show

Comments

phabricator - Dec. 28, 2019, 3:05 a.m.
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

Patch

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: