mercurial/posix.py
changeset 40792 47e3f554df35
parent 40670 bd0874977a5e
child 41289 593f6359681d
equal deleted inserted replaced
40786:74a9f428227e 40792:47e3f554df35
   180     # with exec bit on.
   180     # with exec bit on.
   181 
   181 
   182     try:
   182     try:
   183         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
   183         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
   184         basedir = os.path.join(path, '.hg')
   184         basedir = os.path.join(path, '.hg')
   185         cachedir = os.path.join(basedir, 'cache')
   185         cachedir = os.path.join(basedir, 'wcache')
   186         storedir = os.path.join(basedir, 'store')
   186         storedir = os.path.join(basedir, 'store')
   187         if not os.path.exists(cachedir):
   187         if not os.path.exists(cachedir):
   188             try:
   188             try:
   189                 # we want to create the 'cache' directory, not the '.hg' one.
   189                 # we want to create the 'cache' directory, not the '.hg' one.
   190                 # Automatically creating '.hg' directory could silently spawn
   190                 # Automatically creating '.hg' directory could silently spawn
   253 def checklink(path):
   253 def checklink(path):
   254     """check whether the given path is on a symlink-capable filesystem"""
   254     """check whether the given path is on a symlink-capable filesystem"""
   255     # mktemp is not racy because symlink creation will fail if the
   255     # mktemp is not racy because symlink creation will fail if the
   256     # file already exists
   256     # file already exists
   257     while True:
   257     while True:
   258         cachedir = os.path.join(path, '.hg', 'cache')
   258         cachedir = os.path.join(path, '.hg', 'wcache')
   259         checklink = os.path.join(cachedir, 'checklink')
   259         checklink = os.path.join(cachedir, 'checklink')
   260         # try fast path, read only
   260         # try fast path, read only
   261         if os.path.islink(checklink):
   261         if os.path.islink(checklink):
   262             return True
   262             return True
   263         if os.path.isdir(cachedir):
   263         if os.path.isdir(cachedir):