Skip to content

Commit

Permalink
Git: add test for shallow clones.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfogal authored and Dustin J. Mitchell committed Mar 15, 2010
1 parent 5c269c0 commit 8b6e8c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions buildbot/broken_test/vc/test_vc.py
Expand Up @@ -3136,6 +3136,12 @@ def testCheckout(self):
d = self.do_vctest()
return d

def testCheckoutShallow(self):
self.helper.vcargs = { 'repourl': self.helper.gitrepo,
'shallow': True }
d = self.do_vctest()
return d

def testPatch(self):
self.helper.vcargs = { 'repourl': self.helper.gitrepo,
'branch': "master" }
Expand Down
5 changes: 5 additions & 0 deletions buildbot/steps/source.py
Expand Up @@ -705,6 +705,7 @@ def __init__(self, repourl,
branch="master",
submodules=False,
ignore_ignores=None,
shallow=False,
**kwargs):
"""
@type repourl: string
Expand All @@ -719,17 +720,21 @@ def __init__(self, repourl,
@param submodules: Whether or not to update (and initialize)
git submodules.
@type shallow: boolean
@param shallow: Use a shallow or clone, if possible
"""
Source.__init__(self, **kwargs)
self.addFactoryArguments(repourl=repourl,
branch=branch,
submodules=submodules,
ignore_ignores=ignore_ignores,
shallow=shallow,
)
self.args.update({'repourl': repourl,
'branch': branch,
'submodules': submodules,
'ignore_ignores': ignore_ignores,
'shallow': shallow,
})

def computeSourceRevision(self, changes):
Expand Down

0 comments on commit 8b6e8c3

Please sign in to comment.