[cig-commits] r21913 - in cs/buildbot/trunk/buildbot: . steps

brad at geodynamics.org brad at geodynamics.org
Fri Apr 19 14:26:24 PDT 2013


Author: brad
Date: 2013-04-19 14:26:24 -0700 (Fri, 19 Apr 2013)
New Revision: 21913

Modified:
   cs/buildbot/trunk/buildbot/bs.py
   cs/buildbot/trunk/buildbot/repositories.py
   cs/buildbot/trunk/buildbot/steps/source.py
Log:
Small tweaks to try to add branch to git cloning.

Modified: cs/buildbot/trunk/buildbot/bs.py
===================================================================
--- cs/buildbot/trunk/buildbot/bs.py	2013-04-19 20:22:55 UTC (rev 21912)
+++ cs/buildbot/trunk/buildbot/bs.py	2013-04-19 21:26:24 UTC (rev 21913)
@@ -401,10 +401,10 @@
 
     def generativeSteps(self, buildEnv, buildConfig, env, desc, workdir, configureArgs, line):
         steps = []
-        if self.location:
-            steps = self.location.sourceSteps(
-                workdir = workdir + "/config/BuildSystem",
-                mode = 'clobber')
+        #if self.location:
+        #    steps = self.location.sourceSteps(
+        #        workdir = workdir + "/config/BuildSystem",
+        #        mode = 'clobber')
         return steps
 
     def buildSteps(self, buildEnv, buildConfig, env, desc, workdir, configureArgs, line):

Modified: cs/buildbot/trunk/buildbot/repositories.py
===================================================================
--- cs/buildbot/trunk/buildbot/repositories.py	2013-04-19 20:22:55 UTC (rev 21912)
+++ cs/buildbot/trunk/buildbot/repositories.py	2013-04-19 21:26:24 UTC (rev 21913)
@@ -132,11 +132,11 @@
         self.branch = branch
 
     def sourceStepKwds(self):
-        # :TODO: Need support for branch and submodules
+        # :TODO: Need support for branch
         #return {'repourl': self.repourl, 
-        #        'branch': self.branch,
-        #        'submodules': True}
-        return {'repourl': self.repourl}
+        #        'branch': self.branch}
+        return {'repourl': self.repourl,
+                'defaultBranch': self.branch}
 
     def location(self):
         return self.Location(repository=self)

Modified: cs/buildbot/trunk/buildbot/steps/source.py
===================================================================
--- cs/buildbot/trunk/buildbot/steps/source.py	2013-04-19 20:22:55 UTC (rev 21912)
+++ cs/buildbot/trunk/buildbot/steps/source.py	2013-04-19 21:26:24 UTC (rev 21913)
@@ -556,21 +556,6 @@
 
 
 class Git(Source):
-    """Check out a source tree from a git repository 'repourl'."""
-
-    name = "git"
-
-    def __init__(self, repourl, **kwargs):
-        """
-        @type  repourl: string
-        @param repourl: the URL which points at the git repository
-        """
-        self.root = None # TODO
-        self.branch = None # TODO
-        Source.__init__(self, **kwargs)
-        self.args['repourl'] = repourl
-
-class Git(Source):
     """
     Check out a source tree from a git repository 'repourl'.
 
@@ -618,11 +603,8 @@
             raise BuildSlaveTooOldError("slave is too old, does not know "
                                         "about git")
 
-        if self.repourl:
-            assert not branch # we need baseURL= to use branches
-            self.args['repourl'] = self.repourl
-        else:
-            self.args['repourl'] = self.baseURL + root + branch
+        if branch:
+            self.args['branch'] = branch
         self.args['revision'] = revision
         self.args['patch'] = patch
 



More information about the CIG-COMMITS mailing list