basectx: move __int__ from changectx
authorSean Farley <sean.michael.farley@gmail.com>
Fri, 02 Aug 2013 16:52:13 -0500
changeset 19545 5af7045b0b18
parent 19544 74924fa3236d
child 19546 a45cf68dd9a2
basectx: move __int__ from changectx
mercurial/context.py
--- a/mercurial/context.py	Fri Aug 02 16:50:13 2013 -0500
+++ b/mercurial/context.py	Fri Aug 02 16:52:13 2013 -0500
@@ -38,6 +38,9 @@
     def __str__(self):
         return short(self.node())
 
+    def __int__(self):
+        return self.rev()
+
     def rev(self):
         return self._rev
     def node(self):
@@ -150,9 +153,6 @@
         raise error.RepoLookupError(
             _("unknown revision '%s'") % changeid)
 
-    def __int__(self):
-        return self.rev()
-
     def __repr__(self):
         return "<changectx %s>" % str(self)