tests/readlink.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 08 Jul 2024 17:02:27 +0200
changeset 51682 c10fa6388dbf
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
revlog: use an explicit config option to enable mmap usage for index We replace the `experimental.mmapindexthreshold` with two options: The `storage.revlog.mmap.index` is a boolean option to enable or disable the feature. The `storage.revlog.mmap.index:size-threshold` is a bytes option that control when we will be using mmap instead of plain reading.

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