revset: prefetch method in "parents"
As already demonstrated, saving attribute lookup gains us some minor but
noticeable performance improvements.
revset #0: parents(all())
before) 0.024169
after ) 0.022756 94%
#!/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)