Make safesync w/ git hash work when lkgr is ahead of clone.


R=maruel@chromium.org, szager@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/12301002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183275 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 2292542..8f3b3f9 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -1077,6 +1077,7 @@
         ).AndReturn(False)
 
     gclient_scm.scm.os.path.isdir(self.base_path).AndReturn(True)
+    gclient_scm.os.path.isdir(self.base_path).AndReturn(True)
 
     self.mox.ReplayAll()
 
@@ -1118,6 +1119,7 @@
     gclient_scm.scm.GIT.Capture(['config', '--get', 'svn-remote.svn.fetch'],
                                 cwd=self.base_path).AndRaise(error)
     gclient_scm.scm.GIT.Capture(['svn', 'fetch'], cwd=self.base_path)
+    gclient_scm.scm.GIT.Capture(['fetch', 'origin'], cwd=self.base_path)
 
     self.mox.StubOutWithMock(gclient_scm.scm.GIT, 'IsGitSvn', True)
     gclient_scm.scm.GIT.IsGitSvn(cwd=self.base_path).MultipleTimes(
@@ -1127,7 +1129,7 @@
     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=too_big
-        ).AndReturn(False)
+        ).MultipleTimes(2).AndReturn(False)
 
     gclient_scm.os.path.isdir(self.base_path).AndReturn(False)
     gclient_scm.os.path.isdir(self.base_path).MultipleTimes().AndReturn(True)