SCM repo: add reset-first option

Change-Id: Iafb79bb98ac3863f996027caa9136725cc59e973
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
This commit is contained in:
Lucas Dutra Nunes 2016-02-15 10:33:19 -02:00
parent e5d291b79b
commit 993e82a409
4 changed files with 7 additions and 0 deletions

View File

@ -579,6 +579,9 @@ def repo(parser, xml_parent, data):
recent commit (default 0)
:arg bool current-branch: Fetch only the current branch from the server
(default true)
:arg bool reset-first: Remove any commits that are not on the repositories
by running the following command before anything else (default false):
``repo forall -c "git reset --hard"``
:arg bool quiet: Make repo more quiet
(default true)
:arg bool force-sync: Continue sync even if a project fails to sync
@ -611,6 +614,7 @@ def repo(parser, xml_parent, data):
("jobs", 'jobs', 0),
("depth", 'depth', 0),
("current-branch", 'currentBranch', True),
("reset-first", 'resetFirst', False),
("quiet", 'quiet', True),
("force-sync", 'forceSync', False),
("local-manifest", 'localManifest', ''),

View File

@ -21,6 +21,7 @@
<jobs>3</jobs>
<depth>2</depth>
<currentBranch>false</currentBranch>
<resetFirst>false</resetFirst>
<quiet>false</quiet>
<forceSync>false</forceSync>
</scm>

View File

@ -11,6 +11,7 @@
<jobs>3</jobs>
<depth>0</depth>
<currentBranch>false</currentBranch>
<resetFirst>true</resetFirst>
<quiet>false</quiet>
<forceSync>true</forceSync>
<localManifest>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

View File

@ -9,6 +9,7 @@ scm:
mirror-dir: ~/git/project/
jobs: 3
current-branch: false
reset-first: true
quiet: false
force-sync: true
local-manifest: |