manifest: add id(self) to treemanifest __repr__
Also rename __str__ to __repr__ since that's what we really want for
pdb.
--- 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