Mercurial > hg
comparison tests/f @ 23911:593a5cd709a2
tests: teach f not to report directory size
It's not meaningful or portable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 17 Jan 2015 13:53:16 -0800 |
parents | bead0c7b4f68 |
children | 7d0aa6269ece |
comparison
equal
deleted
inserted
replaced
23910:759df5197e9a | 23911:593a5cd709a2 |
---|---|
59 facts.append('directory with %s files' % len(dirfiles)) | 59 facts.append('directory with %s files' % len(dirfiles)) |
60 elif opts.type: | 60 elif opts.type: |
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: | 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: |
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) |