[Buildbot-devel] [PATCH] SVN branches
Chris H
apchsf at yahoo.com
Tue Aug 22 20:39:20 UTC 2006
Sorry I sent that patch a little too soon, the
revision needs a str() around it before it is appended
to the svnurl
@@ -1719,12 +1728,19 @@
self.args['svnurl'] = self.svnurl
else:
self.args['svnurl'] = self.baseURL +
branch
+ if self.svndir is not None:
+ self.args['svnurl'] =
self.args['svnurl'] + self.svndir
+
+ if revision is not None and revision !=
"HEAD":
+ self.args['svnurl'] = self.args['svnurl']
+ "@" + str(revision)
+
+
self.args['revision'] = revision
self.args['patch'] = patch
Also, I wonder if the peg revision should only be
appended if the user has supplied a workdir argument.
Otherwise the directory will have @<revision> tacked
onto it's name when it is checked out.
-Chris
--- Chris H <apchsf at yahoo.com> wrote:
> This patch includes three changes to the SVN build
> step
>
> 1) Allow the user to specify a sub-directory of a
> branch. Previously when using branches there was no
> way to checkout a sub-directory of the branch.
>
> 2) Add peg revision to svnurl. see
>
http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html
>
> 3) Show the branch name instead of just "[branch]"
> in the status description of the step
>
> Regards,
> Chris
>
>
===================================================================
> RCS file:
>
/cvsroot/buildbot/buildbot/buildbot/process/step.py,v
> retrieving revision 1.99
> diff -u -r1.99 step.py
> --- buildbot/process/step.py 21 Aug 2006 00:43:20
> -0000 1.99
> +++ buildbot/process/step.py 22 Aug 2006 18:56:49
> -0000
> @@ -1618,7 +1618,7 @@
> name = 'svn'
>
> def __init__(self, svnurl=None, baseURL=None,
> defaultBranch=None,
> - directory=None, **kwargs):
> + directory=None, svndir=None,
> **kwargs):
> """
> @type svnurl: string
> @param svnurl: the URL which points to the
> Subversion server,
> @@ -1639,6 +1639,13 @@
> explicitly. It will
> simply be appended
> to C{baseURL} and the
> result handed to
> the SVN command.
> +
> + @param svndir: if branches are enabled,
> this
> is the directory
> + to append to the URL after
> C{baseURL} and the branch
> + have been appended. You
> can
> use this to check out a
> + subdirectory of the
> repository. It should start with
> + a slash.
> +
> """
>
> if not kwargs.has_key('workdir') and
> directory is not None:
> @@ -1650,6 +1657,8 @@
> self.svnurl = svnurl
> self.baseURL = baseURL
> self.branch = defaultBranch
> + self.svndir = svndir
> +
>
> Source.__init__(self, **kwargs)
>
> @@ -1719,12 +1728,19 @@
> self.args['svnurl'] = self.svnurl
> else:
> self.args['svnurl'] = self.baseURL +
> branch
> + if self.svndir is not None:
> + self.args['svnurl'] =
> self.args['svnurl'] + self.svndir
> +
> + if revision is not None and revision !=
> "HEAD":
> + self.args['svnurl'] =
> self.args['svnurl']
> + "@" + revision
> +
> +
> self.args['revision'] = revision
> self.args['patch'] = patch
>
> revstuff = []
> if branch is not None and branch !=
> self.branch:
> - revstuff.append("[branch]")
> + revstuff.append("[%s]" % branch)
> if revision is not None:
> revstuff.append("r%s" % revision)
> self.description.extend(revstuff)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the devel
mailing list