changeset 19177:1e104aaa4c44

store: move top file walk to a separate function Some extensions find it useful to be able to walk the non-data files in the repo, so I'm moving that part of the walk to a separate function. In particular, this allows an extension to interact with only the non-filelog store data (for instance, when cloning everything but filelogs).
author Durham Goode <durham@fb.com>
date Wed, 08 May 2013 14:22:00 -0700
parents aae14b3d0a9c
children 4327687ca757
files mercurial/store.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Wed May 01 10:38:41 2013 -0700
+++ b/mercurial/store.py	Wed May 08 14:22:00 2013 -0700
@@ -322,13 +322,16 @@
     def datafiles(self):
         return self._walk('data', True)
 
+    def topfiles(self):
+        # yield manifest before changelog
+        return reversed(self._walk('', False))
+
     def walk(self):
         '''yields (unencoded, encoded, size)'''
         # yield data files first
         for x in self.datafiles():
             yield x
-        # yield manifest before changelog
-        for x in reversed(self._walk('', False)):
+        for x in self.topfiles():
             yield x
 
     def copylist(self):