changeset 19545:5af7045b0b18

basectx: move __int__ from changectx
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 02 Aug 2013 16:52:13 -0500
parents 74924fa3236d
children a45cf68dd9a2
files mercurial/context.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)