Mercurial > hg
comparison mercurial/context.py @ 37218:97ab6f2dc3c3
context: drop support for changeid of type long (API?)
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 ff2f90503d64 (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.
Differential Revision: https://phab.mercurial-scm.org/D2989
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 30 Mar 2018 22:46:22 -0700 |
parents | fbe34945220d |
children | de4849b67fe0 |
comparison
equal
deleted
inserted
replaced
37217:b00bd974eef5 | 37218:97ab6f2dc3c3 |
---|---|
417 try: | 417 try: |
418 if isinstance(changeid, int): | 418 if isinstance(changeid, int): |
419 self._node = repo.changelog.node(changeid) | 419 self._node = repo.changelog.node(changeid) |
420 self._rev = changeid | 420 self._rev = changeid |
421 return | 421 return |
422 if not pycompat.ispy3 and isinstance(changeid, long): | |
423 changeid = "%d" % changeid | |
424 if changeid == 'null': | 422 if changeid == 'null': |
425 self._node = nullid | 423 self._node = nullid |
426 self._rev = nullrev | 424 self._rev = nullrev |
427 return | 425 return |
428 if changeid == 'tip': | 426 if changeid == 'tip': |