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