mercurial/posix.py
branchstable
changeset 46680 6595e22048fe
parent 45942 89a2afe31e82
child 46819 d4ba4d51f85f
equal deleted inserted replaced
46679:d6fa9fbd375d 46680:6595e22048fe
   319                 target = b'checklink-target'
   319                 target = b'checklink-target'
   320                 try:
   320                 try:
   321                     fullpath = os.path.join(cachedir, target)
   321                     fullpath = os.path.join(cachedir, target)
   322                     open(fullpath, b'w').close()
   322                     open(fullpath, b'w').close()
   323                 except IOError as inst:
   323                 except IOError as inst:
   324                     if (
   324                     # pytype: disable=unsupported-operands
   325                         inst[0] == errno.EACCES
   325                     if inst[0] == errno.EACCES:
   326                     ):  # pytype: disable=unsupported-operands
   326                         # pytype: enable=unsupported-operands
       
   327 
   327                         # If we can't write to cachedir, just pretend
   328                         # If we can't write to cachedir, just pretend
   328                         # that the fs is readonly and by association
   329                         # that the fs is readonly and by association
   329                         # that the fs won't support symlinks. This
   330                         # that the fs won't support symlinks. This
   330                         # seems like the least dangerous way to avoid
   331                         # seems like the least dangerous way to avoid
   331                         # data loss.
   332                         # data loss.