Chromium Code Reviews| Index: tools/release/git_recipes.py |
| diff --git a/tools/release/git_recipes.py b/tools/release/git_recipes.py |
| index 3d2a9ef87d7fd14400ec6c96c3ef18bbcbb4b64b..1a57380b637f9438d93e3fb9c0be11680f503a26 100644 |
| --- a/tools/release/git_recipes.py |
| +++ b/tools/release/git_recipes.py |
| @@ -163,7 +163,7 @@ class GitRecipesMixin(object): |
| @Strip |
| def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="", |
| - branch="", reverse=False, **kwargs): |
| + branch="", path=None, reverse=False, **kwargs): |
| assert not (git_hash and parent_hash) |
| args = ["log"] |
| if n > 0: |
| @@ -179,8 +179,15 @@ class GitRecipesMixin(object): |
| if parent_hash: |
| args.append("%s^" % parent_hash) |
| args.append(branch) |
| + if path: |
| + args.extend(["--", path]) |
|
tandrii(chromium)
2015/04/07 15:13:51
nice!
|
| return self.Git(MakeArgs(args), **kwargs) |
| + def GitShowFile(self, refspec, path, **kwargs): |
| + assert refspec |
| + assert path |
| + return self.Git(MakeArgs(["show", "%s:%s" % (refspec, path)]), **kwargs) |
| + |
| def GitGetPatch(self, git_hash, **kwargs): |
| assert git_hash |
| return self.Git(MakeArgs(["log", "-1", "-p", git_hash]), **kwargs) |
| @@ -241,8 +248,8 @@ class GitRecipesMixin(object): |
| def GitPull(self, **kwargs): |
| self.Git("pull", **kwargs) |
| - def GitFetchOrigin(self, **kwargs): |
| - self.Git("fetch origin", **kwargs) |
| + def GitFetchOrigin(self, *refspecs, **kwargs): |
| + self.Git(MakeArgs(["fetch", "origin"] + list(refspecs)), **kwargs) |
| @Strip |
| # Copied from bot_update.py and modified for svn-like numbers only. |