view tests/readlink.py @ 25893:04ae6feb04c5

test-bookmarks.t: avoid nested repo This is (a) pretty unnecessary and (b) breaks tests for the third-party hgwatchman extension, which doesn't support nested repos.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 02 Aug 2015 21:56:38 -0700
parents 328739ea70c3
children 7bcfb9090c86
line wrap: on
line source

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