Mercurial > hg
view contrib/python3-whitelist @ 35393:4441705b7111
tests: remove (glob) annotations that were only for '\' matches
# skip-blame because this was mechanically rewritten the following script. I
ran it on both *.t and *.py, but none of the *.py changes were proper. All *.t
ones appear to be, and they run without addition failures on both Windows and
Linux.
import argparse
import os
import re
ap = argparse.ArgumentParser()
ap.add_argument('path', nargs='+')
opts = ap.parse_args()
globre = re.compile(r'^(.*) \(glob\)(.*)$')
for p in opts.path:
tmp = p + '.tmp'
with open(p, 'rb') as src, open(tmp, 'wb') as dst:
for line in src:
m = globre.match(line)
if not m or '$LOCALIP' in line or '*' in line:
dst.write(line)
continue
if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
dst.write(line)
continue
dst.write(m.group(1) + m.group(2) + '\n')
os.unlink(p)
os.rename(tmp, p)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 10 Dec 2017 22:50:57 -0500 |
parents | ea645c6c6d46 |
children | aaeba70d5cbe |
line wrap: on
line source
test-add.t test-addremove-similar.t test-addremove.t test-ancestor.py test-automv.t test-backwards-remove.t test-bheads.t test-bisect2.t test-bookmarks-merge.t test-bookmarks-strip.t test-branch-tag-confict.t test-casecollision.t test-cat.t test-changelog-exec.t test-check-commit.t test-check-execute.t test-check-module-imports.t test-check-pyflakes.t test-check-pylint.t test-check-shbang.t test-children.t test-commit-unresolved.t test-completion.t test-contrib-check-code.t test-contrib-check-commit.t test-debugrename.t test-diff-copy-depth.t test-diff-hashes.t test-diff-issue2761.t test-diff-newlines.t test-diff-reverse.t test-diff-subdir.t test-dirstate-nonnormalset.t test-doctest.py test-double-merge.t test-duplicateoptions.py test-empty-dir.t test-empty-file.t test-empty.t test-encoding-func.py test-excessive-merge.t test-execute-bit.t test-gpg.t test-hghave.t test-imports-checker.t test-issue1089.t test-issue1502.t test-issue1802.t test-issue1877.t test-issue1993.t test-issue522.t test-issue612.t test-issue619.t test-issue672.t test-issue842.t test-journal-exists.t test-locate.t test-lrucachedict.py test-manifest.py test-manifest-merging.t test-match.py test-merge-default.t test-merge-internal-tools-pattern.t test-merge-remove.t test-merge-revert.t test-merge-revert2.t test-merge-subrepos.t test-merge10.t test-merge2.t test-merge4.t test-merge5.t test-merge6.t test-merge7.t test-merge8.t test-mq-qimport-fail-cleanup.t test-permissions.t test-push-checkheads-partial-C1.t test-push-checkheads-partial-C2.t test-push-checkheads-partial-C3.t test-push-checkheads-partial-C4.t test-push-checkheads-pruned-B1.t test-push-checkheads-pruned-B2.t test-push-checkheads-pruned-B3.t test-push-checkheads-pruned-B4.t test-push-checkheads-pruned-B5.t test-push-checkheads-pruned-B6.t test-push-checkheads-pruned-B7.t test-push-checkheads-pruned-B8.t test-push-checkheads-superceed-A1.t test-push-checkheads-superceed-A2.t test-push-checkheads-superceed-A3.t test-push-checkheads-superceed-A4.t test-push-checkheads-superceed-A5.t test-push-checkheads-superceed-A6.t test-push-checkheads-superceed-A7.t test-push-checkheads-superceed-A8.t test-push-checkheads-unpushed-D1.t test-push-checkheads-unpushed-D2.t test-push-checkheads-unpushed-D3.t test-push-checkheads-unpushed-D4.t test-push-checkheads-unpushed-D5.t test-push-checkheads-unpushed-D6.t test-push-checkheads-unpushed-D7.t test-rename-dir-merge.t test-rename-merge1.t test-rename.t test-revert-flags.t test-revert-unknown.t test-revlog-group-emptyiter.t test-revlog-packentry.t test-run-tests.py test-show-stack.t test-simple-update.t test-status-terse.t test-uncommit.t test-unified-test.t test-unrelated-pull.t test-update-issue1456.t test-update-names.t test-update-reverse.t test-xdg.t