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

Unified Diff: tests/gclient_smoketest.py

Issue 6873110: Add --transitive flag. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: local switch to other directory Created 9 years, 8 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 | « tests/gclient_scm_test.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_smoketest.py
diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
index acd0ab5666466a7fc2682a56b825c63e5ad090dc..408cd66b0503dd49f16bf87715c0f94e5cfc7033 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -327,6 +327,43 @@ class GClientSmokeSVN(GClientSmokeBase):
tree['src/svn_hooked1'] = 'svn_hooked1'
self.assertTree(tree)
+ def testSyncTransitive(self):
+ # TODO(maruel): safesync.
+ if not self.enabled:
+ return
+ self.gclient(['config', self.svn_base + 'trunk/src/'])
+
+ # Make sure we can populate a new repository with --transitive.
+ self.parseGclient(
+ ['sync', '--transitive', '--revision', 'src@1', '--deps', 'mac',
+ '--jobs', '1'],
+ ['running', 'running', 'running', 'running'])
+ tree = self.mangle_svn_tree(
+ ('trunk/src@1', 'src'),
+ ('trunk/third_party/foo@1', 'src/third_party/fpp'),
+ ('trunk/other@1', 'src/other'),
+ ('trunk/third_party/foo@1', 'src/third_party/prout'))
+
+ # Get up to date, so we can test synching back.
+ self.gclient(['sync', '--deps', 'mac', '--jobs', '1'])
+
+ # Manually remove svn_hooked1 before synching to make sure it's not
+ # recreated.
+ os.remove(join(self.root_dir, 'src', 'svn_hooked1'))
+
+ self.parseGclient(
+ ['sync', '--transitive', '--revision', 'src@1', '--deps', 'mac',
+ '--delete_unversioned_trees', '--jobs', '1'],
+ ['running', 'running', 'running', 'running', 'deleting'])
+ tree = self.mangle_svn_tree(
+ ('trunk/src@1', 'src'),
+ ('trunk/third_party/foo@1', 'src/third_party/fpp'),
+ ('trunk/other@1', 'src/other'),
+ ('trunk/third_party/foo@1', 'src/third_party/prout'))
+ tree['src/file/other/DEPS'] = (
+ self.FAKE_REPOS.svn_revs[2]['trunk/other/DEPS'])
+ self.assertTree(tree)
+
def testSyncIgnoredSolutionName(self):
"""TODO(maruel): This will become an error soon."""
if not self.enabled:
« no previous file with comments | « tests/gclient_scm_test.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698