changeset 28206:8ab91d9290ce

treemanifest: implement iterentries() To make tests pass with _treeinmem manually set to True, we need to implement the recently added iterentries() on the treemanifest class too.
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 07 Feb 2016 21:14:01 -0800
parents 53f42c8d5f71
children 43edd3003456
files mercurial/manifest.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Thu Feb 11 15:38:56 2016 -0800
+++ b/mercurial/manifest.py	Sun Feb 07 21:14:01 2016 -0800
@@ -520,6 +520,15 @@
         self._node = node
         self._dirty = False
 
+    def iterentries(self):
+        self._load()
+        for p, n in sorted(self._dirs.items() + self._files.items()):
+            if p in self._files:
+                yield self._subpath(p), n, self._flags.get(p, '')
+            else:
+                for x in n.iterentries():
+                    yield x
+
     def iteritems(self):
         self._load()
         for p, n in sorted(self._dirs.items() + self._files.items()):