view tests/readlink.py @ 20530:78f547cdc362 stable

verify: do not prevent verify repository containing hidden changesets Since a959f7167077, repo.cancopy() cannot be used to check if the repo is a bundlerepository. repo.url() should always have "scheme:", so it isn't necessary to parse by util.url().
author Yuya Nishihara <yuya@tcha.org>
date Wed, 19 Feb 2014 22:19:45 +0900
parents 08a0f04b56bd
children 328739ea70c3
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, err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)