comparison tests/f @ 23912:7d0aa6269ece

tests: teach f not to report symlink mode bits They're not meaningful or portable
author Matt Mackall <mpm@selenic.com>
date Sat, 17 Jan 2015 13:53:56 -0800
parents 593a5cd709a2
children 6686ae524f94
comparison
equal deleted inserted replaced
23911:593a5cd709a2 23912:7d0aa6269ece
61 facts.append('type unknown') 61 facts.append('type unknown')
62 if not isstdin: 62 if not isstdin:
63 stat = os.lstat(f) 63 stat = os.lstat(f)
64 if opts.size and not isdir: 64 if opts.size and not isdir:
65 facts.append('size=%s' % stat.st_size) 65 facts.append('size=%s' % stat.st_size)
66 if opts.mode: 66 if opts.mode and not islink:
67 facts.append('mode=%o' % (stat.st_mode & 0777)) 67 facts.append('mode=%o' % (stat.st_mode & 0777))
68 if opts.links: 68 if opts.links:
69 facts.append('links=%s' % stat.st_nlink) 69 facts.append('links=%s' % stat.st_nlink)
70 if opts.newer: 70 if opts.newer:
71 # mtime might be in whole seconds so newer file might be same 71 # mtime might be in whole seconds so newer file might be same