D3192: addbranchrevs: no longer accept revset as "revs" (API)

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sun Apr 8 16:48:16 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The only caller was removed in https://phab.mercurial-scm.org/rHG0b4692b9646dda65a25868ad168023728b19b4c8 (bundle: avoid
  repo.lookup() for converting revnum to nodeid, 2018-04-02).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3192

AFFECTED FILES
  mercurial/hg.py

CHANGE DETAILS

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -66,9 +66,7 @@
     hashbranch, branches = branches
     if not hashbranch and not branches:
         x = revs or None
-        if util.safehasattr(revs, 'first'):
-            y = revs.first()
-        elif revs:
+        if revs:
             y = revs[0]
         else:
             y = None



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list