Exemplo n.º 1
0
    def get_entries(self):
        """Generator method that produces the PackageNodes and BundleNodes contained in this bundle."""
        
        # Start by looking for any sub-bundles.  Don't bother ordering them because
        # Trac will scrap the order anyway.
        for row in self.repos.sql("SELECT subbundleref FROM tw_bundles WHERE bundleref = %i" % self.id):
            yield BundleNode.with_id(self.repos, row[0])

        # Look for sub-packages next.
        for row in self.repos.sql("SELECT packageref FROM tw_packages WHERE bundleref = %i" % self.id):
            yield PackageNode.with_id(self.repos, row[0])