# HG changeset patch # User Sean Farley # Date 1375480333 18000 # Node ID 5af7045b0b18dea96d5eed2326c0ad2ded23b4f3 # Parent 74924fa3236df52d0846283b01b0ffe453a6707a basectx: move __int__ from changectx diff -r 74924fa3236d -r 5af7045b0b18 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 "" % str(self)