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

Unified Diff: tests/gclient_smoketest.py

Issue 10986032: Add 'git clean -f -d' to 'gclient revert' when in a git repo. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 years, 3 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 | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_smoketest.py
===================================================================
--- tests/gclient_smoketest.py (revision 158576)
+++ tests/gclient_smoketest.py (working copy)
@@ -940,18 +940,19 @@
self.assertEquals(3, len(out))
# Revert implies --force implies running hooks without looking at pattern
- # matching.
- results = self.gclient(['revert', '--deps', 'mac', '--jobs', '1'])
- out = results[0].splitlines(False)
- # TODO(maruel): http://crosbug.com/3583 It just runs the hooks right now.
- self.assertEquals(13, len(out))
- self.checkString('', results[1])
- self.assertEquals(0, results[2])
+ # matching. For each expected path, 'git reset' and 'git clean' are run, so
+ # there should be two results for each. The last two results should reflect
+ # writing git_hooked1 and git_hooked2.
+ expected4 = ('running', self.root_dir)
+ out = self.parseGclient(['revert', '--deps', 'mac', '--jobs', '1'],
+ [expected1, expected1,
+ expected2, expected2,
+ expected3, expected3,
+ expected4, expected4])
+ self.assertEquals(8, len(out))
tree = self.mangle_git_tree(('repo_1@2', 'src'),
('repo_2@1', 'src/repo2'),
('repo_3@2', 'src/repo2/repo_renamed'))
- # TODO(maruel): http://crosbug.com/3583 This file should have been removed.
- tree[join('src', 'repo2', 'hi')] = 'Hey!'
tree['src/git_hooked1'] = 'git_hooked1'
tree['src/git_hooked2'] = 'git_hooked2'
self.assertTree(tree)
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698