Commit 575d41a4 authored by tandrii@chromium.org's avatar tandrii@chromium.org

Fix git recipe module to use git.bad as package resouce.

R=phajdan.jr@chromium.org
BUG=579160

Review URL: https://codereview.chromium.org/1742403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299005 0039d316-1c4b-4281-b951-d872f2087c98
parent 79c78975
...@@ -18,7 +18,7 @@ class GitApi(recipe_api.RecipeApi): ...@@ -18,7 +18,7 @@ class GitApi(recipe_api.RecipeApi):
kwargs.setdefault('cwd', self.m.path['checkout']) kwargs.setdefault('cwd', self.m.path['checkout'])
git_cmd = ['git'] git_cmd = ['git']
if self.m.platform.is_win: if self.m.platform.is_win:
git_cmd = [self.m.path['depot_tools'].join('git.bat')] git_cmd = [self.package_resource('git.bat')]
options = kwargs.pop('git_config_options', {}) options = kwargs.pop('git_config_options', {})
for k, v in sorted(options.iteritems()): for k, v in sorted(options.iteritems()):
git_cmd.extend(['-c', '%s=%s' % (k, v)]) git_cmd.extend(['-c', '%s=%s' % (k, v)])
...@@ -172,8 +172,7 @@ class GitApi(recipe_api.RecipeApi): ...@@ -172,8 +172,7 @@ class GitApi(recipe_api.RecipeApi):
remote_name = 'origin' remote_name = 'origin'
if self.m.platform.is_win: if self.m.platform.is_win:
git_setup_args += ['--git_cmd_path', git_setup_args += ['--git_cmd_path', self.package_resource('git.bat')]
self.m.path['depot_tools'].join('git.bat')]
step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix
self.m.python( self.m.python(
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
"--url", "--url",
"https://chromium.googlesource.com/chromium/src.git", "https://chromium.googlesource.com/chromium/src.git",
"--git_cmd_path", "--git_cmd_path",
"[DEPOT_TOOLS]\\git.bat" "RECIPE_PACKAGE[depot_tools]\\git.bat"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"name": "git setup" "name": "git setup"
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"retry", "retry",
"fetch", "fetch",
"origin", "origin",
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"checkout", "checkout",
"-f", "-f",
"FETCH_HEAD" "FETCH_HEAD"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"rev-parse", "rev-parse",
"HEAD" "HEAD"
], ],
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"clean", "clean",
"-f", "-f",
"-d", "-d",
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"submodule", "submodule",
"sync" "sync"
], ],
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"submodule", "submodule",
"update", "update",
"--init", "--init",
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"-c", "-c",
"foo=bar", "foo=bar",
"count-objects", "count-objects",
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"config", "config",
"--get", "--get",
"remote.origin.url" "remote.origin.url"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"show", "show",
"HEAD", "HEAD",
"--format=%at", "--format=%at",
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"fetch", "fetch",
"origin", "origin",
"--tags" "--tags"
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"rebase", "rebase",
"origin/master" "origin/master"
], ],
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
}, },
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"bundle", "bundle",
"create", "create",
"[SLAVE_BUILD]\\all.bundle", "[SLAVE_BUILD]\\all.bundle",
......
[ [
{ {
"cmd": [ "cmd": [
"[DEPOT_TOOLS]\\git.bat", "RECIPE_PACKAGE[depot_tools]\\git.bat",
"diff", "diff",
"--cached", "--cached",
"--name-only" "--name-only"
......
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