Mercurial > treepkg > treepkg
comparison treepkg/packager.py @ 88:3ae54f99db26
Add methods RevisionPackager.list_source_files and
RevisionPackager.list_binary_files to list the binary and source files
of a revision. Also add corresponding tests.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 11 Sep 2007 13:46:53 +0000 |
parents | 31b0567df051 |
children | 6ed1c881ee1b |
comparison
equal
deleted
inserted
replaced
87:08d8ffd40f27 | 88:3ae54f99db26 |
---|---|
226 return os.path.join(self.src_dir, filename) | 226 return os.path.join(self.src_dir, filename) |
227 return None | 227 return None |
228 | 228 |
229 def has_build_log(self): | 229 def has_build_log(self): |
230 return os.path.exists(self.build_log) | 230 return os.path.exists(self.build_log) |
231 | |
232 def list_source_files(self): | |
233 """Returns a list with the names of the files of the source package. | |
234 The implementation assumes that all files in self.src_dir belong | |
235 to the source package. | |
236 """ | |
237 return sorted(util.listdir_abs(self.src_dir)) | |
238 | |
239 def list_binary_files(self): | |
240 """Returns a list with the names of the files of the binary packages. | |
241 The implementation assumes that all files in self.binary_dir belong | |
242 to the binary packages. | |
243 """ | |
244 return sorted(util.listdir_abs(self.binary_dir)) | |
231 | 245 |
232 def package(self): | 246 def package(self): |
233 try: | 247 try: |
234 util.ensure_directory(self.work_dir) | 248 util.ensure_directory(self.work_dir) |
235 self.status.start = datetime.datetime.utcnow() | 249 self.status.start = datetime.datetime.utcnow() |