author | Matt Mackall <mpm@selenic.com> |
Sat, 21 Jul 2007 16:02:09 -0500 | |
changeset 4909 | 1fd7a99d98f6 |
parent 4908 | 8c294ee7047e |
child 4910 | fd96bc61a18b |
--- a/mercurial/context.py Sat Jul 21 16:02:09 2007 -0500 +++ b/mercurial/context.py Sat Jul 21 16:02:09 2007 -0500 @@ -60,6 +60,18 @@ else: raise AttributeError, name + def __contains__(self, key): + return key in self._manifest + + def __getitem__(self, key): + return self.filectx(key) + + def __iter__(self): + a = self._manifest.keys() + a.sort() + for f in a: + return f + def changeset(self): return self._changeset def manifest(self): return self._manifest