|
|
@ -164,30 +164,30 @@ Returns (Path): The "depot_tools" root directory.
|
|
|
|
[DEPS](/recipes/recipe_modules/gclient/__init__.py#1): [git](#recipe_modules-git), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
|
|
|
[DEPS](/recipes/recipe_modules/gclient/__init__.py#1): [git](#recipe_modules-git), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### **class [GclientApi](/recipes/recipe_modules/gclient/api.py#71)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
#### **class [GclientApi](/recipes/recipe_modules/gclient/api.py#77)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
|
|
|
|
|
|
|
|
  **@property**<br>— **def [DepsDiffException](/recipes/recipe_modules/gclient/api.py#418)(self):**
|
|
|
|
  **@property**<br>— **def [DepsDiffException](/recipes/recipe_modules/gclient/api.py#424)(self):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [\_\_call\_\_](/recipes/recipe_modules/gclient/api.py#81)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
|
|
|
— **def [\_\_call\_\_](/recipes/recipe_modules/gclient/api.py#87)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Wrapper for easy calling of gclient steps.
|
|
|
|
Wrapper for easy calling of gclient steps.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [break\_locks](/recipes/recipe_modules/gclient/api.py#285)(self):**
|
|
|
|
— **def [break\_locks](/recipes/recipe_modules/gclient/api.py#291)(self):**
|
|
|
|
|
|
|
|
|
|
|
|
Remove all index.lock files. If a previous run of git crashed, bot was
|
|
|
|
Remove all index.lock files. If a previous run of git crashed, bot was
|
|
|
|
reset, etc... we might end up with leftover index.lock files.
|
|
|
|
reset, etc... we might end up with leftover index.lock files.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [checkout](/recipes/recipe_modules/gclient/api.py#245)(self, gclient_config=None, revert=RevertOnTryserver, inject_parent_got_revision=True, extra_sync_flags=None, \*\*kwargs):**
|
|
|
|
— **def [checkout](/recipes/recipe_modules/gclient/api.py#251)(self, gclient_config=None, revert=RevertOnTryserver, inject_parent_got_revision=True, extra_sync_flags=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Return a step generator function for gclient checkouts.
|
|
|
|
Return a step generator function for gclient checkouts.
|
|
|
|
|
|
|
|
|
|
|
|
  **@staticmethod**<br>— **def [config\_to\_pythonish](/recipes/recipe_modules/gclient/api.py#133)(cfg):**
|
|
|
|
  **@staticmethod**<br>— **def [config\_to\_pythonish](/recipes/recipe_modules/gclient/api.py#139)(cfg):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [diff\_deps](/recipes/recipe_modules/gclient/api.py#361)(self, cwd):**
|
|
|
|
— **def [diff\_deps](/recipes/recipe_modules/gclient/api.py#367)(self, cwd):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [get\_config\_defaults](/recipes/recipe_modules/gclient/api.py#127)(self):**
|
|
|
|
— **def [get\_config\_defaults](/recipes/recipe_modules/gclient/api.py#133)(self):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [get\_gerrit\_patch\_root](/recipes/recipe_modules/gclient/api.py#292)(self, gclient_config=None):**
|
|
|
|
— **def [get\_gerrit\_patch\_root](/recipes/recipe_modules/gclient/api.py#298)(self, gclient_config=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns local path to the repo where gerrit patch will be applied.
|
|
|
|
Returns local path to the repo where gerrit patch will be applied.
|
|
|
|
|
|
|
|
|
|
|
@ -200,7 +200,7 @@ Instead, properly map a repository to a local path using repo_path_map.
|
|
|
|
TODO(nodir): remove this. Update all recipe tests to specify a git_repo
|
|
|
|
TODO(nodir): remove this. Update all recipe tests to specify a git_repo
|
|
|
|
matching the recipe.
|
|
|
|
matching the recipe.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [get\_repo\_path](/recipes/recipe_modules/gclient/api.py#319)(self, repo_url, gclient_config=None):**
|
|
|
|
— **def [get\_repo\_path](/recipes/recipe_modules/gclient/api.py#325)(self, repo_url, gclient_config=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns local path to the repo checkout given its url.
|
|
|
|
Returns local path to the repo checkout given its url.
|
|
|
|
|
|
|
|
|
|
|
@ -208,7 +208,7 @@ Consults cfg.repo_path_map and fallbacks to urls in configured solutions.
|
|
|
|
|
|
|
|
|
|
|
|
Returns None if not found.
|
|
|
|
Returns None if not found.
|
|
|
|
|
|
|
|
|
|
|
|
  **@staticmethod**<br>— **def [got\_revision\_reverse\_mapping](/recipes/recipe_modules/gclient/api.py#138)(cfg):**
|
|
|
|
  **@staticmethod**<br>— **def [got\_revision\_reverse\_mapping](/recipes/recipe_modules/gclient/api.py#144)(cfg):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns the merged got_revision_reverse_mapping.
|
|
|
|
Returns the merged got_revision_reverse_mapping.
|
|
|
|
|
|
|
|
|
|
|
@ -216,7 +216,7 @@ Returns (dict): A mapping from property name -> project name. It merges the
|
|
|
|
values of the deprecated got_revision_mapping and the new
|
|
|
|
values of the deprecated got_revision_mapping and the new
|
|
|
|
got_revision_reverse_mapping.
|
|
|
|
got_revision_reverse_mapping.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [inject\_parent\_got\_revision](/recipes/recipe_modules/gclient/api.py#220)(self, gclient_config=None, override=False):**
|
|
|
|
— **def [inject\_parent\_got\_revision](/recipes/recipe_modules/gclient/api.py#226)(self, gclient_config=None, override=False):**
|
|
|
|
|
|
|
|
|
|
|
|
Match gclient config to build revisions obtained from build_properties.
|
|
|
|
Match gclient config to build revisions obtained from build_properties.
|
|
|
|
|
|
|
|
|
|
|
@ -226,9 +226,9 @@ Args:
|
|
|
|
override (bool) - If True, will forcibly set revision and custom_vars
|
|
|
|
override (bool) - If True, will forcibly set revision and custom_vars
|
|
|
|
even if the config already contains values for them.
|
|
|
|
even if the config already contains values for them.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [resolve\_revision](/recipes/recipe_modules/gclient/api.py#155)(self, revision):**
|
|
|
|
— **def [resolve\_revision](/recipes/recipe_modules/gclient/api.py#161)(self, revision):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [roll\_deps](/recipes/recipe_modules/gclient/api.py#422)(self, deps_path, dep_updates, strip_prefix_for_gitlink=None, test_data=None):**
|
|
|
|
— **def [roll\_deps](/recipes/recipe_modules/gclient/api.py#428)(self, deps_path, dep_updates, strip_prefix_for_gitlink=None, test_data=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Updates DEPS file to desired revisions, and returns all requried file
|
|
|
|
Updates DEPS file to desired revisions, and returns all requried file
|
|
|
|
changes.
|
|
|
|
changes.
|
|
|
@ -249,20 +249,20 @@ Returns:
|
|
|
|
commit hash.
|
|
|
|
commit hash.
|
|
|
|
Note: we expect DEPS to be in the root of the project.
|
|
|
|
Note: we expect DEPS to be in the root of the project.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [runhooks](/recipes/recipe_modules/gclient/api.py#279)(self, args=None, name='runhooks', \*\*kwargs):**
|
|
|
|
— **def [runhooks](/recipes/recipe_modules/gclient/api.py#285)(self, args=None, name='runhooks', \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [set\_patch\_repo\_revision](/recipes/recipe_modules/gclient/api.py#349)(self, gclient_config=None):**
|
|
|
|
— **def [set\_patch\_repo\_revision](/recipes/recipe_modules/gclient/api.py#355)(self, gclient_config=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Updates config revision corresponding to patched project.
|
|
|
|
Updates config revision corresponding to patched project.
|
|
|
|
|
|
|
|
|
|
|
|
Useful for bot_update only, as this is the only consumer of gclient's config
|
|
|
|
Useful for bot_update only, as this is the only consumer of gclient's config
|
|
|
|
revision map. This doesn't overwrite the revision if it was already set.
|
|
|
|
revision map. This doesn't overwrite the revision if it was already set.
|
|
|
|
|
|
|
|
|
|
|
|
  **@spec_alias.deleter**<br>— **def [spec\_alias](/recipes/recipe_modules/gclient/api.py#123)(self):**
|
|
|
|
  **@spec_alias.deleter**<br>— **def [spec\_alias](/recipes/recipe_modules/gclient/api.py#129)(self):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [sync](/recipes/recipe_modules/gclient/api.py#160)(self, cfg, extra_sync_flags=None, \*\*kwargs):**
|
|
|
|
— **def [sync](/recipes/recipe_modules/gclient/api.py#166)(self, cfg, extra_sync_flags=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
  **@use_mirror.setter**<br>— **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#110)(self, val):**
|
|
|
|
  **@use_mirror.setter**<br>— **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#116)(self, val):**
|
|
|
|
### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit)
|
|
|
|
### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit)
|
|
|
|
|
|
|
|
|
|
|
|
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#3): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time]
|
|
|
|
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#3): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time]
|
|
|
@ -406,13 +406,13 @@ Returns:
|
|
|
|
[DEPS](/recipes/recipe_modules/git/__init__.py#3): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
|
|
|
[DEPS](/recipes/recipe_modules/git/__init__.py#3): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### **class [GitApi](/recipes/recipe_modules/git/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
#### **class [GitApi](/recipes/recipe_modules/git/api.py#19)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
|
|
|
|
|
|
|
|
— **def [\_\_call\_\_](/recipes/recipe_modules/git/api.py#14)(self, \*args, \*\*kwargs):**
|
|
|
|
— **def [\_\_call\_\_](/recipes/recipe_modules/git/api.py#22)(self, \*args, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns a git command step.
|
|
|
|
Returns a git command step.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [bundle\_create](/recipes/recipe_modules/git/api.py#373)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
|
|
|
|
— **def [bundle\_create](/recipes/recipe_modules/git/api.py#382)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Runs 'git bundle create' on a Git repository.
|
|
|
|
Runs 'git bundle create' on a Git repository.
|
|
|
|
|
|
|
|
|
|
|
@ -422,11 +422,11 @@ Args:
|
|
|
|
refs in the Git checkout will be bundled.
|
|
|
|
refs in the Git checkout will be bundled.
|
|
|
|
* kwargs: Forwarded to '__call__'.
|
|
|
|
* kwargs: Forwarded to '__call__'.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [cat\_file\_at\_commit](/recipes/recipe_modules/git/api.py#34)(self, file_path, commit_hash, remote_name=None, \*\*kwargs):**
|
|
|
|
— **def [cat\_file\_at\_commit](/recipes/recipe_modules/git/api.py#42)(self, file_path, commit_hash, remote_name=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Outputs the contents of a file at a given revision.
|
|
|
|
Outputs the contents of a file at a given revision.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [checkout](/recipes/recipe_modules/git/api.py#107)(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, raise_on_failure=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, tags=False):**
|
|
|
|
— **def [checkout](/recipes/recipe_modules/git/api.py#116)(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, raise_on_failure=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, tags=False):**
|
|
|
|
|
|
|
|
|
|
|
|
Performs a full git checkout and returns sha1 of checked out revision.
|
|
|
|
Performs a full git checkout and returns sha1 of checked out revision.
|
|
|
|
|
|
|
|
|
|
|
@ -465,7 +465,7 @@ Args:
|
|
|
|
Returns: If the checkout was successful, this returns the commit hash of
|
|
|
|
Returns: If the checkout was successful, this returns the commit hash of
|
|
|
|
the checked-out-repo. Otherwise this returns None.
|
|
|
|
the checked-out-repo. Otherwise this returns None.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [config\_get](/recipes/recipe_modules/git/api.py#342)(self, prop_name, \*\*kwargs):**
|
|
|
|
— **def [config\_get](/recipes/recipe_modules/git/api.py#351)(self, prop_name, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns git config output.
|
|
|
|
Returns git config output.
|
|
|
|
|
|
|
|
|
|
|
@ -475,7 +475,7 @@ Args:
|
|
|
|
|
|
|
|
|
|
|
|
Returns: (str) The Git config output, or None if no output was generated.
|
|
|
|
Returns: (str) The Git config output, or None if no output was generated.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [count\_objects](/recipes/recipe_modules/git/api.py#42)(self, previous_result=None, raise_on_failure=False, \*\*kwargs):**
|
|
|
|
— **def [count\_objects](/recipes/recipe_modules/git/api.py#50)(self, previous_result=None, raise_on_failure=False, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns `git count-objects` result as a dict.
|
|
|
|
Returns `git count-objects` result as a dict.
|
|
|
|
|
|
|
|
|
|
|
@ -488,11 +488,11 @@ Args:
|
|
|
|
Returns:
|
|
|
|
Returns:
|
|
|
|
A dict of count-object values, or None if count-object run failed.
|
|
|
|
A dict of count-object values, or None if count-object run failed.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [fetch\_tags](/recipes/recipe_modules/git/api.py#28)(self, remote_name=None, \*\*kwargs):**
|
|
|
|
— **def [fetch\_tags](/recipes/recipe_modules/git/api.py#36)(self, remote_name=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Fetches all tags from the remote.
|
|
|
|
Fetches all tags from the remote.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#361)(self, remote_name=None, \*\*kwargs):**
|
|
|
|
— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#370)(self, remote_name=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns the remote Git repository URL, or None.
|
|
|
|
Returns the remote Git repository URL, or None.
|
|
|
|
|
|
|
|
|
|
|
@ -502,11 +502,11 @@ Args:
|
|
|
|
|
|
|
|
|
|
|
|
Returns: (str) The URL of the remote Git repository, or None.
|
|
|
|
Returns: (str) The URL of the remote Git repository, or None.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#313)(self, commit='HEAD', test_data=None, \*\*kwargs):**
|
|
|
|
— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#322)(self, commit='HEAD', test_data=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Find and return the timestamp of the given commit.
|
|
|
|
Find and return the timestamp of the given commit.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [new\_branch](/recipes/recipe_modules/git/api.py#386)(self, branch, name=None, upstream=None, upstream_current=False, \*\*kwargs):**
|
|
|
|
— **def [new\_branch](/recipes/recipe_modules/git/api.py#395)(self, branch, name=None, upstream=None, upstream_current=False, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Runs git new-branch on a Git repository, to be used before git cl
|
|
|
|
Runs git new-branch on a Git repository, to be used before git cl
|
|
|
|
upload.
|
|
|
|
upload.
|
|
|
@ -518,7 +518,7 @@ Args:
|
|
|
|
* upstream_current (bool): whether to use '--upstream_current'.
|
|
|
|
* upstream_current (bool): whether to use '--upstream_current'.
|
|
|
|
* kwargs: Forwarded to '__call__'.
|
|
|
|
* kwargs: Forwarded to '__call__'.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [number](/recipes/recipe_modules/git/api.py#417)(self, commitrefs=None, test_values=None):**
|
|
|
|
— **def [number](/recipes/recipe_modules/git/api.py#426)(self, commitrefs=None, test_values=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Computes the generation number of some commits.
|
|
|
|
Computes the generation number of some commits.
|
|
|
|
|
|
|
|
|
|
|
@ -535,7 +535,7 @@ A list of strings containing the generation numbers of the commits.
|
|
|
|
If non-empty commitrefs was provided, the order of the returned
|
|
|
|
If non-empty commitrefs was provided, the order of the returned
|
|
|
|
numbers will correspond to the order of the provided commitrefs.
|
|
|
|
numbers will correspond to the order of the provided commitrefs.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [rebase](/recipes/recipe_modules/git/api.py#322)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
|
|
|
|
— **def [rebase](/recipes/recipe_modules/git/api.py#331)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Runs rebase HEAD onto branch
|
|
|
|
Runs rebase HEAD onto branch
|
|
|
|
|
|
|
|
|
|
|
@ -574,16 +574,16 @@ If you set `path` to None, this will remove the default.
|
|
|
|
[DEPS](/recipes/recipe_modules/gitiles/__init__.py#7): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/url][recipe_engine/recipe_modules/url]
|
|
|
|
[DEPS](/recipes/recipe_modules/gitiles/__init__.py#7): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/url][recipe_engine/recipe_modules/url]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### **class [Gitiles](/recipes/recipe_modules/gitiles/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
#### **class [Gitiles](/recipes/recipe_modules/gitiles/api.py#18)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
|
|
|
|
|
|
|
|
|
|
|
Module for polling a git repository using the Gitiles web interface.
|
|
|
|
Module for polling a git repository using the Gitiles web interface.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [canonicalize\_repo\_url](/recipes/recipe_modules/gitiles/api.py#222)(self, repo_url):**
|
|
|
|
— **def [canonicalize\_repo\_url](/recipes/recipe_modules/gitiles/api.py#231)(self, repo_url):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns a canonical form of repo_url. If not recognized, returns as is.
|
|
|
|
Returns a canonical form of repo_url. If not recognized, returns as is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
— **def [commit\_log](/recipes/recipe_modules/gitiles/api.py#114)(self, url, commit, step_name=None, attempts=None):**
|
|
|
|
— **def [commit\_log](/recipes/recipe_modules/gitiles/api.py#121)(self, url, commit, step_name=None, attempts=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns: (dict) the Gitiles commit log structure for a given commit.
|
|
|
|
Returns: (dict) the Gitiles commit log structure for a given commit.
|
|
|
|
|
|
|
|
|
|
|
@ -593,7 +593,7 @@ Args:
|
|
|
|
* step_name (str): If not None, override the step name.
|
|
|
|
* step_name (str): If not None, override the step name.
|
|
|
|
* attempts (int): Number of times to try the request before failing.
|
|
|
|
* attempts (int): Number of times to try the request before failing.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [download\_archive](/recipes/recipe_modules/gitiles/api.py#162)(self, repository_url, destination, revision='refs/heads/main'):**
|
|
|
|
— **def [download\_archive](/recipes/recipe_modules/gitiles/api.py#171)(self, repository_url, destination, revision='refs/heads/main'):**
|
|
|
|
|
|
|
|
|
|
|
|
Downloads an archive of the repo and extracts it to `destination`.
|
|
|
|
Downloads an archive of the repo and extracts it to `destination`.
|
|
|
|
|
|
|
|
|
|
|
@ -609,7 +609,7 @@ Args:
|
|
|
|
* revision (str): The ref or revision in the repo to download. Defaults to
|
|
|
|
* revision (str): The ref or revision in the repo to download. Defaults to
|
|
|
|
'refs/heads/main'.
|
|
|
|
'refs/heads/main'.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [download\_file](/recipes/recipe_modules/gitiles/api.py#130)(self, repository_url, file_path, branch='main', step_name=None, attempts=None, \*\*kwargs):**
|
|
|
|
— **def [download\_file](/recipes/recipe_modules/gitiles/api.py#137)(self, repository_url, file_path, branch='main', step_name=None, attempts=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Downloads raw file content from a Gitiles repository.
|
|
|
|
Downloads raw file content from a Gitiles repository.
|
|
|
|
|
|
|
|
|
|
|
@ -623,7 +623,7 @@ Args:
|
|
|
|
Returns:
|
|
|
|
Returns:
|
|
|
|
Raw file content.
|
|
|
|
Raw file content.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [log](/recipes/recipe_modules/gitiles/api.py#68)(self, url, ref, limit=0, cursor=None, step_name=None, attempts=None, \*\*kwargs):**
|
|
|
|
— **def [log](/recipes/recipe_modules/gitiles/api.py#75)(self, url, ref, limit=0, cursor=None, step_name=None, attempts=None, \*\*kwargs):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns the most recent commits under the given ref with properties.
|
|
|
|
Returns the most recent commits under the given ref with properties.
|
|
|
|
|
|
|
|
|
|
|
@ -646,17 +646,17 @@ Returns:
|
|
|
|
Cursor can be used for subsequent calls to log for paging. If None,
|
|
|
|
Cursor can be used for subsequent calls to log for paging. If None,
|
|
|
|
signals that there are no more commits to fetch.
|
|
|
|
signals that there are no more commits to fetch.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [parse\_repo\_url](/recipes/recipe_modules/gitiles/api.py#211)(self, repo_url):**
|
|
|
|
— **def [parse\_repo\_url](/recipes/recipe_modules/gitiles/api.py#220)(self, repo_url):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns (host, project) pair.
|
|
|
|
Returns (host, project) pair.
|
|
|
|
|
|
|
|
|
|
|
|
Returns (None, None) if repo_url is not recognized.
|
|
|
|
Returns (None, None) if repo_url is not recognized.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [refs](/recipes/recipe_modules/gitiles/api.py#56)(self, url, step_name='refs', attempts=None):**
|
|
|
|
— **def [refs](/recipes/recipe_modules/gitiles/api.py#63)(self, url, step_name='refs', attempts=None):**
|
|
|
|
|
|
|
|
|
|
|
|
Returns a list of refs in the remote repository.
|
|
|
|
Returns a list of refs in the remote repository.
|
|
|
|
|
|
|
|
|
|
|
|
— **def [unparse\_repo\_url](/recipes/recipe_modules/gitiles/api.py#218)(self, host, project):**
|
|
|
|
— **def [unparse\_repo\_url](/recipes/recipe_modules/gitiles/api.py#227)(self, host, project):**
|
|
|
|
|
|
|
|
|
|
|
|
Generates a Gitiles repo URL. See also parse_repo_url.
|
|
|
|
Generates a Gitiles repo URL. See also parse_repo_url.
|
|
|
|
### *recipe_modules* / [gsutil](/recipes/recipe_modules/gsutil)
|
|
|
|
### *recipe_modules* / [gsutil](/recipes/recipe_modules/gsutil)
|
|
|
|