view tests/readlink.py @ 27288:c14af2d4b08c

shelve: remove redundant acquisition of wlock for sub commands of unshelve Previous patch ensures that wlock is acquired before processing for "hg unshelve". It makes acquisition of wlock in each functions below redundant. - unshelveabort() for "unshelve --abort" - unshelvecontinue() for "unshelve --continue"
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 09 Dec 2015 08:28:53 +0900
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)