# HG changeset patch # User Steve Losh # Date 1247624856 14400 # Node ID 8d824dee6437cb2e9188aeded305ce029c070fe7 # Parent 7a87d26c99ac893750a94f78e7a558bfb55f1321 Touch the cache if it does not exist to prevent multiple forks. diff -r 7a87d26c99ac -r 8d824dee6437 prompt.py --- a/prompt.py Tue Jul 14 22:24:27 2009 -0400 +++ b/prompt.py Tue Jul 14 22:27:36 2009 -0400 @@ -119,6 +119,8 @@ cache_time = (datetime.fromtimestamp(os.stat(cache).st_mtime) if cache_exists else None) if not cache_exists or cache_time < datetime.now() - CACHE_TIMEOUT: + if not cache_exists: + open(cache, 'w').close() subprocess.Popen(['hg', 'prompt', '--cache-%s' % kind]) if cache_exists: