[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 1 | #!/usr/bin/env python |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 2 | # Copyright 2015 The Chromium Authors. All rights reserved. |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 6 | """Rolls DEPS controlled dependency. |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 7 | |
[email protected] | 30e5b23 | 2015-06-01 18:06:59 | [diff] [blame] | 8 | Works only with git checkout and git dependencies. Currently this |
| 9 | script will always roll to the tip of to origin/master. |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 10 | """ |
| 11 | |
[email protected] | 30e5b23 | 2015-06-01 18:06:59 | [diff] [blame] | 12 | import argparse |
Edward Lesmes | a1df57c | 2018-04-04 00:00:07 | [diff] [blame] | 13 | import collections |
Edward Lesmes | c772cf7 | 2018-04-03 18:47:30 | [diff] [blame] | 14 | import gclient_eval |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 15 | import os |
| 16 | import re |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 17 | import subprocess |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 18 | import sys |
| 19 | |
[email protected] | c20f470 | 2015-05-23 00:44:46 | [diff] [blame] | 20 | NEED_SHELL = sys.platform.startswith('win') |
| 21 | |
| 22 | |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 23 | class Error(Exception): |
| 24 | pass |
| 25 | |
| 26 | |
smut | 7036c4f | 2016-06-09 21:28:48 | [diff] [blame] | 27 | class AlreadyRolledError(Error): |
| 28 | pass |
| 29 | |
| 30 | |
[email protected] | c20f470 | 2015-05-23 00:44:46 | [diff] [blame] | 31 | def check_output(*args, **kwargs): |
| 32 | """subprocess.check_output() passing shell=True on Windows for git.""" |
| 33 | kwargs.setdefault('shell', NEED_SHELL) |
| 34 | return subprocess.check_output(*args, **kwargs) |
| 35 | |
| 36 | |
| 37 | def check_call(*args, **kwargs): |
| 38 | """subprocess.check_call() passing shell=True on Windows for git.""" |
| 39 | kwargs.setdefault('shell', NEED_SHELL) |
| 40 | subprocess.check_call(*args, **kwargs) |
| 41 | |
| 42 | |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 43 | def is_pristine(root, merge_base='origin/master'): |
| 44 | """Returns True if a git checkout is pristine.""" |
| 45 | cmd = ['git', 'diff', '--ignore-submodules', merge_base] |
[email protected] | c20f470 | 2015-05-23 00:44:46 | [diff] [blame] | 46 | return not (check_output(cmd, cwd=root).strip() or |
| 47 | check_output(cmd + ['--cached'], cwd=root).strip()) |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 48 | |
| 49 | |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 50 | def get_log_url(upstream_url, head, master): |
| 51 | """Returns an URL to read logs via a Web UI if applicable.""" |
| 52 | if re.match(r'https://[^/]*\.googlesource\.com/', upstream_url): |
| 53 | # gitiles |
| 54 | return '%s/+log/%s..%s' % (upstream_url, head[:12], master[:12]) |
| 55 | if upstream_url.startswith('https://github.com/'): |
| 56 | upstream_url = upstream_url.rstrip('/') |
| 57 | if upstream_url.endswith('.git'): |
| 58 | upstream_url = upstream_url[:-len('.git')] |
| 59 | return '%s/compare/%s...%s' % (upstream_url, head[:12], master[:12]) |
| 60 | return None |
| 61 | |
| 62 | |
| 63 | def should_show_log(upstream_url): |
| 64 | """Returns True if a short log should be included in the tree.""" |
| 65 | # Skip logs for very active projects. |
Eric Boren | 07efc5a | 2017-08-28 13:13:20 | [diff] [blame] | 66 | if upstream_url.endswith('/v8/v8.git'): |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 67 | return False |
| 68 | if 'webrtc' in upstream_url: |
| 69 | return False |
| 70 | return True |
| 71 | |
| 72 | |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 73 | def get_gclient_root(): |
Eric Boren | 5888d6f | 2018-04-09 17:20:39 | [diff] [blame] | 74 | gclient = os.path.join( |
| 75 | os.path.dirname(os.path.abspath(__file__)), 'gclient.py') |
| 76 | return check_output([sys.executable, gclient, 'root']).strip() |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 77 | |
| 78 | |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 79 | def get_deps(root): |
| 80 | """Returns the path and the content of the DEPS file.""" |
| 81 | deps_path = os.path.join(root, 'DEPS') |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 82 | try: |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 83 | with open(deps_path, 'rb') as f: |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 84 | deps_content = f.read() |
[email protected] | a7a229f | 2015-05-22 21:34:46 | [diff] [blame] | 85 | except (IOError, OSError): |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 86 | raise Error('Ensure the script is run in the directory ' |
| 87 | 'containing DEPS file.') |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 88 | return deps_path, deps_content |
[email protected] | 9820112 | 2015-04-22 20:21:34 | [diff] [blame] | 89 | |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 90 | |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 91 | def generate_commit_message( |
| 92 | full_dir, dependency, head, roll_to, no_log, log_limit): |
| 93 | """Creates the commit message for this specific roll.""" |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 94 | commit_range = '%s..%s' % (head[:9], roll_to[:9]) |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 95 | upstream_url = check_output( |
| 96 | ['git', 'config', 'remote.origin.url'], cwd=full_dir).strip() |
| 97 | log_url = get_log_url(upstream_url, head, roll_to) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 98 | cmd = ['git', 'log', commit_range, '--date=short', '--no-merges'] |
[email protected] | c6e39fe | 2015-09-23 13:45:52 | [diff] [blame] | 99 | logs = check_output( |
[email protected] | 64f2fc3 | 2015-10-07 19:11:17 | [diff] [blame] | 100 | cmd + ['--format=%ad %ae %s'], # Args with '=' are automatically quoted. |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 101 | cwd=full_dir).rstrip() |
[email protected] | c6e39fe | 2015-09-23 13:45:52 | [diff] [blame] | 102 | logs = re.sub(r'(?m)^(\d\d\d\d-\d\d-\d\d [^@]+)@[^ ]+( .*)$', r'\1\2', logs) |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 103 | lines = logs.splitlines() |
| 104 | cleaned_lines = [ |
| 105 | l for l in lines |
| 106 | if not l.endswith('recipe-roller Roll recipe dependencies (trivial).') |
| 107 | ] |
| 108 | logs = '\n'.join(cleaned_lines) + '\n' |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 109 | |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 110 | nb_commits = len(lines) |
| 111 | rolls = nb_commits - len(cleaned_lines) |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 112 | header = 'Roll %s/ %s (%d commit%s%s)\n\n' % ( |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 113 | dependency, |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 114 | commit_range, |
| 115 | nb_commits, |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 116 | 's' if nb_commits > 1 else '', |
| 117 | ('; %s trivial rolls' % rolls) if rolls else '') |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 118 | log_section = '' |
| 119 | if log_url: |
| 120 | log_section = log_url + '\n\n' |
[email protected] | 64f2fc3 | 2015-10-07 19:11:17 | [diff] [blame] | 121 | log_section += '$ %s ' % ' '.join(cmd) |
| 122 | log_section += '--format=\'%ad %ae %s\'\n' |
Eric Boren | 3be96a8 | 2017-09-29 14:07:46 | [diff] [blame] | 123 | # It is important that --no-log continues to work, as it is used by |
| 124 | # internal -> external rollers. Please do not remove or break it. |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 125 | if not no_log and should_show_log(upstream_url): |
Marc-Antoine Ruel | 51104fe | 2017-03-01 22:57:41 | [diff] [blame] | 126 | if len(cleaned_lines) > log_limit: |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 127 | # Keep the first N log entries. |
| 128 | logs = ''.join(logs.splitlines(True)[:log_limit]) + '(...)\n' |
| 129 | log_section += logs |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 130 | return header + log_section |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 131 | |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 132 | |
Edward Lesmes | c772cf7 | 2018-04-03 18:47:30 | [diff] [blame] | 133 | def calculate_roll(full_dir, dependency, gclient_dict, roll_to): |
| 134 | """Calculates the roll for a dependency by processing gclient_dict, and |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 135 | fetching the dependency via git. |
| 136 | """ |
Edward Lesmes | 58330b0 | 2018-04-06 23:53:55 | [diff] [blame] | 137 | head = gclient_eval.GetRevision(gclient_dict, dependency) |
Edward Lesmes | c772cf7 | 2018-04-03 18:47:30 | [diff] [blame] | 138 | if not head: |
| 139 | raise Error('%s is unpinned.' % dependency) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 140 | check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir) |
| 141 | roll_to = check_output(['git', 'rev-parse', roll_to], cwd=full_dir).strip() |
| 142 | return head, roll_to |
| 143 | |
| 144 | |
| 145 | def gen_commit_msg(logs, cmdline, rolls, reviewers, bug): |
| 146 | """Returns the final commit message.""" |
| 147 | commit_msg = '' |
| 148 | if len(logs) > 1: |
| 149 | commit_msg = 'Rolling %d dependencies\n\n' % len(logs) |
| 150 | commit_msg += '\n\n'.join(logs) |
Kenneth Russell | ebe839b | 2017-12-22 22:55:39 | [diff] [blame] | 151 | commit_msg += '\nCreated with:\n ' + cmdline + '\n' |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 152 | commit_msg += 'R=%s\n' % ','.join(reviewers) if reviewers else '' |
| 153 | commit_msg += 'BUG=%s\n' % bug if bug else '' |
| 154 | return commit_msg |
| 155 | |
| 156 | |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 157 | def finalize(commit_msg, deps_path, deps_content, rolls, is_relative, root_dir): |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 158 | """Edits the DEPS file, commits it, then uploads a CL.""" |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 159 | print('Commit message:') |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 160 | print('\n'.join(' ' + i for i in commit_msg.splitlines())) |
| 161 | |
| 162 | with open(deps_path, 'wb') as f: |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 163 | f.write(deps_content) |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 164 | current_dir = os.path.dirname(deps_path) |
| 165 | check_call(['git', 'add', 'DEPS'], cwd=current_dir) |
| 166 | check_call(['git', 'commit', '--quiet', '-m', commit_msg], cwd=current_dir) |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 167 | |
| 168 | # Pull the dependency to the right revision. This is surprising to users |
| 169 | # otherwise. |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 170 | for dependency, (_head, roll_to) in sorted(rolls.iteritems()): |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 171 | full_dir = os.path.normpath(os.path.join(root_dir, dependency)) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 172 | check_call(['git', 'checkout', '--quiet', roll_to], cwd=full_dir) |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 173 | |
| 174 | |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 175 | def main(): |
[email protected] | 30e5b23 | 2015-06-01 18:06:59 | [diff] [blame] | 176 | parser = argparse.ArgumentParser(description=__doc__) |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 177 | parser.add_argument( |
[email protected] | 02d2087 | 2015-11-14 00:46:41 | [diff] [blame] | 178 | '--ignore-dirty-tree', action='store_true', |
| 179 | help='Roll anyways, even if there is a diff.') |
| 180 | parser.add_argument( |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 181 | '-r', '--reviewer', |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 182 | help='To specify multiple reviewers, use comma separated list, e.g. ' |
[email protected] | c20f470 | 2015-05-23 00:44:46 | [diff] [blame] | 183 | '-r joe,jane,john. Defaults to @chromium.org') |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 184 | parser.add_argument('-b', '--bug', help='Associate a bug number to the roll') |
Eric Boren | 3be96a8 | 2017-09-29 14:07:46 | [diff] [blame] | 185 | # It is important that --no-log continues to work, as it is used by |
| 186 | # internal -> external rollers. Please do not remove or break it. |
[email protected] | 398ed34 | 2015-09-29 12:27:25 | [diff] [blame] | 187 | parser.add_argument( |
| 188 | '--no-log', action='store_true', |
| 189 | help='Do not include the short log in the commit message') |
| 190 | parser.add_argument( |
| 191 | '--log-limit', type=int, default=100, |
| 192 | help='Trim log after N commits (default: %(default)s)') |
| 193 | parser.add_argument( |
| 194 | '--roll-to', default='origin/master', |
| 195 | help='Specify the new commit to roll to (default: %(default)s)') |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 196 | parser.add_argument( |
| 197 | '--key', action='append', default=[], |
| 198 | help='Regex(es) for dependency in DEPS file') |
| 199 | parser.add_argument('dep_path', nargs='+', help='Path(s) to dependency') |
[email protected] | 30e5b23 | 2015-06-01 18:06:59 | [diff] [blame] | 200 | args = parser.parse_args() |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 201 | |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 202 | if len(args.dep_path) > 1: |
| 203 | if args.roll_to != 'origin/master': |
| 204 | parser.error( |
| 205 | 'Can\'t use multiple paths to roll simultaneously and --roll-to') |
| 206 | if args.key: |
| 207 | parser.error( |
| 208 | 'Can\'t use multiple paths to roll simultaneously and --key') |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 209 | reviewers = None |
[email protected] | 30e5b23 | 2015-06-01 18:06:59 | [diff] [blame] | 210 | if args.reviewer: |
| 211 | reviewers = args.reviewer.split(',') |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 212 | for i, r in enumerate(reviewers): |
| 213 | if not '@' in r: |
| 214 | reviewers[i] = r + '@chromium.org' |
| 215 | |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 216 | gclient_root = get_gclient_root() |
| 217 | current_dir = os.getcwd() |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 218 | dependencies = sorted(d.rstrip('/').rstrip('\\') for d in args.dep_path) |
| 219 | cmdline = 'roll-dep ' + ' '.join(dependencies) + ''.join( |
| 220 | ' --key ' + k for k in args.key) |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 221 | try: |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 222 | if not args.ignore_dirty_tree and not is_pristine(current_dir): |
| 223 | raise Error( |
| 224 | 'Ensure %s is clean first (no non-merged commits).' % current_dir) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 225 | # First gather all the information without modifying anything, except for a |
| 226 | # git fetch. |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 227 | deps_path, deps_content = get_deps(current_dir) |
Edward Lemur | e05f18d | 2018-06-08 17:36:53 | [diff] [blame] | 228 | gclient_dict = gclient_eval.Exec(deps_content, deps_path) |
Eric Boren | 0eb3956 | 2018-04-05 15:34:09 | [diff] [blame] | 229 | is_relative = gclient_dict.get('use_relative_paths', False) |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 230 | root_dir = current_dir if is_relative else gclient_root |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 231 | rolls = {} |
| 232 | for dependency in dependencies: |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 233 | full_dir = os.path.normpath(os.path.join(root_dir, dependency)) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 234 | if not os.path.isdir(full_dir): |
| 235 | raise Error('Directory not found: %s (%s)' % (dependency, full_dir)) |
| 236 | head, roll_to = calculate_roll( |
Edward Lesmes | c772cf7 | 2018-04-03 18:47:30 | [diff] [blame] | 237 | full_dir, dependency, gclient_dict, args.roll_to) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 238 | if roll_to == head: |
| 239 | if len(dependencies) == 1: |
| 240 | raise AlreadyRolledError('No revision to roll!') |
| 241 | print('%s: Already at latest commit %s' % (dependency, roll_to)) |
| 242 | else: |
| 243 | print( |
| 244 | '%s: Rolling from %s to %s' % (dependency, head[:10], roll_to[:10])) |
| 245 | rolls[dependency] = (head, roll_to) |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 246 | |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 247 | logs = [] |
| 248 | for dependency, (head, roll_to) in sorted(rolls.iteritems()): |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 249 | full_dir = os.path.normpath(os.path.join(root_dir, dependency)) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 250 | log = generate_commit_message( |
| 251 | full_dir, dependency, head, roll_to, args.no_log, args.log_limit) |
| 252 | logs.append(log) |
Edward Lesmes | c772cf7 | 2018-04-03 18:47:30 | [diff] [blame] | 253 | gclient_eval.SetRevision(gclient_dict, dependency, roll_to) |
| 254 | |
| 255 | deps_content = gclient_eval.RenderDEPSFile(gclient_dict) |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 256 | |
| 257 | commit_msg = gen_commit_msg(logs, cmdline, rolls, reviewers, args.bug) |
Edward Lesmes | 3f277fc | 2018-04-06 19:32:51 | [diff] [blame] | 258 | finalize(commit_msg, deps_path, deps_content, rolls, is_relative, root_dir) |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 259 | except Error as e: |
| 260 | sys.stderr.write('error: %s\n' % e) |
smut | 7036c4f | 2016-06-09 21:28:48 | [diff] [blame] | 261 | return 2 if isinstance(e, AlreadyRolledError) else 1 |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 262 | |
Marc-Antoine Ruel | 85a8c10 | 2017-12-12 20:42:25 | [diff] [blame] | 263 | print('') |
| 264 | if not reviewers: |
| 265 | print('You forgot to pass -r, make sure to insert a [email protected] line') |
| 266 | print('to the commit description before emailing.') |
| 267 | print('') |
| 268 | print('Run:') |
| 269 | print(' git cl upload --send-mail') |
[email protected] | e5d984b | 2015-05-29 22:09:39 | [diff] [blame] | 270 | return 0 |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 271 | |
[email protected] | 9820112 | 2015-04-22 20:21:34 | [diff] [blame] | 272 | |
[email protected] | 03fd85b | 2014-06-09 23:43:33 | [diff] [blame] | 273 | if __name__ == '__main__': |
[email protected] | 9655094 | 2015-05-22 18:46:51 | [diff] [blame] | 274 | sys.exit(main()) |