diff options
author | Sean Finney <seanius@debian.org> | 2011-03-29 23:23:38 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2011-03-29 23:23:38 +0200 |
commit | 0dca0a021910998afe3e9caa7fc159698b3eb784 (patch) | |
tree | 2c9b67067ce3e66232c25030373afcba85fa84e1 /patchtracker/SourceArchive.py | |
parent | 29fd662321515dc68bda4ec0fd4d52c2b1dbbc4f (diff) | |
parent | 0e6d288bf4c21b043a02c6cc19367bb937397edd (diff) | |
download | patch-tracker-0dca0a021910998afe3e9caa7fc159698b3eb784.tar.gz |
Merge commit '0e6d288bf4c21b043a02c6cc19367bb937397edd' into django-rewrite
Diffstat (limited to 'patchtracker/SourceArchive.py')
-rwxr-xr-x | patchtracker/SourceArchive.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py index ce3459a..303bcdd 100755 --- a/patchtracker/SourceArchive.py +++ b/patchtracker/SourceArchive.py @@ -4,6 +4,7 @@ from fnmatch import fnmatch from gzip import GzipFile from debian_bundle import deb822 import difflib +from patchtracker import Conf import models @@ -30,6 +31,8 @@ class Archive: def parsesuites(self, filter=None): slist = os.listdir(self.distsdir) + if Conf.suites: + slist = set(Conf.suites).intersection(set(slist)) if filter: slist = set(filter).intersection(set(slist)) for s in sorted(slist): @@ -151,9 +154,11 @@ class ReleaseList: def __init__(self, project): self.project = project - # XXX this is hard coded for now... self.relorder = {} - self.relorder["debian"] = ["etch", "lenny", "squeeze", "sid", "experimental"] + if Conf.suites: + self.relorder["debian"] = Conf.suites + else: + self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "sid", "experimental"] def __iter__(self): for r in self.relorder[self.project]: @@ -164,17 +169,17 @@ if __name__ == "__main__": import Conf import sys import copy - a = Archive(sys.argv[1], suitefilter=["etch"]) + a = Archive(sys.argv[1], suitefilter=["lenny"]) b = copy.deepcopy(a) b.addsuite("lenny") - b.addcomponent("etch", "something") + b.addcomponent("lenny", "something") class x: def __init__(self,name): self.name=name - b.addsourcepackage("etch","main",x("foo")) + b.addsourcepackage("lenny","main",x("foo")) print "suite diff" print "\n".join( ArchiveDiffer().diffsuites(a,b) ) print "component diff" - print "\n".join( ArchiveDiffer().diffcomponents(a,b,"etch") ) + print "\n".join( ArchiveDiffer().diffcomponents(a,b,"lenny") ) print "package diff" - print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"etch","main") ) + print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"lenny","main") ) |