tests/readlink.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Mar 2023 11:54:29 +0100
changeset 50266 307c155e6275
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
dirstate: deprecate calling `setbranch` without a transaction parameter The new way is now enforced.

#!/usr/bin/env python3


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)