Turn Jiri manifest paths into Recipe paths
Just in case we ever want to run on systems that don't use / as
path separator.
Change-Id: I05444343819e4190452fb6df8d40b89ef55a5ebb
diff --git a/README.recipes.md b/README.recipes.md
index db8fb15..c3e0acb 100644
--- a/README.recipes.md
+++ b/README.recipes.md
@@ -174,7 +174,7 @@
Checkout a given ref and return the checked out revision.
-— **def [commit](/recipe_modules/git/api.py#68)(self, message, \*files):**
+— **def [commit](/recipe_modules/git/api.py#68)(self, message, \*files, \*\*kwargs):**
— **def [get\_hash](/recipe_modules/git/api.py#82)(self, commit='HEAD', \*\*kwargs):**
@@ -184,7 +184,7 @@
Find and return the timestamp of the given commit.
-— **def [push](/recipe_modules/git/api.py#71)(self, ref, remote='origin'):**
+— **def [push](/recipe_modules/git/api.py#71)(self, ref, remote='origin', \*\*kwargs):**
— **def [rebase](/recipe_modules/git/api.py#74)(self, branch='master', remote='origin', \*\*kwargs):**
diff --git a/recipe_modules/git/api.py b/recipe_modules/git/api.py
index 0a455b3..506db9a 100644
--- a/recipe_modules/git/api.py
+++ b/recipe_modules/git/api.py
@@ -65,11 +65,11 @@
self('clean', '-f', '-d', '-x', **kwargs)
return step.stdout.strip()
- def commit(self, message, *files):
- return self('commit', '-m', message, *files)
+ def commit(self, message, *files, **kwargs):
+ return self('commit', '-m', message, *files, **kwargs)
- def push(self, ref, remote='origin'):
- return self('push', remote, ref)
+ def push(self, ref, remote='origin', **kwargs):
+ return self('push', remote, ref, **kwargs)
def rebase(self, branch='master', remote='origin', **kwargs):
"""Run rebase HEAD onto branch"""
diff --git a/recipes/zircon_roller.py b/recipes/zircon_roller.py
index a57184a..1f0ccaf 100644
--- a/recipes/zircon_roller.py
+++ b/recipes/zircon_roller.py
@@ -45,10 +45,10 @@
with api.context(infra_steps=True):
api.jiri.checkout(manifest, remote, patch_ref, patch_gerrit_url, project)
- project_dir = api.path['start_dir'].join(project)
+ project_dir = api.path['start_dir'].join(*project.split('/'))
with api.context(cwd=project_dir):
api.jiri.edit_manifest(manifest, imports=[('zircon', revision)])
- api.git.commit(COMMIT_MESSAGE, manifest)
+ api.git.commit(COMMIT_MESSAGE, api.path.join(*manifest.split('/')))
api.git.push('HEAD:refs/for/master%l=Code-Review+2,l=Commit-Queue+2,' +
'cc=fuchsia-build-notify@google.com')