gcl's caching was effectively disabled for > 1 year. Reenable it.

TEST=chmod a-w .svn/gcl_info/cache/codereview.settings and see if an exception is thrown when the file is recent

Review URL: http://codereview.chromium.org/2057006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46990 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent 982984e163
commit 2f6a0d87b1

@ -15,6 +15,7 @@ import string
import subprocess import subprocess
import sys import sys
import tempfile import tempfile
import time
from third_party import upload from third_party import upload
import urllib2 import urllib2
@ -131,7 +132,7 @@ def GetCachedFile(filename, max_age=60*60*24*3, use_root=False):
except gclient_utils.Error: except gclient_utils.Error:
return None return None
if (not os.path.exists(cached_file) or if (not os.path.exists(cached_file) or
os.stat(cached_file).st_mtime > max_age): (time.time() - os.stat(cached_file).st_mtime) > max_age):
dir_info = SVN.CaptureInfo(".") dir_info = SVN.CaptureInfo(".")
repo_root = dir_info["Repository Root"] repo_root = dir_info["Repository Root"]
if use_root: if use_root:

Loading…
Cancel
Save