Mercurial > public > mercurial-scm > hg
diff tests/test-subrepo-recursion.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 | 0c14b3f23294 |
line wrap: on
line diff
--- a/tests/test-subrepo-recursion.t Sun Dec 10 22:45:35 2017 -0500 +++ b/tests/test-subrepo-recursion.t Sun Dec 10 22:50:57 2017 -0500 @@ -23,10 +23,10 @@ $ hg add -S .hgsub $ hg add -S foo/.hgsub $ hg add -S foo/bar - adding foo/bar/z.txt (glob) + adding foo/bar/z.txt $ hg add -S adding x.txt - adding foo/y.txt (glob) + adding foo/y.txt Test recursive status without committing anything: @@ -67,7 +67,7 @@ $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos committing subrepository foo - committing subrepository foo/bar (glob) + committing subrepository foo/bar $ cd foo $ echo y2 >> y.txt @@ -192,7 +192,7 @@ $ rm -r dir $ hg commit --subrepos -m 2-3-2 committing subrepository foo - committing subrepository foo/bar (glob) + committing subrepository foo/bar Test explicit path commands within subrepos: add/forget $ echo z1 > foo/bar/z2.txt @@ -205,7 +205,7 @@ $ hg status -S ? foo/bar/z2.txt $ hg forget foo/bar/z2.txt - not removing foo/bar/z2.txt: file is already untracked (glob) + not removing foo/bar/z2.txt: file is already untracked [1] $ hg status -S ? foo/bar/z2.txt @@ -254,13 +254,13 @@ #if serve $ cd .. $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log - adding = $TESTTMP/repo (glob) - adding foo = $TESTTMP/repo/foo (glob) - adding foo/bar = $TESTTMP/repo/foo/bar (glob) + adding = $TESTTMP/repo + adding foo = $TESTTMP/repo/foo + adding foo/bar = $TESTTMP/repo/foo/bar listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) - adding = $TESTTMP/repo (glob) (?) - adding foo = $TESTTMP/repo/foo (glob) (?) - adding foo/bar = $TESTTMP/repo/foo/bar (glob) (?) + adding = $TESTTMP/repo (?) + adding foo = $TESTTMP/repo/foo (?) + adding foo/bar = $TESTTMP/repo/foo/bar (?) $ cat hg1.pid >> $DAEMON_PIDS $ hg clone http://localhost:$HGPORT clone --config progress.disable=True @@ -278,7 +278,7 @@ adding file changes added 4 changesets with 7 changes to 3 files new changesets af048e97ade2:65903cebad86 - cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar (glob) + cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar requesting all changes adding changesets adding manifests @@ -340,8 +340,8 @@ archiving (foo) [====================================>] 3/3\r (no-eol) (esc) \r (no-eol) (esc) \r (no-eol) (esc) - archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) - archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) + archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) + archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) \r (no-eol) (esc) $ find ../archive | sort ../archive @@ -372,8 +372,8 @@ archiving (foo) [====================================>] 3/3\r (no-eol) (esc) \r (no-eol) (esc) \r (no-eol) (esc) - archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) - archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) + archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) + archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) \r (no-eol) (esc) (unzip date formating is unstable, we do not care about it and glob it out) @@ -445,11 +445,11 @@ linking [ <=> ] 6\r (no-eol) (esc) \r (no-eol) (esc) \r (no-eol) (esc) - archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) - archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) + archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) + archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) \r (no-eol) (esc) cloning subrepo foo from $TESTTMP/repo/foo - cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) + cloning subrepo foo/bar from $TESTTMP/repo/foo/bar #else Note there's a slight output glitch on non-hardlink systems: the last "linking" progress topic never gets closed, leading to slight output corruption on that platform. @@ -462,7 +462,7 @@ \r (no-eol) (esc) \r (no-eol) (esc) linking [ <=> ] 1\r (no-eol) (esc) - cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) + cloning subrepo foo/bar from $TESTTMP/repo/foo/bar #endif Archive + subrepos uses '/' for all component separators @@ -498,7 +498,7 @@ $ echo f > foo/f $ hg archive --subrepos -r tip archive cloning subrepo foo from $TESTTMP/empty/foo - abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") (glob) + abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") [255] Clone and test outgoing: @@ -507,11 +507,11 @@ $ hg clone repo repo2 updating to branch default cloning subrepo foo from $TESTTMP/repo/foo - cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) + cloning subrepo foo/bar from $TESTTMP/repo/foo/bar 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd repo2 $ hg outgoing -S - comparing with $TESTTMP/repo (glob) + comparing with $TESTTMP/repo searching for changes no changes found comparing with $TESTTMP/repo/foo @@ -537,7 +537,7 @@ $ hg commit --subrepos -m 3-4-2 committing subrepository foo $ hg outgoing -S - comparing with $TESTTMP/repo (glob) + comparing with $TESTTMP/repo searching for changes changeset: 3:2655b8ecc4ee tag: tip @@ -567,7 +567,7 @@ Test incoming: $ hg incoming -S - comparing with $TESTTMP/repo2 (glob) + comparing with $TESTTMP/repo2 searching for changes changeset: 3:2655b8ecc4ee tag: tip