comparison tests/f @ 38364:06c85cbd6824

py3: use '%d' for os.stat_result.st_nlink instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D3786
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Jun 2018 15:25:57 +0530
parents 0585337ea787
children be0a5d2d5c78
comparison
equal deleted inserted replaced
38363:a6426dd3210d 38364:06c85cbd6824
82 if opts.size and not isdir: 82 if opts.size and not isdir:
83 facts.append(b'size=%d' % stat.st_size) 83 facts.append(b'size=%d' % stat.st_size)
84 if opts.mode and not islink: 84 if opts.mode and not islink:
85 facts.append(b'mode=%o' % (stat.st_mode & 0o777)) 85 facts.append(b'mode=%o' % (stat.st_mode & 0o777))
86 if opts.links: 86 if opts.links:
87 facts.append(b'links=%s' % stat.st_nlink) 87 facts.append(b'links=%d' % stat.st_nlink)
88 if opts.newer: 88 if opts.newer:
89 # mtime might be in whole seconds so newer file might be same 89 # mtime might be in whole seconds so newer file might be same
90 if stat.st_mtime >= os.stat(opts.newer).st_mtime: 90 if stat.st_mtime >= os.stat(opts.newer).st_mtime:
91 facts.append(b'newer than %s' % opts.newer) 91 facts.append(b'newer than %s' % opts.newer)
92 else: 92 else: