# HG changeset patch # User Bernhard Herzog # Date 1212421601 0 # Node ID 0da76aee803553b094a30b08f63651c095f4c472 # Parent a7fa22320c3f4905f0aa1c04c583524bb548c6a8 Add RevisionPackager method list_log_files which returns a description of the log files available for that revision diff -r a7fa22320c3f -r 0da76aee8035 treepkg/packager.py --- a/treepkg/packager.py Mon Jun 02 15:01:34 2008 +0000 +++ b/treepkg/packager.py Mon Jun 02 15:46:41 2008 +0000 @@ -238,6 +238,17 @@ def has_build_log(self): return os.path.exists(self.build_log) + def list_log_files(self): + """Returns a list describing the logfiles available for the revision. + Each list item is a tuple of the form (TITLE, FILENAME) where + TITLE is a string with a title usable in e. g. a web-page, and + FILENAME is the absolute filename of the log file. + """ + files = [] + if self.has_build_log(): + files.append(("build log", self.build_log)) + return files + def list_source_files(self): """Returns a list with the names of the files of the source package. The implementation assumes that all files in self.src_dir belong