# HG changeset patch # User Sean Farley # Date 1375479983 18000 # Node ID 7b864da00e21866b67848cfdad9af905270feaa1 # Parent 79671c46bb461e0a7e8677c31a8b3ebf82e69df1 basectx: move __str__ from changectx diff -r 79671c46bb46 -r 7b864da00e21 mercurial/context.py --- a/mercurial/context.py Tue Aug 06 16:42:41 2013 -0500 +++ b/mercurial/context.py Fri Aug 02 16:46:23 2013 -0500 @@ -35,6 +35,9 @@ return o + def __str__(self): + return short(self.node()) + class changectx(basectx): """A changecontext object makes access to data related to a particular changeset convenient. It represents a read-only context already presnt in @@ -140,9 +143,6 @@ raise error.RepoLookupError( _("unknown revision '%s'") % changeid) - def __str__(self): - return short(self.node()) - def __int__(self): return self.rev()