changeset 26400:6f9d9e2a661f

manifest: add id(self) to treemanifest __repr__ Also rename __str__ to __repr__ since that's what we really want for pdb.
author Augie Fackler <augie@google.com>
date Fri, 25 Sep 2015 17:17:36 -0400
parents 1f0e78f8f55f
children e93e12e2ff9a
files mercurial/manifest.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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