Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHGbe0a5d2d5c78: tests: fix last failure in test-tools.t
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
test-symlink-placeholder.t | test-symlink-placeholder.t | ||||
test-symlinks.t | test-symlinks.t | ||||
test-tag.t | test-tag.t | ||||
test-tags.t | test-tags.t | ||||
test-template-basic.t | test-template-basic.t | ||||
test-template-functions.t | test-template-functions.t | ||||
test-template-keywords.t | test-template-keywords.t | ||||
test-template-map.t | test-template-map.t | ||||
test-tools.t | |||||
test-transplant.t | test-transplant.t | ||||
test-treemanifest.t | test-treemanifest.t | ||||
test-ui-color.py | test-ui-color.py | ||||
test-ui-config.py | test-ui-config.py | ||||
test-ui-verbosity.py | test-ui-verbosity.py | ||||
test-unamend.t | test-unamend.t | ||||
test-unbundlehash.t | test-unbundlehash.t | ||||
test-uncommit.t | test-uncommit.t |
if opts.type: | if opts.type: | ||||
facts.append(b'file') | facts.append(b'file') | ||||
if any((opts.hexdump, opts.dump, opts.md5, opts.sha1, opts.sha256)): | if any((opts.hexdump, opts.dump, opts.md5, opts.sha1, opts.sha256)): | ||||
with open(f, 'rb') as fobj: | with open(f, 'rb') as fobj: | ||||
content = fobj.read() | content = fobj.read() | ||||
elif islink: | elif islink: | ||||
if opts.type: | if opts.type: | ||||
facts.append(b'link') | facts.append(b'link') | ||||
content = os.readlink(f) | content = os.readlink(f).encode('utf8') | ||||
elif isstdin: | elif isstdin: | ||||
content = getattr(sys.stdin, 'buffer', sys.stdin).read() | content = getattr(sys.stdin, 'buffer', sys.stdin).read() | ||||
if opts.size: | if opts.size: | ||||
facts.append(b'size=%d' % len(content)) | facts.append(b'size=%d' % len(content)) | ||||
elif isdir: | elif isdir: | ||||
if opts.recurse or opts.type: | if opts.recurse or opts.type: | ||||
dirfiles = glob.glob(f + '/*') | dirfiles = glob.glob(f + '/*') | ||||
facts.append(b'directory with %d files' % len(dirfiles)) | facts.append(b'directory with %d files' % len(dirfiles)) |