changeset 140:56b14dd2e3da

correct syntax
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 24 Jan 2011 12:53:15 -0800
parents a0866ad63d93
children 19719b24957e
files autobot/process/factory.py autobot/template/master/master.cfg
diffstat 2 files changed, 3 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/process/factory.py	Mon Jan 24 12:37:14 2011 -0800
+++ b/autobot/process/factory.py	Mon Jan 24 12:53:15 2011 -0800
@@ -131,10 +131,10 @@
 
     # install the packages
     sources = []
-    for hg_source in self.sources.get('hg', ()):
+    for hg_source, branch in self.sources.get('hg', ()):
       package = hg_source.rstrip('/').rsplit('/', 1)[-1]
       sources.append(package)
-    for git_source in self.sources.get('git', ()):
+    for git_source, branch in self.sources.get('git', ()):
       package = git_source.rstrip('/').rsplit('/', 1)[-1]
       if package.endswith('.git'):
         package = package[:-4]
--- a/autobot/template/master/master.cfg	Mon Jan 24 12:37:14 2011 -0800
+++ b/autobot/template/master/master.cfg	Mon Jan 24 12:53:15 2011 -0800
@@ -42,15 +42,7 @@
             continue
         for source_type in sources:
             _sources = getattr(_sources).get(source_type, [])
-            if isinstance(_sources, basestring):
-                _sources = _sources.split()
-            for source in _sources:
-                if instance(source, basestring):
-                    branch = None
-                    if '#' in source:
-                        source, branch = source.rsplit('#', 1)
-                else: # tuple
-                    source, branch = source
+            for source, branch in _sources:
                 sources[source_type].add((source, branch))
     
 c['builders'] = builders