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

Side by Side Diff: tests/git_cl_test.py

Issue 2072923002: Gerrit git cl upload: Remove --no-squash warning message. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fixed tests 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 @classmethod 758 @classmethod
759 def _gerrit_upload_calls(cls, description, reviewers, squash, 759 def _gerrit_upload_calls(cls, description, reviewers, squash,
760 expected_upstream_ref='origin/refs/heads/master', 760 expected_upstream_ref='origin/refs/heads/master',
761 ref_suffix='', notify=False, 761 ref_suffix='', notify=False,
762 post_amend_description=None, issue=None): 762 post_amend_description=None, issue=None):
763 if post_amend_description is None: 763 if post_amend_description is None:
764 post_amend_description = description 764 post_amend_description = description
765 765
766 calls = [ 766 calls = [
767 ((['git', 'config', '--bool', 'gerrit.squash-uploads'],), 'false'), 767 ((['git', 'config', '--bool', 'gerrit.squash-uploads'],), 'false'),
768 ((['git', 'config', '--bool', 'gerrit.squash-uploads'],), 'false'),
769 ] 768 ]
770 # If issue is given, then description is fetched from Gerrit instead. 769 # If issue is given, then description is fetched from Gerrit instead.
771 if issue is None: 770 if issue is None:
772 if squash: 771 if squash:
773 calls += [ 772 calls += [
774 ((['git', 'show', '--format=%B', '-s', 773 ((['git', 'show', '--format=%B', '-s',
775 'refs/heads/git_cl_uploads/master'],), '')] 774 'refs/heads/git_cl_uploads/master'],), '')]
776 calls += [ 775 calls += [
777 ((['git', 'log', '--pretty=format:%s\n\n%b', 776 ((['git', 'log', '--pretty=format:%s\n\n%b',
778 'fake_ancestor_sha..HEAD'],), 777 'fake_ancestor_sha..HEAD'],),
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 ((['rm_file_or_tree', '/abs/git_repo_root/.git/hooks/commit-msg'],), 1628 ((['rm_file_or_tree', '/abs/git_repo_root/.git/hooks/commit-msg'],),
1630 ''), 1629 ''),
1631 ] 1630 ]
1632 cl._codereview_impl._GerritCommitMsgHookCheck(offer_removal=True) 1631 cl._codereview_impl._GerritCommitMsgHookCheck(offer_removal=True)
1633 1632
1634 1633
1635 if __name__ == '__main__': 1634 if __name__ == '__main__':
1636 git_cl.logging.basicConfig( 1635 git_cl.logging.basicConfig(
1637 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 1636 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
1638 unittest.main() 1637 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