Mercurial > hg
comparison tests/f @ 28046:742cf5b979ec
f: use modern octal number formatting
This is fixing for 'legacy octal syntax; use "0o" prefix instead of
"0"' check-code rule.
check-code has overlooked this, because a file isn't recognized as one
to be checked (this problem is fixed by subsequent patch).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 10 Feb 2016 22:44:28 +0900 |
parents | e4f70e79a65f |
children | 0362605b82cf |
comparison
equal
deleted
inserted
replaced
28045:f68ded00cae5 | 28046:742cf5b979ec |
---|---|
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 and not islink: | 66 if opts.mode and not islink: |
67 facts.append('mode=%o' % (stat.st_mode & 0777)) | 67 facts.append('mode=%o' % (stat.st_mode & 0o777)) |
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 |
72 if stat.st_mtime >= os.stat(opts.newer).st_mtime: | 72 if stat.st_mtime >= os.stat(opts.newer).st_mtime: |