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

Unified Diff: tests/gclient_scm_test.py

Issue 8994016: [depot_tools] Disabling new git checkouts with safesync_urls until fixed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: code review nit Created 9 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 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_scm_test.py
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index ac13c108b43ebb85f653500332d2513a49759ec1..41f4281fd5f7ab36b3078efdd227904494067016 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -1004,13 +1004,13 @@ class ManagedGitWrapperTestCaseMox(BaseTestCase):
self.mox.StubOutWithMock(gclient_scm.scm.GIT, 'IsValidRevision', True)
gclient_scm.scm.GIT.IsValidRevision(cwd=self.base_path, rev=self.fake_hash_1
).AndReturn(True)
- gclient_scm.scm.GIT.IsValidRevision(cwd=self.base_path, rev='1'
- ).AndReturn(False)
self.mox.StubOutWithMock(gclient_scm.scm.GIT, 'IsGitSvn', True)
gclient_scm.scm.GIT.IsGitSvn(cwd=self.base_path).MultipleTimes(
).AndReturn(False)
+ gclient_scm.scm.os.path.isdir(self.base_path).AndReturn(True)
+
self.mox.ReplayAll()
git_scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
@@ -1019,7 +1019,7 @@ class ManagedGitWrapperTestCaseMox(BaseTestCase):
# the LKGR gets flipped to git sha1's some day).
self.assertEquals(git_scm.GetUsableRev(self.fake_hash_1, options),
self.fake_hash_1)
- # An SVN rev with a purely git repo should raise an exception.
+ # An SVN rev with an existing purely git repo should raise an exception.
self.assertRaises(gclient_scm.gclient_utils.Error,
git_scm.GetUsableRev, '1', options)
@@ -1054,10 +1054,16 @@ class ManagedGitWrapperTestCaseMox(BaseTestCase):
gclient_scm.scm.GIT.IsValidRevision(cwd=self.base_path, rev=too_big
).AndReturn(False)
+ gclient_scm.os.path.isdir(self.base_path).AndReturn(False)
+ gclient_scm.os.path.isdir(self.base_path).MultipleTimes().AndReturn(True)
+
self.mox.ReplayAll()
git_svn_scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
relpath=self.relpath)
+ # Without an existing checkout, this should fail. TODO(dbeam) Fix this.
+ self.assertRaises(gclient_scm.gclient_utils.Error,
+ git_svn_scm.GetUsableRev, '1', options)
# Given an SVN revision with a git-svn checkout, it should be translated to
# a git sha1 and be usable.
self.assertEquals(git_svn_scm.GetUsableRev('1', options),
« 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