##// END OF EJS Templates
narrow: fix flaky behavior described in issue6150...
narrow: fix flaky behavior described in issue6150 This has been plaguing the CI for a good while, and it doesn't appear to have an easy fix proposed yet. The solution in this change is to always do an unambiguous (but expensive) lookup in case of comparison. This should always be correct, albeit suboptimal. Differential Revision: https://phab.mercurial-scm.org/D10034

File last commit:

r46434:c102b704 default
r47280:b994db7c stable
Show More
readlink.py
17 lines | 325 B | text/x-python | PythonLexer
#!/usr/bin/env python3
from __future__ import absolute_import, print_function
import errno
import os
import sys
for f in sys.argv[1:]:
try:
print(f, '->', os.readlink(f))
except OSError as err:
if err.errno != errno.EINVAL:
raise
print(f, '->', f, 'not a symlink')
sys.exit(0)