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

Side by Side Diff: tests/git_cl_test.py

Issue 760903004: Rewrite Google Code http URLs with https on git svn dcommit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fixed style violation Created 6 years 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 | Annotate | Revision Log
« 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 ((['git', 'branch', '-D', 'git-cl-commit'],), ''), 343 ((['git', 'branch', '-D', 'git-cl-commit'],), ''),
344 ((['git', 'show-ref', '--quiet', '--verify', 344 ((['git', 'show-ref', '--quiet', '--verify',
345 'refs/heads/git-cl-cherry-pick'],), ''), 345 'refs/heads/git-cl-cherry-pick'],), ''),
346 ((['git', 'rev-parse', '--show-cdup'],), '\n'), 346 ((['git', 'rev-parse', '--show-cdup'],), '\n'),
347 ((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''), 347 ((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''),
348 ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''), 348 ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''),
349 ((['git', 'commit', '-m', 349 ((['git', 'commit', '-m',
350 'Issue: 12345\n\nR=john@chromium.org\n\n' 350 'Issue: 12345\n\nR=john@chromium.org\n\n'
351 'Review URL: https://codereview.example.com/12345'],), 351 'Review URL: https://codereview.example.com/12345'],),
352 ''), 352 ''),
353 ((['git', 'config', 'rietveld.force-https-commit-url'],), ''),
353 ((['git', 354 ((['git',
354 'svn', 'dcommit', '-C50', '--no-rebase', '--rmdir'],), 355 'svn', 'dcommit', '-C50', '--no-rebase', '--rmdir'],),
355 (('', None), 0)), 356 (('', None), 0)),
356 ((['git', 'checkout', '-q', 'working'],), ''), 357 ((['git', 'checkout', '-q', 'working'],), ''),
357 ((['git', 'branch', '-D', 'git-cl-commit'],), ''), 358 ((['git', 'branch', '-D', 'git-cl-commit'],), ''),
358 ] 359 ]
359 360
360 @staticmethod 361 @staticmethod
361 def _cmd_line(description, args, similarity, find_copies, private): 362 def _cmd_line(description, args, similarity, find_copies, private):
362 """Returns the upload command line passed to upload.RealMain().""" 363 """Returns the upload command line passed to upload.RealMain()."""
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 'rietveld.private'],), ''), 681 'rietveld.private'],), ''),
681 ((['git', 'config', '--unset-all', 682 ((['git', 'config', '--unset-all',
682 'rietveld.tree-status-url'],), ''), 683 'rietveld.tree-status-url'],), ''),
683 ((['git', 'config', '--unset-all', 684 ((['git', 'config', '--unset-all',
684 'rietveld.viewvc-url'],), ''), 685 'rietveld.viewvc-url'],), ''),
685 ((['git', 'config', '--unset-all', 686 ((['git', 'config', '--unset-all',
686 'rietveld.bug-prefix'],), ''), 687 'rietveld.bug-prefix'],), ''),
687 ((['git', 'config', '--unset-all', 688 ((['git', 'config', '--unset-all',
688 'rietveld.cpplint-regex'],), ''), 689 'rietveld.cpplint-regex'],), ''),
689 ((['git', 'config', '--unset-all', 690 ((['git', 'config', '--unset-all',
691 'rietveld.force-https-commit-url'],), ''),
692 ((['git', 'config', '--unset-all',
690 'rietveld.cpplint-ignore-regex'],), ''), 693 'rietveld.cpplint-ignore-regex'],), ''),
691 ((['git', 'config', '--unset-all', 694 ((['git', 'config', '--unset-all',
692 'rietveld.project'],), ''), 695 'rietveld.project'],), ''),
693 ((['git', 'config', '--unset-all', 696 ((['git', 'config', '--unset-all',
694 'rietveld.pending-ref-prefix'],), ''), 697 'rietveld.pending-ref-prefix'],), ''),
695 ((['git', 'config', 'gerrit.host', 698 ((['git', 'config', 'gerrit.host',
696 'gerrit.chromium.org'],), ''), 699 'gerrit.chromium.org'],), ''),
697 # DownloadHooks(False) 700 # DownloadHooks(False)
698 ((['git', 'config', 'gerrit.host'],), 701 ((['git', 'config', 'gerrit.host'],),
699 'gerrit.chromium.org'), 702 'gerrit.chromium.org'),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 for orig, reviewers, _expected in data: 753 for orig, reviewers, _expected in data:
751 obj = git_cl.ChangeDescription(orig) 754 obj = git_cl.ChangeDescription(orig)
752 obj.update_reviewers(reviewers) 755 obj.update_reviewers(reviewers)
753 actual.append(obj.description) 756 actual.append(obj.description)
754 self.assertEqual(expected, actual) 757 self.assertEqual(expected, actual)
755 758
756 if __name__ == '__main__': 759 if __name__ == '__main__':
757 git_cl.logging.basicConfig( 760 git_cl.logging.basicConfig(
758 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 761 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
759 unittest.main() 762 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