Mercurial > hg
comparison tests/test-issue1502.t @ 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 | eb586ed5d8ce |
children |
comparison
equal
deleted
inserted
replaced
35392:5feb782c7a95 | 35393:4441705b7111 |
---|---|
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12 | 12 |
13 $ echo "bar" > foo1/a && hg -R foo1 commit -m "edit a in foo1" | 13 $ echo "bar" > foo1/a && hg -R foo1 commit -m "edit a in foo1" |
14 $ echo "hi" > foo/a && hg -R foo commit -m "edited a foo" | 14 $ echo "hi" > foo/a && hg -R foo commit -m "edited a foo" |
15 $ hg -R foo1 pull | 15 $ hg -R foo1 pull |
16 pulling from $TESTTMP/foo (glob) | 16 pulling from $TESTTMP/foo |
17 searching for changes | 17 searching for changes |
18 adding changesets | 18 adding changesets |
19 adding manifests | 19 adding manifests |
20 adding file changes | 20 adding file changes |
21 added 1 changesets with 1 changes to 1 files (+1 heads) | 21 added 1 changesets with 1 changes to 1 files (+1 heads) |
28 | 28 |
29 Pull. Bookmark should not jump to new head. | 29 Pull. Bookmark should not jump to new head. |
30 | 30 |
31 $ echo "there" >> foo/a && hg -R foo commit -m "edited a again" | 31 $ echo "there" >> foo/a && hg -R foo commit -m "edited a again" |
32 $ hg -R foo1 pull | 32 $ hg -R foo1 pull |
33 pulling from $TESTTMP/foo (glob) | 33 pulling from $TESTTMP/foo |
34 searching for changes | 34 searching for changes |
35 adding changesets | 35 adding changesets |
36 adding manifests | 36 adding manifests |
37 adding file changes | 37 adding file changes |
38 added 1 changesets with 1 changes to 1 files | 38 added 1 changesets with 1 changes to 1 files |