OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
7 | 7 |
8 """A git-command for integrating reviews on Rietveld.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
9 | 9 |
10 import json | 10 import json |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if not self.tree_status_url: | 342 if not self.tree_status_url: |
343 error_message = ('You must configure your tree status URL by running ' | 343 error_message = ('You must configure your tree status URL by running ' |
344 '"git cl config".') | 344 '"git cl config".') |
345 self.tree_status_url = self._GetConfig('rietveld.tree-status-url', | 345 self.tree_status_url = self._GetConfig('rietveld.tree-status-url', |
346 error_ok=error_ok, | 346 error_ok=error_ok, |
347 error_message=error_message) | 347 error_message=error_message) |
348 return self.tree_status_url | 348 return self.tree_status_url |
349 | 349 |
350 def GetViewVCUrl(self): | 350 def GetViewVCUrl(self): |
351 if not self.viewvc_url: | 351 if not self.viewvc_url: |
352 self.viewvc_url = gclient_utils.UpgradeToHttps( | 352 self.viewvc_url = self._GetConfig('rietveld.viewvc-url', error_ok=True) |
353 self._GetConfig('rietveld.viewvc-url', error_ok=True)) | |
354 return self.viewvc_url | 353 return self.viewvc_url |
355 | 354 |
356 def GetDefaultCCList(self): | 355 def GetDefaultCCList(self): |
357 return self._GetConfig('rietveld.cc', error_ok=True) | 356 return self._GetConfig('rietveld.cc', error_ok=True) |
358 | 357 |
359 def GetIsGerrit(self): | 358 def GetIsGerrit(self): |
360 """Return true if this repo is assosiated with gerrit code review system.""" | 359 """Return true if this repo is assosiated with gerrit code review system.""" |
361 if self.is_gerrit is None: | 360 if self.is_gerrit is None: |
362 self.is_gerrit = self._GetConfig('gerrit.host', error_ok=True) | 361 self.is_gerrit = self._GetConfig('gerrit.host', error_ok=True) |
363 return self.is_gerrit | 362 return self.is_gerrit |
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1861 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
1863 | 1862 |
1864 # Not a known command. Default to help. | 1863 # Not a known command. Default to help. |
1865 GenUsage(parser, 'help') | 1864 GenUsage(parser, 'help') |
1866 return CMDhelp(parser, argv) | 1865 return CMDhelp(parser, argv) |
1867 | 1866 |
1868 | 1867 |
1869 if __name__ == '__main__': | 1868 if __name__ == '__main__': |
1870 fix_encoding.fix_encoding() | 1869 fix_encoding.fix_encoding() |
1871 sys.exit(main(sys.argv[1:])) | 1870 sys.exit(main(sys.argv[1:])) |
OLD | NEW |