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

Side by Side Diff: git_cl.py

Issue 195793021: Infer CL author and reviewer list from local state if the issue has not previously been uploaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Don't worry about the owner -- that's already taken care of elsewhere. Created 6 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 | presubmit_canned_checks.py » ('j') | presubmit_canned_checks.py » ('J')
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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 args = [base_branch, 'HEAD'] 1687 args = [base_branch, 'HEAD']
1688 1688
1689 # Apply watchlists on upload. 1689 # Apply watchlists on upload.
1690 change = cl.GetChange(base_branch, None) 1690 change = cl.GetChange(base_branch, None)
1691 watchlist = watchlists.Watchlists(change.RepositoryRoot()) 1691 watchlist = watchlists.Watchlists(change.RepositoryRoot())
1692 files = [f.LocalPath() for f in change.AffectedFiles()] 1692 files = [f.LocalPath() for f in change.AffectedFiles()]
1693 if not options.bypass_watchlists: 1693 if not options.bypass_watchlists:
1694 cl.SetWatchers(watchlist.GetWatchersForPaths(files)) 1694 cl.SetWatchers(watchlist.GetWatchersForPaths(files))
1695 1695
1696 if not options.bypass_hooks: 1696 if not options.bypass_hooks:
1697 if options.reviewers:
1698 # Set the reviewer list now so that presubmit checks can access it.
1699 setattr(change, 'R', ','.join(options.reviewers))
Ilya Sherman 2014/03/14 01:45:33 There's probably a better way to do this. Thought
agable 2014/03/14 15:11:03 presubmit_support.py has a Change class which is c
Ilya Sherman 2014/03/18 01:18:35 The Change class doesn't actually ever update the
agable 2014/03/18 17:56:52 You're right, I was working from faulty memory :)
1697 hook_results = cl.RunHook(committing=False, 1700 hook_results = cl.RunHook(committing=False,
1698 may_prompt=not options.force, 1701 may_prompt=not options.force,
1699 verbose=options.verbose, 1702 verbose=options.verbose,
1700 change=change) 1703 change=change)
1701 if not hook_results.should_continue(): 1704 if not hook_results.should_continue():
1702 return 1 1705 return 1
1703 if not options.reviewers and hook_results.reviewers: 1706 if not options.reviewers and hook_results.reviewers:
1704 options.reviewers = hook_results.reviewers.split(',') 1707 options.reviewers = hook_results.reviewers.split(',')
1705 1708
1706 if cl.GetIssue(): 1709 if cl.GetIssue():
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2534 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2532 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2535 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2533 2536
2534 2537
2535 if __name__ == '__main__': 2538 if __name__ == '__main__':
2536 # These affect sys.stdout so do it outside of main() to simplify mocks in 2539 # These affect sys.stdout so do it outside of main() to simplify mocks in
2537 # unit testing. 2540 # unit testing.
2538 fix_encoding.fix_encoding() 2541 fix_encoding.fix_encoding()
2539 colorama.init() 2542 colorama.init()
2540 sys.exit(main(sys.argv[1:])) 2543 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | presubmit_canned_checks.py » ('j') | presubmit_canned_checks.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698