Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-svn.t @ 35400: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 | feecfefeba25 |
children | 991e4404e910 |
line wrap: on
line diff
--- a/tests/test-subrepo-svn.t Sun Dec 10 22:45:35 2017 -0500 +++ b/tests/test-subrepo-svn.t Sun Dec 10 22:50:57 2017 -0500 @@ -22,12 +22,12 @@ $ echo alpha > src/alpha $ svn add src A src - A src/alpha (glob) + A src/alpha $ mkdir externals $ echo other > externals/other $ svn add externals A externals - A externals/other (glob) + A externals/other $ svn ci -qm 'Add alpha' $ svn up -q $ echo "externals -r1 $SVNREPOURL/externals" > extdef @@ -173,7 +173,7 @@ this commit fails because of meta changes $ svn propset svn:mime-type 'text/html' s/alpha - property 'svn:mime-type' set on 's/alpha' (glob) + property 'svn:mime-type' set on 's/alpha' $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' committing subrepository s abort: svn:*Commit failed (details follow): (glob) @@ -204,7 +204,7 @@ this commit fails because of externals meta changes $ svn propset svn:mime-type 'text/html' s/externals/other - property 'svn:mime-type' set on 's/externals/other' (glob) + property 'svn:mime-type' set on 's/externals/other' $ hg ci --subrepos -m 'amend externals from hg' committing subrepository s abort: cannot commit svn externals (in subrepository "s") @@ -216,19 +216,19 @@ $ cd .. $ hg clone t tc updating to branch default - A tc/s/alpha (glob) - U tc/s (glob) + A tc/s/alpha + U tc/s Fetching external item into 'tc/s/externals'* (glob) - A tc/s/externals/other (glob) + A tc/s/externals/other Checked out external at revision 1. Checked out revision 3. - A tc/subdir/s/alpha (glob) - U tc/subdir/s (glob) + A tc/subdir/s/alpha + U tc/subdir/s Fetching external item into 'tc/subdir/s/externals'* (glob) - A tc/subdir/s/externals/other (glob) + A tc/subdir/s/externals/other Checked out external at revision 1. Checked out revision 2. @@ -430,7 +430,7 @@ $ echo epsilon.py > dir/epsilon.py $ svn add dir A dir - A dir/epsilon.py (glob) + A dir/epsilon.py $ svn ci -qm 'Add dir/epsilon.py' $ cd ../.. $ hg init rebaserepo @@ -495,7 +495,7 @@ $ hg ci --subrepos -m cleanup | filter_svn_output committing subrepository obstruct - Sending obstruct/other (glob) + Sending obstruct/other Committed revision 7. At revision 7. $ svn mkdir -qm "baseline" $SVNREPOURL/trunk @@ -516,7 +516,7 @@ $ cd .. $ rm -rf tempwc $ svn co "$SVNREPOURL/branch"@10 recreated - A recreated/somethingold (glob) + A recreated/somethingold Checked out revision 10. $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub $ hg ci -m addsub @@ -584,8 +584,8 @@ $ mkdir trunk/subdir branches $ echo a > trunk/subdir/a $ svn add trunk/subdir branches - A trunk/subdir (glob) - A trunk/subdir/a (glob) + A trunk/subdir + A trunk/subdir/a A branches $ svn ci -qm addsubdir $ svn cp -qm branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch @@ -594,7 +594,7 @@ $ hg init repo2 $ cd repo2 $ svn co $SVNREPOURL/branches/somebranch/subdir - A subdir/a (glob) + A subdir/a Checked out revision 15. $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub $ hg add .hgsub @@ -618,10 +618,10 @@ $ echo 'sub/.hg/hgrc in svn repo' > sub/.hg/hgrc $ svn add .hg sub A .hg - A .hg/hgrc (glob) + A .hg/hgrc A sub - A sub/.hg (glob) - A sub/.hg/hgrc (glob) + A sub/.hg + A sub/.hg/hgrc $ svn ci -qm 'add .hg/hgrc to be sanitized at hg update' $ svn up -q $ cd .. @@ -631,8 +631,8 @@ $ cd .. $ hg -R tc pull -u -q 2>&1 | sort - warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/.hg' (glob) - warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/sub/.hg' (glob) + warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/.hg' + warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/sub/.hg' $ cd tc $ grep ' s$' .hgsubstate 16 s