manifest: add id(self) to treemanifest __repr__
authorAugie Fackler <augie@google.com>
Fri, 25 Sep 2015 17:17:36 -0400
changeset 26400 6f9d9e2a661f
parent 26399 1f0e78f8f55f
child 26401 e93e12e2ff9a
manifest: add id(self) to treemanifest __repr__ Also rename __str__ to __repr__ since that's what we really want for pdb.
mercurial/manifest.py
--- a/mercurial/manifest.py	Mon Sep 28 10:27:36 2015 -0700
+++ b/mercurial/manifest.py	Fri Sep 25 17:17:36 2015 -0400
@@ -476,11 +476,11 @@
         return (not self._files and (not self._dirs or
                 all(m._isempty() for m in self._dirs.values())))
 
-    def __str__(self):
-        return ('<treemanifest dir=%s, node=%s, loaded=%s, dirty=%s>' %
+    def __repr__(self):
+        return ('<treemanifest dir=%s, node=%s, loaded=%s, dirty=%s at 0x%x>' %
                 (self._dir, revlog.hex(self._node),
                  bool(self._load is _noop),
-                 self._dirty))
+                 self._dirty, id(self)))
 
     def dir(self):
         '''The directory that this tree manifest represents, including a