[PATCH 07 of 14 RFC] memctx: add __repr__ method
Sean Farley
sean.michael.farley at gmail.com
Tue Jul 9 16:54:38 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1373323717 18000
# Mon Jul 08 17:48:37 2013 -0500
# Node ID d1a3597ca37413bdf6060076f5a760822ce67036
# Parent 5c33cf436b3fa3f208166b32b2529fb2caec4f53
memctx: add __repr__ method
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1282,10 +1282,13 @@
self._extra['branch'] = 'default'
def __str__(self):
return str(self._parents[0]) + "+"
+ def __repr__(self):
+ return "<memctx %s>" % str(self)
+
def __int__(self):
return self._rev
def __nonzero__(self):
return True
More information about the Mercurial-devel
mailing list