tests/readlink.py
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 11 Jan 2017 11:37:38 -0800
changeset 30769 e520f0f4b1cf
parent 29485 6a98f9408a50
child 45830 c102b704edb5
permissions -rwxr-xr-x
help: merge revsets.txt into revisions.txt Selecting single and multiple revisions is closely related, so let's put it in one place, so users can easily find it. We actually did not even point to "hg help revsets" from "hg help revisions", but now that they're on a single page, that won't be necessary.

#!/usr/bin/env python

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)