RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v
retrieving revision 1.3
diff -u -r1.3 source.py
|
|
|
|
| 347 | 347 | name = 'svn' |
| 348 | 348 | |
| 349 | 349 | def __init__(self, svnurl=None, baseURL=None, defaultBranch=None, |
| 350 | | directory=None, **kwargs): |
| | 350 | directory=None, svndir=None, **kwargs): |
| 351 | 351 | """ |
| 352 | 352 | @type svnurl: string |
| 353 | 353 | @param svnurl: the URL which points to the Subversion server, |
| … |
… |
|
| 368 | 368 | explicitly. It will simply be appended |
| 369 | 369 | to C{baseURL} and the result handed to |
| 370 | 370 | the SVN command. |
| | 371 | |
| | 372 | @param svndir: if branches are enabled, this is the directory |
| | 373 | to append to the URL after C{baseURL} and the branch |
| | 374 | have been appended. You can use this to check out a |
| | 375 | subdirectory of the repository. It should start with |
| | 376 | a slash. |
| 371 | 377 | """ |
| 372 | 378 | |
| 373 | 379 | if not kwargs.has_key('workdir') and directory is not None: |
| … |
… |
|
| 379 | 385 | self.svnurl = svnurl |
| 380 | 386 | self.baseURL = baseURL |
| 381 | 387 | self.branch = defaultBranch |
| | 388 | self.svndir = svndir |
| 382 | 389 | |
| 383 | 390 | Source.__init__(self, **kwargs) |
| 384 | 391 | |
| … |
… |
|
| 448 | 455 | self.args['svnurl'] = self.svnurl |
| 449 | 456 | else: |
| 450 | 457 | self.args['svnurl'] = self.baseURL + branch |
| | 458 | if self.svndir is not None: |
| | 459 | self.args['svnurl'] = self.args['svnurl'] + self.svndir |
| | 460 | |
| | 461 | # add peg-revision to svnurl |
| | 462 | if revision is not None and revision != "HEAD": |
| | 463 | self.args['svnurl'] = self.args['svnurl'] + "@" + str(revision) |
| | 464 | |
| 451 | 465 | self.args['revision'] = revision |
| 452 | 466 | self.args['patch'] = patch |
| 453 | 467 | |
| 454 | 468 | revstuff = [] |
| 455 | 469 | if branch is not None and branch != self.branch: |
| 456 | | revstuff.append("[branch]") |
| | 470 | revstuff.append("[%s]" % branch) |
| 457 | 471 | if revision is not None: |
| 458 | 472 | revstuff.append("r%s" % revision) |
| 459 | 473 | self.description.extend(revstuff) |