Patchwork D2989: context: drop support for changeid of type long (API?)

login
register
mail settings
Submitter phabricator
Date March 31, 2018, 6 a.m.
Message ID <differential-rev-PHID-DREV-jbceq62khvblvqictfdt-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30052/
State Superseded
Headers show

Comments

phabricator - March 31, 2018, 6 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I don't see a reason to support type long. It's pretty much the same
  type as int. There was some discussion about it on the mailing list
  around the time of https://phab.mercurial-scm.org/rHGff2f90503d64ccd462c5526b7e389f96fdf0fcca (context: work around `long` not
  existing on Python 3, 2017-03-11), but I couldn't find a good reason
  to keep it. There was some mention of hgtk doing "repo[long(rev)]",
  but that was in 2012.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -419,8 +419,6 @@ 
                 self._node = repo.changelog.node(changeid)
                 self._rev = changeid
                 return
-            if not pycompat.ispy3 and isinstance(changeid, long):
-                changeid = "%d" % changeid
             if changeid == 'null':
                 self._node = nullid
                 self._rev = nullrev