Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index e8695e82eff5e402b5d7ee09ecaa23216ea75c6b..8690dabf73b062510626c50a20aa10119482dba2 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -1074,6 +1074,12 @@ def LoadCodereviewSettingsFromFile(fileobj): |
| RunGit(['config', keyvals['PUSH_URL_CONFIG'], |
| keyvals['ORIGIN_URL_CONFIG']]) |
| + if 'PROJECT' in keyvals: |
| + branchref = RunGit(['symbolic-ref', 'HEAD']).strip() |
|
iannucci
2014/05/27 18:00:33
What happens when the user has a detached HEAD?
sheyang
2014/06/02 22:56:48
Discussed offline. This will be saved into .git/co
|
| + branch = ShortBranchName(branchref) |
|
iannucci
2014/05/27 18:00:33
what does shortbranchname do? Is this the same as
sheyang
2014/06/02 22:56:48
It converts the name like 'refs/heads/foo' to 'foo
|
| + RunGit(['config', 'branch.%s.project' % branch, keyvals['PROJECT']], |
|
agable
2014/05/30 14:24:07
a) Why are you saving the PROJECT value in .git/co
sheyang
2014/06/02 22:56:48
1. Yep it's not ideal... Just to make it consisten
|
| + error_ok=False) |
| + |
| def urlretrieve(source, destination): |
| """urllib is broken for SSL connections via a proxy therefore we |
| @@ -1612,6 +1618,11 @@ def RietveldUpload(options, args, cl): |
| if remote_url: |
| upload_args.extend(['--base_url', remote_url]) |
| + project = RunGit(['config', 'branch.%s.project' % cl.GetBranch()], |
| + error_ok=True).strip() |
| + if project: |
| + upload_args.extend(['--project', project]) |
| + |
| try: |
| upload_args = ['upload'] + upload_args + args |
| logging.info('upload.RealMain(%s)', upload_args) |