Commit 0f09f971 authored by Emma's avatar Emma Committed by Commit Bot

Adds progress argument option to fetch for git checkout

Bug:768229
Change-Id: If6988e3a75e66beb2900360b10d63560b4c0b345
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/681194
Commit-Queue: Emma Söderberg <emso@chromium.org>
Reviewed-by: 's avatarPaweł Hajdan Jr. <phajdan.jr@chromium.org>
parent 2fceee8f
......@@ -370,7 +370,7 @@ Returns:
Return a git command step.
&mdash; **def [bundle\_create](/recipes/recipe_modules/git/api.py#366)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
&mdash; **def [bundle\_create](/recipes/recipe_modules/git/api.py#370)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
Run 'git bundle create' on a Git repository.
......@@ -384,7 +384,7 @@ Args:
Outputs the contents of a file at a given revision.
&mdash; **def [checkout](/recipes/recipe_modules/git/api.py#110)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False):**
&mdash; **def [checkout](/recipes/recipe_modules/git/api.py#110)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False, progress=True):**
Performs a full git checkout and returns sha1 of checked out revision.
......@@ -417,11 +417,12 @@ Args:
to a local path, may cause problem with scripts that do
"git fetch origin" or "git push origin".
* arbitrary refs such refs/whatever/not-fetched-by-default-to-cache
progress (bool): wether to show progress for fetch or not
Returns: If the checkout was successful, this returns the commit hash of
the checked-out-repo. Otherwise this returns None.
&mdash; **def [config\_get](/recipes/recipe_modules/git/api.py#339)(self, prop_name, \*\*kwargs):**
&mdash; **def [config\_get](/recipes/recipe_modules/git/api.py#343)(self, prop_name, \*\*kwargs):**
Returns: (str) The Git config output, or None if no output was generated.
......@@ -446,7 +447,7 @@ Returns:
Fetches all tags from the remote.
&mdash; **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#356)(self, remote_name=None, \*\*kwargs):**
&mdash; **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#360)(self, remote_name=None, \*\*kwargs):**
Returns: (str) The URL of the remote Git repository, or None.
......@@ -454,11 +455,11 @@ Args:
remote_name: (str) The name of the remote to query, defaults to 'origin'.
kwargs: Forwarded to '__call__'.
&mdash; **def [get\_timestamp](/recipes/recipe_modules/git/api.py#311)(self, commit='HEAD', test_data=None, \*\*kwargs):**
&mdash; **def [get\_timestamp](/recipes/recipe_modules/git/api.py#315)(self, commit='HEAD', test_data=None, \*\*kwargs):**
Find and return the timestamp of the given commit.
&mdash; **def [new\_branch](/recipes/recipe_modules/git/api.py#379)(self, branch, name=None, upstream=None, \*\*kwargs):**
&mdash; **def [new\_branch](/recipes/recipe_modules/git/api.py#383)(self, branch, name=None, upstream=None, \*\*kwargs):**
Runs git new-branch on a Git repository, to be used before git cl upload.
......@@ -468,7 +469,7 @@ Args:
upstream (str): to origin/master.
kwargs: Forwarded to '__call__'.
&mdash; **def [rebase](/recipes/recipe_modules/git/api.py#320)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
&mdash; **def [rebase](/recipes/recipe_modules/git/api.py#324)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
Run rebase HEAD onto branch
Args:
......
......@@ -114,7 +114,7 @@ class GitApi(recipe_api.RecipeApi):
set_got_revision=False, remote_name=None,
display_fetch_size=None, file_name=None,
submodule_update_recursive=True,
use_git_cache=False):
use_git_cache=False, progress=True):
"""Performs a full git checkout and returns sha1 of checked out revision.
Args:
......@@ -146,6 +146,7 @@ class GitApi(recipe_api.RecipeApi):
to a local path, may cause problem with scripts that do
"git fetch origin" or "git push origin".
* arbitrary refs such refs/whatever/not-fetched-by-default-to-cache
progress (bool): wether to show progress for fetch or not
Returns: If the checkout was successful, this returns the commit hash of
the checked-out-repo. Otherwise this returns None.
......@@ -238,6 +239,9 @@ class GitApi(recipe_api.RecipeApi):
if recursive:
fetch_args.append('--recurse-submodules')
if progress:
fetch_args.append('--progress')
fetch_env = {'PATH': path}
fetch_stderr = None
if curl_trace_file:
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"testing",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -17,7 +17,8 @@
"retry",
"fetch",
"origin",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"refs/foo/bar",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"abcdef12345",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -40,7 +40,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"refs/foo/bar",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -68,7 +68,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]\\src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -20,7 +20,8 @@
"fetch",
"not_origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
......@@ -18,7 +18,8 @@
"fetch",
"origin",
"master",
"--recurse-submodules"
"--recurse-submodules",
"--progress"
],
"cwd": "[START_DIR]/src",
"env": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment