diff mercurial/posix.py @ 40821:47e3f554df35

check-exec: write file in 'wcache' instead of 'cache' Some cache are relevant or affected by the working copy used. So the `.hg/cache` directory is not the best place for them because multiple shared repository can end up fighting over them. To address this issue, we introduce a new 'wcache' directory to host this kind of cache. The first user are the `checkisexec` type file. These files describe property of the working copy and fit the use-case well.
author Boris Feld <boris.feld@octobus.net>
date Thu, 15 Nov 2018 17:08:23 +0100
parents bd0874977a5e
children 593f6359681d
line wrap: on
line diff
--- a/mercurial/posix.py	Fri Nov 23 06:09:44 2018 +0100
+++ b/mercurial/posix.py	Thu Nov 15 17:08:23 2018 +0100
@@ -182,7 +182,7 @@
     try:
         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
         basedir = os.path.join(path, '.hg')
-        cachedir = os.path.join(basedir, 'cache')
+        cachedir = os.path.join(basedir, 'wcache')
         storedir = os.path.join(basedir, 'store')
         if not os.path.exists(cachedir):
             try:
@@ -255,7 +255,7 @@
     # mktemp is not racy because symlink creation will fail if the
     # file already exists
     while True:
-        cachedir = os.path.join(path, '.hg', 'cache')
+        cachedir = os.path.join(path, '.hg', 'wcache')
         checklink = os.path.join(cachedir, 'checklink')
         # try fast path, read only
         if os.path.islink(checklink):