Commit df01c5ad authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Invoke git_setup with py3

The script is already py3 compatible.

Bug: 1289280
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Change-Id: I2dfd202fcb7981e5129a777424f7f730f8f33998
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3438328Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 0faae1c8
......@@ -384,7 +384,7 @@ PYTHON_VERSION_COMPATIBILITY: PY2+3
Returns a git command step.
&mdash; **def [bundle\_create](/recipes/recipe_modules/git/api.py#383)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
&mdash; **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.
......@@ -437,7 +437,7 @@ Args:
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#352)(self, prop_name, \*\*kwargs):**
&mdash; **def [config\_get](/recipes/recipe_modules/git/api.py#351)(self, prop_name, \*\*kwargs):**
Returns git config output.
......@@ -464,7 +464,7 @@ Returns:
Fetches all tags from the remote.
&mdash; **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#371)(self, remote_name=None, \*\*kwargs):**
&mdash; **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#370)(self, remote_name=None, \*\*kwargs):**
Returns the remote Git repository URL, or None.
......@@ -474,11 +474,11 @@ Args:
Returns: (str) The URL of the remote Git repository, or None.
&mdash; **def [get\_timestamp](/recipes/recipe_modules/git/api.py#323)(self, commit='HEAD', test_data=None, \*\*kwargs):**
&mdash; **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.
&mdash; **def [new\_branch](/recipes/recipe_modules/git/api.py#396)(self, branch, name=None, upstream=None, upstream_current=False, \*\*kwargs):**
&mdash; **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
upload.
......@@ -490,7 +490,7 @@ Args:
* upstream_current (bool): whether to use '--upstream_current'.
* kwargs: Forwarded to '__call__'.
&mdash; **def [number](/recipes/recipe_modules/git/api.py#427)(self, commitrefs=None, test_values=None):**
&mdash; **def [number](/recipes/recipe_modules/git/api.py#426)(self, commitrefs=None, test_values=None):**
Computes the generation number of some commits.
......@@ -507,7 +507,7 @@ A list of strings containing the generation numbers of the commits.
If non-empty commitrefs was provided, the order of the returned
numbers will correspond to the order of the provided commitrefs.
&mdash; **def [rebase](/recipes/recipe_modules/git/api.py#332)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
&mdash; **def [rebase](/recipes/recipe_modules/git/api.py#331)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
Runs rebase HEAD onto branch
......
......@@ -186,10 +186,9 @@ class GitApi(recipe_api.RecipeApi):
remote_name = 'origin'
step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix
self.m.python(
self.m.step(
'git setup%s' % step_suffix,
self.resource('git_setup.py'),
git_setup_args)
['python3', '-u', self.resource('git_setup.py')] + git_setup_args)
# Some of the commands below require depot_tools to be in PATH.
path = self.m.path.pathsep.join([
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......@@ -184,7 +184,7 @@
"Traceback (most recent call last):",
" File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/examples/full.py\", line 81, in RunSteps",
" api.git.new_branch('failed_new_branch', upstream='will_fail', upstream_current=True) #pylint: disable = line-too-long",
" File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/api.py\", line 413, in new_branch",
" File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/api.py\", line 412, in new_branch",
" raise ValueError('Can not define both upstream and upstream_current')",
"ValueError('Can not define both upstream and upstream_current')"
]
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]\\resources\\git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
......
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......
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