diff mercurial/context.py @ 16760:ac89a23ca814 stable

context: grudging accept longs in constructor
author Matt Mackall <mpm@selenic.com>
date Mon, 21 May 2012 16:32:50 -0500
parents bfe89d65d651
children 07741a5d6608
line wrap: on
line diff
--- a/mercurial/context.py	Mon May 21 16:32:49 2012 -0500
+++ b/mercurial/context.py	Mon May 21 16:32:50 2012 -0500
@@ -26,6 +26,8 @@
             self._rev = changeid
             self._node = repo.changelog.node(changeid)
             return
+        if isinstance(changeid, long):
+            changeid = str(changeid)
         if changeid == '.':
             self._node = repo.dirstate.p1()
             self._rev = repo.changelog.rev(self._node)