From e47991af385ef94e79c571ff754c18c4af402bca Mon Sep 17 00:00:00 2001 From: Matthew Bellew Date: Sat, 7 Nov 2015 12:53:56 -0800 Subject: [PATCH] require description --- bin/enlist_main.py | 30 +++++++++++++++++++----------- cds.config | 2 ++ modules15_3.config | 2 ++ release15_3.config | 2 ++ trunk.config | 2 ++ 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/bin/enlist_main.py b/bin/enlist_main.py index 28cbed4..e07247f 100755 --- a/bin/enlist_main.py +++ b/bin/enlist_main.py @@ -192,22 +192,21 @@ def check_svn(config): return True -def compare_url(a,b): +def strip_url(a): a = a.lower() - b = b.lower() if a.startswith("http://"): a = a[7:] elif a.startswith("https://"): a = a[8:] - if b.startswith("http://"): - b = b[7:] - elif b.startswith("https://"): - b = b[8:] if a.startswith("www."): a = a[4:] - if b.startswith("www."): - b = b[4:] - return a.lower() == b.lower() + if a.endswith(".git"): + a = a[:len(a)-4] + return a + + +def compare_url(a,b): + return strip_url(a) == strip_url(b) def find_all_repos(): @@ -250,6 +249,7 @@ def parse_property(line): def parse_configuration_file(config_file): configs = [] config = None + description = None f = open(config_file,"r") for line in f.readlines(): @@ -261,9 +261,11 @@ def parse_configuration_file(config_file): configs.append(config) config = Config() config.name = line[1:len(line)-1] - if config is None: - continue (key,value) = parse_property(line) + if key=="description" and not config: + description = value + if not config: + continue if key=="checkout": config.checkout = value elif key=="repo": @@ -276,6 +278,12 @@ def parse_configuration_file(config_file): if config is not None: configs.append(config) + + if not description: + print "description is empty, fix it: " + config_file + sys.exit(1) + if verbose: + print description for config in configs: config.validate() return configs diff --git a/cds.config b/cds.config index 61b95ff..3c93f6d 100644 --- a/cds.config +++ b/cds.config @@ -1,3 +1,5 @@ +description = This is the configuration for on-going CDS work, currently using labkey/release15.3 + [./] checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/release15.3 diff --git a/modules15_3.config b/modules15_3.config index f63fdd3..16774cf 100644 --- a/modules15_3.config +++ b/modules15_3.config @@ -1,3 +1,5 @@ +description = for ongoing work on "non-core" svn modules on the stable branch + [./] checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/modules15.3 . diff --git a/release15_3.config b/release15_3.config index cc59b09..ed3440d 100644 --- a/release15_3.config +++ b/release15_3.config @@ -1,3 +1,5 @@ +description = stabilization/hotfix branch for release15.3 + [./] checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/release15.3 . diff --git a/trunk.config b/trunk.config index 56cb725..8b59e6f 100644 --- a/trunk.config +++ b/trunk.config @@ -1,3 +1,5 @@ +description = For main-line development on the labkey trunk, incldues most common git modules + [./] checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/trunk .