mercurial/context.py
changeset 4909 1fd7a99d98f6
parent 4889 3b081f2a77b2
child 5389 26c060922085
--- 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