Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 194:d3c66ff43b4f
Refactor: standard iterator over all items and a special one for files only
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Sat, 06 Oct 2018 11:54:58 +0200 |
| parents | ede6535c4733 |
| children | f4f13a25fe3e |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Sat Oct 06 11:46:34 2018 +0200 +++ b/extensions/timestamps.py Sat Oct 06 11:54:58 2018 +0200 @@ -567,6 +567,10 @@ return key in self._d def __iter__(self): + """Iterator over all items (including metadata, comments, et al.)""" + return iter(self._d) + + def files(self): """Iterator for real files. Metadata, comments et al. are discarded
