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

Unified Diff: tests/git_cl_test.py

Issue 157913005: Cleanup: Merge a bunch of redundent env['GIT_PAGER'] = 'cat' statements. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: clean more stuff Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
===================================================================
--- tests/git_cl_test.py (revision 249939)
+++ tests/git_cl_test.py (working copy)
@@ -204,7 +204,6 @@
((['git',
'config', '--local', '--get-regexp', '^svn-remote\\.'],),
(('', None), 0)),
- ((['git', 'rev-parse', '--show-cdup'],), ''),
((['git', 'svn', 'info'],), ''),
((['git',
'config', 'branch.master.rietveldissue', '1'],), ''),
@@ -319,8 +318,8 @@
]
@classmethod
- def _dcommit_calls_3(cls):
- return [
+ def _dcommit_calls_3(cls, is_first_call):
+ calls = [
((['git',
'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
'-l100000', '-C50', 'fake_ancestor_sha',
@@ -334,7 +333,12 @@
((['git', 'branch', '-D', 'git-cl-commit'],), ''),
((['git', 'show-ref', '--quiet', '--verify',
'refs/heads/git-cl-cherry-pick'],), ''),
- ((['git', 'rev-parse', '--show-cdup'],), '\n'),
+ ]
+ if is_first_call:
+ calls += [
+ ((['git', 'rev-parse', '--show-cdup'],), '\n'),
+ ]
+ calls += [
((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''),
((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''),
((['git', 'commit', '-m',
@@ -346,7 +350,8 @@
(('', None), 0)),
((['git', 'checkout', '-q', 'working'],), ''),
((['git', 'branch', '-D', 'git-cl-commit'],), ''),
- ]
+ ]
+ return calls
@staticmethod
def _cmd_line(description, args, similarity, find_copies, private):
@@ -509,14 +514,14 @@
self._dcommit_calls_1() +
self._git_sanity_checks('fake_ancestor_sha', 'working') +
self._dcommit_calls_normal() +
- self._dcommit_calls_3())
+ self._dcommit_calls_3(False))
git_cl.main(['dcommit'])
def test_dcommit_bypass_hooks(self):
self.calls = (
self._dcommit_calls_1() +
self._dcommit_calls_bypassed() +
- self._dcommit_calls_3())
+ self._dcommit_calls_3(True))
git_cl.main(['dcommit', '--bypass-hooks'])
« 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