# HG changeset patch # User Durham Goode # Date 2013-05-08 21:22:00 # Node ID 1e104aaa4c44c37141ace2231b9b636630dc4c32 # Parent aae14b3d0a9c4c95db7e9073b828516ed9152c9b 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). diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -322,13 +322,16 @@ class basicstore(object): 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):