Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: git_cl.py

Issue 1834583003: Revert of git cl: follow up indentation fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 and Gerrit.""" 8 """A git-command for integrating reviews on Rietveld and Gerrit."""
9 9
10 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 for cls in [_RietveldChangelistImpl, _GerritChangelistImpl]: 902 for cls in [_RietveldChangelistImpl, _GerritChangelistImpl]:
903 setting = cls.IssueSetting(self.GetBranch()) 903 setting = cls.IssueSetting(self.GetBranch())
904 issue = RunGit(['config', setting], error_ok=True).strip() 904 issue = RunGit(['config', setting], error_ok=True).strip()
905 if issue: 905 if issue:
906 self._codereview_impl = cls(self, **kwargs) 906 self._codereview_impl = cls(self, **kwargs)
907 self.issue = int(issue) 907 self.issue = int(issue)
908 return 908 return
909 909
910 # No issue is set for this branch, so decide based on repo-wide settings. 910 # No issue is set for this branch, so decide based on repo-wide settings.
911 return self._load_codereview_impl( 911 return self._load_codereview_impl(
912 codereview='gerrit' if settings.GetIsGerrit() else 'rietveld') 912 codereview='gerrit' if settings.GetIsGerrit() else 'rietveld')
913 913
914 914
915 def GetCCList(self): 915 def GetCCList(self):
916 """Return the users cc'd on this CL. 916 """Return the users cc'd on this CL.
917 917
918 Return is a string suitable for passing to gcl with the --cc flag. 918 Return is a string suitable for passing to gcl with the --cc flag.
919 """ 919 """
920 if self.cc is None: 920 if self.cc is None:
921 base_cc = settings.GetDefaultCCList() 921 base_cc = settings.GetDefaultCCList()
922 more_cc = ','.join(self.watchers) 922 more_cc = ','.join(self.watchers)
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
4266 if __name__ == '__main__': 4266 if __name__ == '__main__':
4267 # These affect sys.stdout so do it outside of main() to simplify mocks in 4267 # These affect sys.stdout so do it outside of main() to simplify mocks in
4268 # unit testing. 4268 # unit testing.
4269 fix_encoding.fix_encoding() 4269 fix_encoding.fix_encoding()
4270 colorama.init() 4270 colorama.init()
4271 try: 4271 try:
4272 sys.exit(main(sys.argv[1:])) 4272 sys.exit(main(sys.argv[1:]))
4273 except KeyboardInterrupt: 4273 except KeyboardInterrupt:
4274 sys.stderr.write('interrupted\n') 4274 sys.stderr.write('interrupted\n')
4275 sys.exit(1) 4275 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698