Ticket #338 (closed defect: fixed)

Opened 3 years ago

Last modified 16 months ago

SVN source incompatible with repo/branch/project scheme

Reported by: alge Owned by:
Priority: major Milestone: 0.8.+
Version: 0.7.8 Keywords: svn repoproj
Cc:

Description

I'm trying to get buildbot to work with a repository with a  http://svnserver/repo/branch/project scheme. It works for trunk, but for branches the SVN source module seems to be impossible.

Example: repo = repo, branch = branches/foo, project=bar. An SVN source with svnurl=repo + "/" + branch + "/" + project fails, because SVN source has "assert not branch" if you set svnurl.

An SVN source with baseurl=repo, branch=branch will check out  http://repo/branches/foo, not  http://repo/branches/foo/project. This will checkout all the projects with that branch. There is no way to specify the project part with the baseurl scheme.

One solution could be to throw out the baseurl stuff and make svnurl truly configurable, i.e. svnurl="repo/%BRANCH%/project" - and let the SVN source do s/%BRANCH%/branch/. Or just removing the "assert not branch" for svnurl would let you work around the problem by using svnurls instead.

Change History

comment:1 Changed 3 years ago by alge

For the record, I fixed it for myself by removing the assertion and re-starting buildbot. But I think it should be fixed - it's pretty annoying that the svn changesource supports repo/branches/project but that the vc-support svn source is incompatible with it.

comment:2 Changed 3 years ago by dustin

patches welcome!

which assert did you remove?

comment:3 Changed 3 years ago by alge

This one: http://buildbot.net/trac/browser/buildbot/steps/source.py#L455

.. but line 458 is the real problem. As you can see it sets svnurl = baseURL + branch, making it impossible to have anything after the branch in the url. svnurl = baseURL + branch + project would work for my case, but I'd rather have something like svnurl = svnurl.replace('%BRANCH%', branch). (=

comment:4 Changed 3 years ago by dustin

That sounds good. A patch would be great :)

comment:5 Changed 3 years ago by dustin

  • Milestone changed from undecided to 0.7.+

comment:6 Changed 21 months ago by dustin

  • Keywords svn repoproj added

I need to look to see if this is still a problem in the most recent versions.

comment:7 Changed 16 months ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

Merge branch 'ticket_338' of  git://github.com/gvalkov/buildbot

Fixes #338.

Changeset: 6ccd9a962a168d0032d2536648037dc4fafa9c93

Note: See TracTickets for help on using tickets.