Mercurial > hg-stable
view tests/readlink.py @ 14051:2b1226693c70 stable
mq: add '.' and '..' to list of forbidden patch names
When an empty string is being passed to normname
it would return '.' causing checkfile() to always
return that a patch with that name exists.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 29 Apr 2011 22:21:13 +0300 |
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)