Merge "SCM repo: add depth option"

This commit is contained in:
Jenkins 2016-02-25 18:59:18 +00:00 committed by Gerrit Code Review
commit eee063d4b2
4 changed files with 7 additions and 0 deletions
jenkins_jobs/modules
tests
macros/fixtures/scm
scm/fixtures

@ -575,6 +575,9 @@ def repo(parser, xml_parent, data):
:arg str mirror-dir: Path to mirror directory to reference when
initialising (optional)
:arg int jobs: Number of projects to fetch simultaneously (default 0)
:arg int depth: Specify the depth in history to sync from the source. The
default is to sync all of the history. Use 1 to just sync the most
recent commit (default 0)
:arg bool current-branch: Fetch only the current branch from the server
(default true)
:arg bool quiet: Make repo more quiet
@ -607,6 +610,7 @@ def repo(parser, xml_parent, data):
("repo-url", 'repoUrl', ''),
("mirror-dir", 'mirrorDir', ''),
("jobs", 'jobs', 0),
("depth", 'depth', 0),
("current-branch", 'currentBranch', True),
("quiet", 'quiet', True),
("force-sync", 'forceSync', False),

@ -19,6 +19,7 @@
<repoUrl>https://internal.net/projects/repo</repoUrl>
<mirrorDir>~/git/project/</mirrorDir>
<jobs>3</jobs>
<depth>2</depth>
<currentBranch>false</currentBranch>
<quiet>false</quiet>
<forceSync>false</forceSync>

@ -10,6 +10,7 @@
repo-url: https://internal.net/projects/repo
mirror-dir: ~/git/project/
jobs: 3
depth: 2
current-branch: false
quiet: false
force-sync: false

@ -9,6 +9,7 @@
<repoUrl>https://internal.net/projects/repo</repoUrl>
<mirrorDir>~/git/project/</mirrorDir>
<jobs>3</jobs>
<depth>0</depth>
<currentBranch>false</currentBranch>
<quiet>false</quiet>
<forceSync>true</forceSync>