Skip to content

Commit

Permalink
Merge branch 'features/svn-script-parameters' of git://github.com/sma…
Browse files Browse the repository at this point in the history
…rr/buildbot

* 'features/svn-script-parameters' of git://github.com/smarr/buildbot:
  Added project parameter and added an option to give a different repo for the slaves to access.
  • Loading branch information
djmitche committed Jun 26, 2011
2 parents de6eb27 + 656694a commit c6bc467
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions master/contrib/svn_buildbot.py
Expand Up @@ -60,6 +60,7 @@ class Options(usage.Options):
optParameters = [
['repository', 'r', None,
"The repository that was changed."],
['slave-repo', 'c', None, "In case the repository differs for the slaves."],
['revision', 'v', None,
"The revision that we want to examine (default: latest)"],
['bbserver', 's', 'localhost',
Expand All @@ -82,6 +83,7 @@ class Options(usage.Options):
include and an exclude will be excluded.'''],
['encoding', 'e', "utf8",
"The encoding of the strings from subversion (default: utf8)" ],
['project', 'P', None, "The project for the source."]
]
optFlags = [
['dryrun', 'n', "Do not actually send changes"],
Expand Down Expand Up @@ -151,6 +153,7 @@ def getChanges(self, opts):

# first we extract information about the files that were changed
repo = opts['repository']
slave_repo = opts['slave-repo'] or repo
print "Repo:", repo
rev_arg = ''
if opts['revision']:
Expand Down Expand Up @@ -201,9 +204,10 @@ def getChanges(self, opts):
encoding = opts['encoding']
for branch in files_per_branch.keys():
d = {'who': unicode(who, encoding=encoding),
'repository': unicode(repo, encoding=encoding),
'repository': unicode(slave_repo, encoding=encoding),
'comments': unicode(message, encoding=encoding),
'revision': revision
'revision': revision,
'project' : unicode(opts['project'] or "", encoding=encoding)
}
if branch:
d['branch'] = unicode(branch, encoding=encoding)
Expand Down

0 comments on commit c6bc467

Please sign in to comment.