tests/readlink.py
author Durham Goode <durham@fb.com>
Fri, 24 Jul 2015 16:43:21 -0700
branchstable
changeset 25869 a72e304df528
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
test: move ignore test run into a subdirectory Previously the hgignore test just called hg init in the test directory. A future patch needs to test hgignore stuff from outside of the repo, so let's move the entire test repo into a subdirectory.

#!/usr/bin/env python

import errno, os, 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, 'not a symlink'

sys.exit(0)