Skip to content

Commit

Permalink
Remove unnecessary code, fix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
in3xes committed Jul 23, 2011
1 parent 7872eb6 commit b7f94b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions master/buildbot/steps/source/git.py
Expand Up @@ -68,6 +68,7 @@ def __init__(self, repourl=None, branch='master', mode='incremental',
self.shallow = shallow
self.fetchcount = 0
self.clobberOnFailure = clobberOnFailure
self.mode = mode
Source.__init__(self, **kwargs)
self.addFactoryArguments(branch=branch,
mode=mode,
Expand All @@ -81,12 +82,10 @@ def __init__(self, repourl=None, branch='master', mode='incremental',
clobberOnFailure,
)

self.mode = mode
assert self.mode in ['incremental', 'full']
assert self.repourl is not None
if self.mode == 'full':
assert self.method in ['clean', 'fresh', 'clobber', 'copy', None]
self.repourl = self.repourl

def startVC(self, branch, revision, patch):
self.branch = branch or 'master'
Expand Down
5 changes: 1 addition & 4 deletions master/buildbot/steps/source/mercurial.py
Expand Up @@ -72,8 +72,8 @@ def __init__(self, repourl=None, baseURL=None, mode='incremental',
self.branchType = branchType
self.method = method
self.clobberOnBranchChange = clobberOnBranchChange
Source.__init__(self, **kwargs)
self.mode = mode
Source.__init__(self, **kwargs)
self.addFactoryArguments(repourl=repourl,
baseURL=baseURL,
mode=mode,
Expand All @@ -94,9 +94,6 @@ def __init__(self, repourl=None, baseURL=None, mode='incremental',
raise ValueError("you must privide at least one of repourl and"
" baseURL")

self.repourl = self.repourl
self.baseURL = self.baseURL

def startVC(self, branch, revision, patch):
self.revision = revision
self.method = self._getMethod()
Expand Down

0 comments on commit b7f94b9

Please sign in to comment.