tests/readlink.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Mar 2024 11:34:21 +0100
changeset 51596 6378d57562af
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
tags-cache: add a dedicated warm cache function to hgtagsfnodescache Having a dedicated API point will help to optimize that specific usage. Right doing a full phases weam takes a long time, even when the cache is already filled.

#!/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)