[Buildbot-commits] buildbot/buildbot/process step.py,1.74,1.75

Brian Warner warner at users.sourceforge.net
Mon Oct 24 22:42:05 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4679/buildbot/process

Modified Files:
	step.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-380
Creator:  Brian Warner <warner at lothar.com>

s/base_url/baseURL/ and s/default_branch/defaultBranch/ for SVN+Darcs

	* buildbot/process/step.py (SVN.__init__): change 'base_url' and
	'default_branch' argument names to 'baseURL' and 'defaultBranch',
	for consistency with other BuildStep arguments that use camelCase.
	Well, at least more of them use camelCase (like flunkOnWarnings)
	than don't.. I wish I'd picked one style and stuck with it
	earlier. Annoying, but it's best done before the release, since
	these arguments didn't exist at all in 0.6.6 .
	(Darcs): same
	* buildbot/test/test_vc.py (SVN.testCheckout): same
	(Darcs.testPatch): same
	* docs/buildbot.texinfo (SVN): document the change
	(Darcs): same, add some build-on-branch docs
	* docs/examples/twisted_master.cfg: match change


Index: step.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- step.py	24 Oct 2005 21:49:18 -0000	1.74
+++ step.py	24 Oct 2005 22:42:03 -0000	1.75
@@ -1243,7 +1243,7 @@
 
     name = 'svn'
 
-    def __init__(self, svnurl=None, base_url=None, default_branch=None,
+    def __init__(self, svnurl=None, baseURL=None, defaultBranch=None,
                  directory=None, **kwargs):
         """
         @type  svnurl: string
@@ -1252,19 +1252,19 @@
                        the repository host/port, the repository path, the
                        sub-tree within the repository, and the branch to
                        check out. Using C{svnurl} does not enable builds of
-                       alternate branches: use C{base_url} to enable this.
-                       Use exactly one of C{svnurl} and C{base_url}.
+                       alternate branches: use C{baseURL} to enable this.
+                       Use exactly one of C{svnurl} and C{baseURL}.
 
-        @param base_url: if branches are enabled, this is the base URL to
-                         which a branch name will be appended. It should
-                         probably end in a slash. Use exactly one of
-                         C{svnurl} and C{base_url}.
+        @param baseURL: if branches are enabled, this is the base URL to
+                        which a branch name will be appended. It should
+                        probably end in a slash. Use exactly one of
+                        C{svnurl} and C{baseURL}.
                          
-        @param default_branch: if branches are enabled, this is the branch
-                               to use if the Build does not specify one
-                               explicitly. It will simply be appended
-                               to C{base_url} and the result handed to
-                               the SVN command.
+        @param defaultBranch: if branches are enabled, this is the branch
+                              to use if the Build does not specify one
+                              explicitly. It will simply be appended
+                              to C{baseURL} and the result handed to
+                              the SVN command.
         """
 
         if not kwargs.has_key('workdir') and directory is not None:
@@ -1273,12 +1273,12 @@
                           DeprecationWarning)
             kwargs['workdir'] = directory
 
-        if not svnurl and not base_url:
-            raise ValueError("you must use exactly one of svnurl and base_url")
+        if not svnurl and not baseURL:
+            raise ValueError("you must use exactly one of svnurl and baseURL")
 
         self.svnurl = svnurl
-        self.base_url = base_url
-        self.branch = default_branch
+        self.baseURL = baseURL
+        self.branch = defaultBranch
 
         Source.__init__(self, **kwargs)
 
@@ -1341,10 +1341,10 @@
                 raise BuildSlaveTooOldError("old slave can't do patch")
 
         if self.svnurl:
-            assert not branch # we need base_url= to use branches
+            assert not branch # we need baseURL= to use branches
             self.args['svnurl'] = self.svnurl
         else:
-            self.args['svnurl'] = self.base_url + branch
+            self.args['svnurl'] = self.baseURL + branch
         self.args['revision'] = revision
         self.args['patch'] = patch
 
@@ -1364,35 +1364,35 @@
 
     name = "darcs"
 
-    def __init__(self, repourl=None, base_url=None, default_branch=None,
+    def __init__(self, repourl=None, baseURL=None, defaultBranch=None,
                  **kwargs):
         """
         @type  repourl: string
         @param repourl: the URL which points at the Darcs repository. This
                         is used as the default branch. Using C{repourl} does
                         not enable builds of alternate branches: use
-                        C{base_url} to enable this. Use either C{repourl} or
-                        C{base_url}, not both.
+                        C{baseURL} to enable this. Use either C{repourl} or
+                        C{baseURL}, not both.
 
-        @param base_url: if branches are enabled, this is the base URL to
-                         which a branch name will be appended. It should
-                         probably end in a slash. Use exactly one of
-                         C{repourl} and C{base_url}.
+        @param baseURL: if branches are enabled, this is the base URL to
+                        which a branch name will be appended. It should
+                        probably end in a slash. Use exactly one of
+                        C{repourl} and C{baseURL}.
                          
-        @param default_branch: if branches are enabled, this is the branch
-                               to use if the Build does not specify one
-                               explicitly. It will simply be appended to
-                               C{base_url} and the result handed to the
-                               'darcs pull' command.
+        @param defaultBranch: if branches are enabled, this is the branch
+                              to use if the Build does not specify one
+                              explicitly. It will simply be appended to
+                              C{baseURL} and the result handed to the
+                              'darcs pull' command.
         """
         assert kwargs['mode'] != "export", \
                "Darcs does not have an 'export' mode"
-        if (not repourl and not base_url) or (repourl and base_url):
+        if (not repourl and not baseURL) or (repourl and baseURL):
             raise ValueError("you must provide exactly one of repourl and"
-                             " base_url")
+                             " baseURL")
         self.repourl = repourl
-        self.base_url = base_url
-        self.branch = default_branch
+        self.baseURL = baseURL
+        self.branch = defaultBranch
         Source.__init__(self, **kwargs)
 
     def startVC(self, branch, revision, patch):
@@ -1423,10 +1423,10 @@
                 raise BuildSlaveTooOldError(m)
 
         if self.repourl:
-            assert not branch # we need base_url= to use branches
+            assert not branch # we need baseURL= to use branches
             self.args['repourl'] = self.repourl
         else:
-            self.args['repourl'] = self.base_url + branch
+            self.args['repourl'] = self.baseURL + branch
         self.args['revision'] = revision
         self.args['patch'] = patch
         self.cmd = LoggedRemoteCommand("darcs", self.args)





More information about the Commits mailing list