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

Side by Side Diff: tests/git_cl_test.py

Issue 2034143002: Revert of Gerrit git cl: temporary disable cc option on upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: rebase Created 4 years, 6 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 | « git_cl.py ('k') | 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 """Unit tests for git_cl.py.""" 6 """Unit tests for git_cl.py."""
7 7
8 import os 8 import os
9 import StringIO 9 import StringIO
10 import stat 10 import stat
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 ref_to_push), 814 ref_to_push),
815 ] 815 ]
816 else: 816 else:
817 ref_to_push = 'HEAD' 817 ref_to_push = 'HEAD'
818 818
819 calls += [ 819 calls += [
820 ((['git', 'rev-list', 820 ((['git', 'rev-list',
821 expected_upstream_ref + '..' + ref_to_push],), ''), 821 expected_upstream_ref + '..' + ref_to_push],), ''),
822 ((['git', 'config', 'rietveld.cc'],), '') 822 ((['git', 'config', 'rietveld.cc'],), '')
823 ] 823 ]
824 # Add cc from watch list.
825 # TODO(tandrii): bring this back after http://crbug.com/604377.
826 # if ref_suffix == '':
827 # ref_suffix = '%cc=joe@example.com'
828 # else:
829 # ref_suffix += ',cc=joe@example.com'
830 824
831 notify_suffix = 'notify=%s' % ('ALL' if notify else 'NONE') 825 notify_suffix = 'notify=%s' % ('ALL' if notify else 'NONE')
832 if ref_suffix: 826 if ref_suffix:
833 ref_suffix += ',' + notify_suffix 827 ref_suffix += ',' + notify_suffix
834 else: 828 else:
835 ref_suffix = '%' + notify_suffix 829 ref_suffix = '%' + notify_suffix
830
831 # Add cc from watch list.
832 ref_suffix += ',cc=joe@example.com'
833
836 if reviewers: 834 if reviewers:
837 ref_suffix += ',' + ','.join('r=%s' % email 835 ref_suffix += ',' + ','.join('r=%s' % email
838 for email in sorted(reviewers)) 836 for email in sorted(reviewers))
839 calls += [ 837 calls += [
840 ((['git', 'push', 'origin', 838 ((['git', 'push', 'origin',
841 ref_to_push + ':refs/for/refs/heads/master' + ref_suffix],), 839 ref_to_push + ':refs/for/refs/heads/master' + ref_suffix],),
842 ('remote:\n' 840 ('remote:\n'
843 'remote: Processing changes: (\)\n' 841 'remote: Processing changes: (\)\n'
844 'remote: Processing changes: (|)\n' 842 'remote: Processing changes: (|)\n'
845 'remote: Processing changes: (/)\n' 843 'remote: Processing changes: (/)\n'
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 ((['git', 'config', '--unset', 'branch.feature.gerritsquashhash'],), 1520 ((['git', 'config', '--unset', 'branch.feature.gerritsquashhash'],),
1523 ''), 1521 ''),
1524 ] 1522 ]
1525 self.assertEqual(0, git_cl.main(['issue', '0'])) 1523 self.assertEqual(0, git_cl.main(['issue', '0']))
1526 1524
1527 1525
1528 if __name__ == '__main__': 1526 if __name__ == '__main__':
1529 git_cl.logging.basicConfig( 1527 git_cl.logging.basicConfig(
1530 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 1528 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
1531 unittest.main() 1529 unittest.main()
OLDNEW
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698