Refactor cache-updating code to eliminate unnecessary fetches.
This is an update of the following reverted change:
https://codereview.chromium.org/344443002/
R=hinoka@chromium.org,agable@chromium.org
BUG=
Review URL: https://codereview.chromium.org/343523002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277931 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 0341229..55bc9c3 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -24,8 +24,12 @@
from testing_support.super_mox import TestCaseUtils
import gclient_scm
+import git_cache
import subprocess2
+# Disable global git cache
+git_cache.Mirror.SetCachePath(None)
+
# Shortcut since this function is used often
join = gclient_scm.os.path.join
@@ -1571,11 +1575,11 @@
if __name__ == '__main__':
- if '-v' in sys.argv:
- logging.basicConfig(
- level=logging.DEBUG,
- format='%(asctime).19s %(levelname)s %(filename)s:'
- '%(lineno)s %(message)s')
+ level = logging.DEBUG if '-v' in sys.argv else logging.FATAL
+ logging.basicConfig(
+ level=level,
+ format='%(asctime).19s %(levelname)s %(filename)s:'
+ '%(lineno)s %(message)s')
unittest.main()
# vim: ts=2:sw=2:tw=80:et: