Ejemplo n.º 1
0
 def get_recipe_revisions(self, ref):
     """Returns a RevisionList"""
     if ref.revision:
         tmp = RevisionList()
         tmp.add_revision(ref.revision)
         return tmp.as_list()
     rev_file_path = self._recipe_revisions_file(ref)
     revs = self._get_revisions_list(rev_file_path).as_list()
     if not revs:
         raise RecipeNotFoundException(ref, print_rev=True)
     return revs
Ejemplo n.º 2
0
    def get_package_revisions(self, pref):
        """Returns a RevisionList"""
        assert pref.ref.revision is not None, "BUG: server store needs PREV get_package_revisions"
        if pref.revision:
            tmp = RevisionList()
            tmp.add_revision(pref.revision)
            return tmp.as_list()

        tmp = self._package_revisions_file(pref)
        ret = self._get_revisions_list(tmp).as_list()
        if not ret:
            raise PackageNotFoundException(pref, print_rev=True)
        return ret