Mercurial > public > mercurial-scm > hg
diff tests/test-subrepo-git.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 | feecfefeba25 |
children | 8144f1b07e21 |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Sun Dec 10 22:45:35 2017 -0500 +++ b/tests/test-subrepo-git.t Sun Dec 10 22:50:57 2017 -0500 @@ -191,7 +191,7 @@ user b push changes $ hg push 2>/dev/null - pushing to $TESTTMP/t (glob) + pushing to $TESTTMP/t pushing branch testing of subrepository "s" searching for changes adding changesets @@ -203,7 +203,7 @@ $ cd ../ta $ hg pull - pulling from $TESTTMP/t (glob) + pulling from $TESTTMP/t searching for changes adding changesets adding manifests @@ -236,7 +236,7 @@ source ../gitroot revision f47b465e1bce645dbf37232a00574aa1546ca8d3 $ hg push 2>/dev/null - pushing to $TESTTMP/t (glob) + pushing to $TESTTMP/t pushing branch testing of subrepository "s" searching for changes adding changesets @@ -268,7 +268,7 @@ $ echo aa >> a $ hg commit -m aa $ hg push - pushing to $TESTTMP/t (glob) + pushing to $TESTTMP/t searching for changes adding changesets adding manifests @@ -399,7 +399,7 @@ M inner/s/f $ hg commit --subrepos -m nested committing subrepository inner - committing subrepository inner/s (glob) + committing subrepository inner/s nested archive @@ -678,8 +678,8 @@ $ hg -R tc pull -q $ hg -R tc update -q -C 3473d20bddcf 2>&1 | sort - warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) - warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) + warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' + warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' $ cd tc $ hg parents -q 8:3473d20bddcf @@ -725,8 +725,8 @@ $ cd .. $ hg -R tc pull -q $ hg -R tc update -q -C ed23f7fe024e 2>&1 | sort - warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) - warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) + warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' + warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' $ cd tc $ hg parents -q 9:ed23f7fe024e @@ -924,8 +924,8 @@ $ echo 'bloop' > s/foobar $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups' reverting subrepo ../gitroot - creating directory: $TESTTMP/tc/.hg/origbackups (glob) - saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar (glob) + creating directory: $TESTTMP/tc/.hg/origbackups + saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar $ ls .hg/origbackups foobar $ rm -rf .hg/origbackups @@ -998,7 +998,7 @@ reverting subrepo ../gitroot $ hg add --subrepos "glob:**.python" - adding s/snake.python (glob) + adding s/snake.python $ hg st --subrepos s A s/snake.python ? s/barfoo @@ -1009,11 +1009,11 @@ reverting subrepo ../gitroot $ hg add --subrepos s - adding s/barfoo (glob) - adding s/c.c (glob) - adding s/cpp.cpp (glob) - adding s/foobar.orig (glob) - adding s/snake.python (glob) + adding s/barfoo + adding s/c.c + adding s/cpp.cpp + adding s/foobar.orig + adding s/snake.python $ hg st --subrepos s A s/barfoo A s/c.c @@ -1031,10 +1031,10 @@ ? s/snake.python $ hg add --subrepos --exclude "path:s/c.c" - adding s/barfoo (glob) - adding s/cpp.cpp (glob) - adding s/foobar.orig (glob) - adding s/snake.python (glob) + adding s/barfoo + adding s/cpp.cpp + adding s/foobar.orig + adding s/snake.python $ hg st --subrepos s A s/barfoo A s/cpp.cpp @@ -1050,7 +1050,7 @@ > EOF $ hg add .hgignore $ hg add --subrepos "glob:**.python" s/barfoo - adding s/snake.python (glob) + adding s/snake.python $ hg st --subrepos s A s/barfoo A s/snake.python @@ -1099,10 +1099,10 @@ correctly do a dry run $ hg add --subrepos s --dry-run - adding s/barfoo (glob) - adding s/c.c (glob) - adding s/cpp.cpp (glob) - adding s/foobar.orig (glob) + adding s/barfoo + adding s/c.c + adding s/cpp.cpp + adding s/foobar.orig $ hg st --subrepos s A s/.gitignore A s/snake.python @@ -1196,7 +1196,7 @@ $ unset GIT_ALLOW_PROTOCOL $ PWNED_MSG="your git is too old or mercurial has regressed" hg clone \ > malicious-subrepository malicious-subrepository-protected - Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob) + Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... fatal: transport 'ext' not allowed updating to branch default cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt @@ -1209,7 +1209,7 @@ $ rm -f pwned.txt $ env GIT_ALLOW_PROTOCOL=ext PWNED_MSG="you asked for it" hg clone \ > malicious-subrepository malicious-subrepository-clone-allowed - Cloning into '$TESTTMP/tc/malicious-subrepository-clone-allowed/s'... (glob) + Cloning into '$TESTTMP/tc/malicious-subrepository-clone-allowed/s'... fatal: Could not read from remote repository. Please make sure you have the correct access rights