Mercurial > treepkg > treepkg
comparison treepkg/packager.py @ 140:0da76aee8035
Add RevisionPackager method list_log_files which returns a description
of the log files available for that revision
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Mon, 02 Jun 2008 15:46:41 +0000 |
parents | a7fa22320c3f |
children | 1dcddaacf12e |
comparison
equal
deleted
inserted
replaced
139:a7fa22320c3f | 140:0da76aee8035 |
---|---|
235 return os.path.join(self.src_dir, filename) | 235 return os.path.join(self.src_dir, filename) |
236 return None | 236 return None |
237 | 237 |
238 def has_build_log(self): | 238 def has_build_log(self): |
239 return os.path.exists(self.build_log) | 239 return os.path.exists(self.build_log) |
240 | |
241 def list_log_files(self): | |
242 """Returns a list describing the logfiles available for the revision. | |
243 Each list item is a tuple of the form (TITLE, FILENAME) where | |
244 TITLE is a string with a title usable in e. g. a web-page, and | |
245 FILENAME is the absolute filename of the log file. | |
246 """ | |
247 files = [] | |
248 if self.has_build_log(): | |
249 files.append(("build log", self.build_log)) | |
250 return files | |
240 | 251 |
241 def list_source_files(self): | 252 def list_source_files(self): |
242 """Returns a list with the names of the files of the source package. | 253 """Returns a list with the names of the files of the source package. |
243 The implementation assumes that all files in self.src_dir belong | 254 The implementation assumes that all files in self.src_dir belong |
244 to the source package. | 255 to the source package. |