diff 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
line wrap: on
line diff
--- a/treepkg/packager.py	Tue Sep 11 10:05:15 2007 +0000
+++ b/treepkg/packager.py	Tue Sep 11 13:46:53 2007 +0000
@@ -229,6 +229,20 @@
     def has_build_log(self):
         return os.path.exists(self.build_log)
 
+    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
+        to the source package.
+        """
+        return sorted(util.listdir_abs(self.src_dir))
+
+    def list_binary_files(self):
+        """Returns a list with the names of the files of the binary packages.
+        The implementation assumes that all files in self.binary_dir belong
+        to the binary packages.
+        """
+        return sorted(util.listdir_abs(self.binary_dir))
+
     def package(self):
         try:
             util.ensure_directory(self.work_dir)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)