Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index fe9fec76035fc1385de200928a440f125e9f074c..d75554207425f3c4c73c04af0ee9febbef0f59ba 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -281,6 +281,7 @@ class Settings(object): |
| self.updated = False |
| self.is_gerrit = None |
| self.git_editor = None |
| + self.project = None |
| def LazyUpdateIfNeeded(self): |
| """Updates the settings from a codereview.settings file, if available.""" |
| @@ -442,6 +443,11 @@ class Settings(object): |
| return (self._GetRietveldConfig('cpplint-ignore-regex', error_ok=True) or |
| DEFAULT_LINT_IGNORE_REGEX) |
| + def GetProject(self): |
| + if not self.project: |
| + self.project = self._GetRietveldConfig('project', error_ok=True) |
|
agable
2014/06/03 17:41:12
There is now nothing that actually sets this gitco
sheyang
2014/06/04 01:52:52
Done.
|
| + return self.project |
| + |
| def _GetRietveldConfig(self, param, **kwargs): |
| return self._GetConfig('rietveld.' + param, **kwargs) |
| @@ -1067,6 +1073,7 @@ def LoadCodereviewSettingsFromFile(fileobj): |
| SetProperty('bug-prefix', 'BUG_PREFIX', unset_error_ok=True) |
| SetProperty('cpplint-regex', 'LINT_REGEX', unset_error_ok=True) |
| SetProperty('cpplint-ignore-regex', 'LINT_IGNORE_REGEX', unset_error_ok=True) |
| + SetProperty('project', 'PROJECT', unset_error_ok=True) |
| if 'GERRIT_HOST' in keyvals: |
| RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']]) |
| @@ -1078,7 +1085,6 @@ def LoadCodereviewSettingsFromFile(fileobj): |
| RunGit(['config', keyvals['PUSH_URL_CONFIG'], |
| keyvals['ORIGIN_URL_CONFIG']]) |
|
agable
2014/06/03 17:41:12
Leave two newlines here.
sheyang
2014/06/04 01:52:52
Done.
|
| - |
| def urlretrieve(source, destination): |
| """urllib is broken for SSL connections via a proxy therefore we |
| can't use urllib.urlretrieve().""" |
| @@ -1619,6 +1625,10 @@ def RietveldUpload(options, args, cl): |
| if remote_url: |
| upload_args.extend(['--base_url', remote_url]) |
| + project = settings.GetProject() |
| + if project: |
| + upload_args.extend(['--project', project]) |
| + |
| try: |
| upload_args = ['upload'] + upload_args + args |
| logging.info('upload.RealMain(%s)', upload_args) |