From patchwork Wed Aug 7 18:13:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10, of, 36] context: use type(self).__name__ to instead of hardcoding class name From: Sean Farley X-Patchwork-Id: 2027 Message-Id: To: mercurial-devel@selenic.com Date: Wed, 07 Aug 2013 13:13:10 -0500 # HG changeset patch # User Sean Farley # Date 1375485848 18000 # Fri Aug 02 18:24:08 2013 -0500 # Node ID d5f3b9240f8d6596e97917a18bf870d60fe7fe88 # Parent 8d5fbb6e08357ca42b140eaea1d3aaa72d10aec5 context: use type(self).__name__ to instead of hardcoding class name diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -40,11 +40,11 @@ def __int__(self): return self.rev() def __repr__(self): - return "" % str(self) + return "<%s %s>" % (type(self).__name__, str(self)) def rev(self): return self._rev def node(self): return self._node