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

Unified Diff: tests/gclient_smoketest.py

Issue 11366239: Remove more unversioned directories. (Closed) Base URL: https://git.chromium.org/chromium/tools/depot_tools.git@master
Patch Set: Use subprocess instead of scm module. Created 8 years, 1 month 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
« gclient_scm.py ('K') | « 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
diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
index 481492cf71b5c30d3fff9eb563221876a7ea51ee..4896e6633d982597811c5b75b00bf84821264c47 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -21,6 +21,7 @@ ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOT_DIR)
from testing_support.fake_repos import join, write, FakeReposTestBase
+import gclient_utils
import subprocess2
@@ -784,6 +785,21 @@ class GClientSmokeSVN(GClientSmokeBase):
self.checkBlock(res[0],
['running', 'running', 'running'])
+ def testUnversionedRepository(self):
+ # Check that gclient automatically deletes crippled SVN repositories.
+ if not self.enabled:
+ return
+ self.gclient(['config', self.svn_base + 'trunk/src/'])
+ cmd = ['sync', '--jobs', '1', '--delete_unversioned_trees', '--reset']
+ self.assertEquals(0, self.gclient(cmd)[-1])
+ third_party = join(self.root_dir, 'src', 'third_party')
+ subprocess2.check_call(['svn', 'propset', '-q', 'svn:ignore', 'foo', '.'],
+ cwd=third_party)
+
+ # Cripple src/third_party/foo and make sure gclient still succeeds.
+ gclient_utils.rmtree(join(third_party, 'foo', '.svn'))
+ self.assertEquals(0, self.gclient(cmd)[-1])
+
class GClientSmokeGIT(GClientSmokeBase):
def setUp(self):
« gclient_scm.py ('K') | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698