Changeset 189:2d89178707a0 for src/mlx
- Timestamp:
- 05/17/12 17:39:21 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/update.py
r129 r189 42 42 for (path, (size, sum)) in self._files.iteritems(): 43 43 yield (path, size, sum) 44 45 def copy(self): 46 """Create a copy of the manifest.""" 47 manifest = Manifest() 48 manifest._files = self._files.copy() 49 return manifest 44 50 45 51 def addFile(self, path, size, sum): … … 99 105 100 106 return (modifiedAndNew, removed) 107 108 def __contains__(self, path): 109 """Determine if the given path is in the manifest.""" 110 return path in self._files 111 112 def __getitem__(self, path): 113 """Get data of the file with the given path.""" 114 return self._files[path] if path in self._files else None 101 115 102 116 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.