[Buildbot-commits] [Buildbot] #1062: buildstep subclass of SVN step broken by 0.82 (worked with 0.81)
Buildbot
nobody at buildbot.net
Fri Mar 25 18:25:20 UTC 2011
#1062: buildstep subclass of SVN step broken by 0.82 (worked with 0.81)
----------------------------+----------------------
Reporter: aclight | Owner:
Type: support-request | Status: closed
Priority: major | Milestone: ongoing
Version: 0.8.2 | Resolution: fixed
Keywords: svn |
----------------------------+----------------------
Changes (by aclight):
* status: new => closed
* resolution: => fixed
Comment:
For what it's worth, I was able to fix this problem. I did so by changing
my SVN_HEAD_revision::__init__ method to the following.
{{{
class SVN_HEAD_revision(SVN):
"""A class based on SVN that always checks out from HEAD, regardless of
what revision was checked out of another repository."""
def __init__(self, alwaysUseLatest=True, retry=(60,5),
username=config_svn_username, password=config_svn_password,
**kwargs):
"""
See documentation of parent SVN and Source classes for explanations
of these parameters.
"""
# Store arguments that aren't directly used by this
# class into kwargs so the base class(es) will
# see and use them.
kwargs['alwaysUseLatest'] = alwaysUseLatest
kwargs['retry'] = retry
kwargs['username'] = username
kwargs['password'] = password
# I found that these lines
# were necessary when I do self.args['workdir'] =
properties.render(self.workdir)
# in this class's start() implementation, though I don't understand
why.
# This will get added to args later, after properties are rendered
if kwargs['workdir']:
self.workdir = kwargs['workdir']
# This class must always be initialized with svnurl instead
# of the alternative of using baseURL and the branch
# that triggered this build. This is because
# the code that's checked out using this class
# is not the application's source code and therefore the branch
# or revision of the actual change to the application source
# code does not apply.
self.branch = None
self.defaultBranch = None
kwargs['defaultBranch'] = None
SVN.__init__(self, **kwargs)
self.branch = None
self.defaultBranch = None
self.addFactoryArguments(
alwaysUseLatest=alwaysUseLatest,
retry=retry,
username=username,
password=password,
defaultBranch=self.defaultBranch,
)
}}}
The change was the addition of the following lines which I copied from
Source::__init__:
{{{
if kwargs['workdir']:
self.workdir = kwargs['workdir']
}}}
I don't understand why those lines were necessary but probably it is due
to my lack of Python knowledge.
In any case, thanks for your help.
--
Ticket URL: <http://trac.buildbot.net/ticket/1062#comment:4>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list