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

Issue 2057006: gcl's caching was effectively disabled for > 1 year. Reenable it. (Closed)

Created:
10 years, 7 months ago by M-A Ruel
Modified:
9 years, 7 months ago
Reviewers:
jam
CC:
chromium-reviews
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46990

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M gcl.py View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
M-A Ruel
10 years, 7 months ago (2010-05-11 19:36:17 UTC) #1
jam
10 years, 7 months ago (2010-05-11 21:10:00 UTC) #2
lgtm

On Tue, May 11, 2010 at 12:36 PM, <maruel@chromium.org> wrote:

> Reviewers: John Abd-El-Malek,
>
> Description:
> 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
>
> Please review this at http://codereview.chromium.org/2057006/show
>
> Affected files:
>  M gcl.py
>
>
> Index: gcl.py
> diff --git a/gcl.py b/gcl.py
> index
>
7237aac27bf2cdabfdeaecb8072d0124e8892325..d356da532c11a2d39e16d2ecca25cd29fb7b6a64
> 100755
> --- a/gcl.py
> +++ b/gcl.py
> @@ -15,6 +15,7 @@ import string
>  import subprocess
>  import sys
>  import tempfile
> +import time
>  from third_party import upload
>  import urllib2
>
> @@ -131,7 +132,7 @@ def GetCachedFile(filename, max_age=60*60*24*3,
> use_root=False):
>     except gclient_utils.Error:
>       return None
>     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(".")
>       repo_root = dir_info["Repository Root"]
>       if use_root:
>
>
>

Powered by Google App Engine
This is Rietveld 408576698