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

Side by Side Diff: git_cl.py

Issue 695113002: Be a bit more space-efficient. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 1 month 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.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 if opts.diff: 2816 if opts.diff:
2817 sys.stdout.write(stdout) 2817 sys.stdout.write(stdout)
2818 if opts.dry_run and len(stdout) > 0: 2818 if opts.dry_run and len(stdout) > 0:
2819 return 2 2819 return 2
2820 2820
2821 return 0 2821 return 0
2822 2822
2823 2823
2824 def CMDlol(parser, args): 2824 def CMDlol(parser, args):
2825 # This command is intentionally undocumented. 2825 # This command is intentionally undocumented.
2826 print('\n'.join(( 2826 import base64, zlib
M-A Ruel 2014/11/01 23:34:18 Please import at the top.
Nico 2014/11/02 02:16:39 Done.
2827 ' / /', 2827 print zlib.decompress(base64.b64decode(
2828 ' (\\/_//`)', 2828 'eNptkLEOwyAMRHe+wupCIqW57v0Vq84WqWtXyrcXnCBsmgMJ+/SSAxMZgRB6NzE'
2829 ' / \'/', 2829 'E2ObgCKJooYdu4uAQVffUEoE1sRQLxAcqzd7uK2gmStrll1ucV3uZyaY5sXyDd9'
2830 ' 0 0 \\', 2830 'JAnN+lAXsOMJ90GANAi43mq5/VeeacylKVgi8o6F1SC63FxnagHfJUTfUYdCR/W'
2831 ' / \\', 2831 'Ofe+0dHL7PicpytKP750Fh1q2qnLVof4w8OZWNY'))
2832 ' / __/ \\',
2833 ' /, _/ \\ \\_',
2834 ' `-./ ) | ~^~^~^~^~^~^~^~\\~.',
2835 ' ( / \\_}',
2836 ' | / |',
2837 ' ; | \\ /',
2838 ' \\/ ,/ \\ |',
2839 ' / /~~|~|~~~~~~|~|\\ |',
2840 ' / / | | | | `\\ \\',
2841 ' / / | | | | \\ \\',
2842 ' / ( | | | | \\ \\',
2843 ' jgs /,_) /__) /__) /,_/',
2844 ' \'\'\'\'\'"""""\'\'\'""""""\'\'\'""""""\'\'"""""\'\'\'\'\'')))
2845 return 0 2832 return 0
2846 2833
2847 2834
2848 class OptionParser(optparse.OptionParser): 2835 class OptionParser(optparse.OptionParser):
2849 """Creates the option parse and add --verbose support.""" 2836 """Creates the option parse and add --verbose support."""
2850 def __init__(self, *args, **kwargs): 2837 def __init__(self, *args, **kwargs):
2851 optparse.OptionParser.__init__( 2838 optparse.OptionParser.__init__(
2852 self, *args, prog='git cl', version=__version__, **kwargs) 2839 self, *args, prog='git cl', version=__version__, **kwargs)
2853 self.add_option( 2840 self.add_option(
2854 '-v', '--verbose', action='count', default=0, 2841 '-v', '--verbose', action='count', default=0,
(...skipping 28 matching lines...) Expand all
2883 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2870 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2884 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2871 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2885 2872
2886 2873
2887 if __name__ == '__main__': 2874 if __name__ == '__main__':
2888 # These affect sys.stdout so do it outside of main() to simplify mocks in 2875 # These affect sys.stdout so do it outside of main() to simplify mocks in
2889 # unit testing. 2876 # unit testing.
2890 fix_encoding.fix_encoding() 2877 fix_encoding.fix_encoding()
2891 colorama.init() 2878 colorama.init()
2892 sys.exit(main(sys.argv[1:])) 2879 sys.exit(main(sys.argv[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