D2989: context: drop support for changeid of type long (API?)
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Mar 31 06:00:57 UTC 2018
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
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
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list