Chromium Code Reviews| Index: git_cl.py |
| =================================================================== |
| --- git_cl.py (revision 187743) |
| +++ git_cl.py (working copy) |
| @@ -100,6 +100,13 @@ |
| RunGit(['config', '--int', git_key, "%d" % value]) |
| +def git_set_branch_value_str(key, value): |
|
M-A Ruel
2013/03/14 13:28:27
I prefer one function.
cmd = ['config']
if isinst
Roger Tawa OOO till Jul 10th
2013/03/14 19:49:42
Done.
|
| + branch = Changelist().GetBranch() |
| + if branch: |
| + git_key = 'branch.%s.%s' % (branch, key) |
| + RunGit(['config', git_key, str(value)]) |
| + |
| + |
| def git_get_branch_default(key, default): |
| branch = Changelist().GetBranch() |
| if branch: |
| @@ -1288,9 +1295,13 @@ |
| print_stats(options.similarity, options.find_copies, args) |
| if settings.GetIsGerrit(): |
| return GerritUpload(options, args, cl) |
| - return RietveldUpload(options, args, cl) |
| + ret = RietveldUpload(options, args, cl) |
| + if ret == 0: |
|
M-A Ruel
2013/03/14 13:28:27
if not ret
Roger Tawa OOO till Jul 10th
2013/03/14 19:49:42
Done.
|
| + git_set_branch_value_str('last-upload-hash', RunGit(['rev-parse', 'HEAD'])) |
| + return ret |
| + |
| def IsSubmoduleMergeCommit(ref): |
| # When submodules are added to the repo, we expect there to be a single |
| # non-git-svn merge commit at remote HEAD with a signature comment. |