Mercurial > hg-stable
view tests/readlink.py @ 18845:c1f416e4bc80
perf: add perfdirs command
This measures the cost of computing the dirstate's dirs structure,
which becomes very expensive in a large working directory.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Mon, 01 Apr 2013 13:46:32 -0700 |
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)