# HG changeset patch # User Matt Mackall # Date 2010-09-22 23:20:47 # Node ID a5b77eb0409b1d8a1999a180060965677774a5f5 # Parent 97ffc68f71d3b5c08ae742411f89357e2d844d61 tests: various fixes for new unified test pattern format diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -518,7 +518,7 @@ def tsttest(test, options): c = el[i] i += 1 if c == '\\' and el[i] in '*?\\': - res += el[i-1:i+1] + res += el[i - 1:i + 1] i += 1 elif c == '*': res += '.*' diff --git a/tests/test-convert-svn-branches.t b/tests/test-convert-svn-branches.t --- a/tests/test-convert-svn-branches.t +++ b/tests/test-convert-svn-branches.t @@ -79,7 +79,7 @@ Convert again Test hg failing to call itself $ HG=foobar hg convert svn-repo B-hg - .* + * (glob) initializing destination B-hg repository abort: Mercurial failed to run itself, check hg executable is in PATH [255] diff --git a/tests/test-convert-svn-encoding.t b/tests/test-convert-svn-encoding.t --- a/tests/test-convert-svn-encoding.t +++ b/tests/test-convert-svn-encoding.t @@ -14,7 +14,7 @@ Convert while testing all possible outpu $ hg --debug convert svn-repo A-hg initializing destination A-hg repository - reparent to file://.*/test-convert-svn-encoding.t/svn-repo + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) run hg sink pre-conversion action scanning source... found trunk at 'trunk' @@ -23,7 +23,7 @@ Convert while testing all possible outpu found branch branché at 5 found branch branchée at 6 scanning: 1 revisions - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) fetching revision log for "/trunk" from 4 to 0 parsing revision 4 (2 changes) parsing revision 3 (4 changes) @@ -33,18 +33,18 @@ Convert while testing all possible outpu '/branches' is not under '/trunk', ignoring '/tags' is not under '/trunk', ignoring scanning: 2 revisions - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 (glob) fetching revision log for "/branches/branché" from 5 to 0 parsing revision 5 (1 changes) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 (glob) found parent of branch /branches/branché at 4: /trunk scanning: 3 revisions - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e (glob) fetching revision log for "/branches/branchée" from 6 to 0 parsing revision 6 (1 changes) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e (glob) found parent of branch /branches/branchée at 5: /branches/branché scanning: 4 revisions scanning: 5 revisions @@ -57,7 +57,7 @@ Convert while testing all possible outpu 4 hello source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2 converting: 1/6 revisions (16.67%) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) scanning paths: /trunk/à 0/3 (0.00%) scanning paths: /trunk/à/é 1/3 (33.33%) scanning paths: /trunk/é 2/3 (66.67%) @@ -70,14 +70,14 @@ Convert while testing all possible outpu converting: 2/6 revisions (33.33%) scanning paths: /trunk/à 0/4 (0.00%) gone from -1 - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) scanning paths: /trunk/è 1/4 (25.00%) copied to è from é@2 scanning paths: /trunk/é 2/4 (50.00%) gone from -1 - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) scanning paths: /trunk/ù 3/4 (75.00%) mark /trunk/ù came from à:2 à/é @@ -95,12 +95,12 @@ Convert while testing all possible outpu converting: 3/6 revisions (50.00%) scanning paths: /trunk/è 0/2 (0.00%) gone from -1 - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) scanning paths: /trunk/ù 1/2 (50.00%) gone from -1 - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/trunk + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/trunk (glob) è getting files: è 1/2 (50.00%) ù/é @@ -108,17 +108,17 @@ Convert while testing all possible outpu 1 branch to branch? source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5 converting: 4/6 revisions (66.67%) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9 (glob) scanning paths: /branches/branché 0/1 (0.00%) 0 branch to branch?e source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6 converting: 5/6 revisions (83.33%) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e (glob) scanning paths: /branches/branchée 0/1 (0.00%) - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e - reparent to file://.*/test-convert-svn-encoding.t/svn-repo - reparent to file://.*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo (glob) + reparent to file://*/test-convert-svn-encoding.t/svn-repo/branches/branch%C3%A9e (glob) updating tags .hgtags run hg sink post-conversion action diff --git a/tests/test-convert-svn-move.t b/tests/test-convert-svn-move.t --- a/tests/test-convert-svn-move.t +++ b/tests/test-convert-svn-move.t @@ -87,8 +87,8 @@ Check move copy records Check branches $ hg branches - default 13:.* - d1 6:.* + default 13:* (glob) + d1 6:* (glob) $ cd .. $ mkdir test-replace diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t --- a/tests/test-convert-svn-source.t +++ b/tests/test-convert-svn-source.t @@ -12,7 +12,6 @@ > EOF $ svnadmin create svn-repo - $ svnadmin setuuid svn-repo 00000000-0000-0000-0000-000000000000 $ svnpath=`pwd | fixpath` @@ -175,5 +174,5 @@ This is also the only place testing more $ cd stoprev $ hg tip --debug | grep extra extra: branch=default - extra: convert_revision=svn:00000000-0000-0000-0000-000000000000/proj B/trunk@1 + extra: convert_revision=svn:........-....-....-....-............/proj B/trunk@1 (re) $ cd .. diff --git a/tests/test-export.t b/tests/test-export.t --- a/tests/test-export.t +++ b/tests/test-export.t @@ -82,12 +82,12 @@ Exporting 4 changesets to a file: $ hg export -o export_internal 1 2 3 4 $ grep HG export_internal | wc -l - \s*4 + \s*4 (re) Exporting 4 changesets to a file: $ hg export 1 2 3 4 | grep HG | wc -l - \s*4 + \s*4 (re) Exporting revision -2 to a file: diff --git a/tests/test-incoming-outgoing.t b/tests/test-incoming-outgoing.t --- a/tests/test-incoming-outgoing.t +++ b/tests/test-incoming-outgoing.t @@ -21,7 +21,7 @@ http incoming $ hg -R new incoming http://localhost:$HGPORT/ - comparing with http://localhost:\d+/ + comparing with http://localhost:\d+/ (re) changeset: 0:00a43fa82f62 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -69,7 +69,7 @@ http incoming summary: 8 $ hg -R new incoming -r 4 http://localhost:$HGPORT/ - comparing with http://localhost:\d+/ + comparing with http://localhost:\d+/ (re) changeset: 0:00a43fa82f62 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -222,7 +222,7 @@ limit to 2 changesets, test with -p --gi test with --bundle $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ - comparing with http://localhost:.*/ + comparing with http://localhost:*/ (glob) changeset: 0:00a43fa82f62 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -420,7 +420,7 @@ limit to 3 changesets summary: 11 $ hg -R test-dev outgoing http://localhost:$HGPORT/ - comparing with http://localhost:.*/ + comparing with http://localhost:*/ (glob) searching for changes changeset: 9:d89d4abea5bc user: test @@ -449,7 +449,7 @@ limit to 3 changesets summary: 13 $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ - comparing with http://localhost:.*/ + comparing with http://localhost:*/ (glob) searching for changes changeset: 9:d89d4abea5bc user: test diff --git a/tests/test-mq-qdiff.t b/tests/test-mq-qdiff.t --- a/tests/test-mq-qdiff.t +++ b/tests/test-mq-qdiff.t @@ -20,7 +20,7 @@ qdiff: $ hg qdiff diff -r d20a80d4def3 base --- a/base Thu Jan 01 00:00:00 1970 +0000 - \+\+\+ b/base.* + +++ b/base* (glob) @@ -1,1 +1,1 @@ -base +patched diff --git a/tests/test-pull.t b/tests/test-pull.t --- a/tests/test-pull.t +++ b/tests/test-pull.t @@ -44,12 +44,12 @@ 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo $ hg pull - pulling from http://foo:\*\*\*@localhost:.*/ + pulling from http://foo:\*\*\*@localhost:.*/ (re) searching for changes no changes found $ hg rollback --dry-run --verbose - rolling back to revision -1 \(undo pull: http://foo:\*\*\*@localhost:.*/\) + rolling back to revision -1 \(undo pull: http://foo:\*\*\*@localhost:.*/\) (re) Issue 622: diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -2,7 +2,7 @@ Simple commands: $ echo foo foo - $ echo 'bar\nbaz' | cat + $ printf 'bar\nbaz\n' | cat bar baz @@ -23,7 +23,7 @@ Regular expressions: Globs: - $ echo '* \\foobarbaz {10}' + $ printf '* \\foobarbaz {10}\n' \* \\fo?bar* {10} (glob) Literal match ending in " (re)": diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t --- a/tests/test-subrepo-svn.t +++ b/tests/test-subrepo-svn.t @@ -73,7 +73,7 @@ debugsub $ hg debugsub path s - source file:///.*/svn-repo/src + source file:///*/svn-repo/src (glob) revision 2 change file in svn and hg, commit @@ -82,7 +82,7 @@ change file in svn and hg, commit $ echo alpha >> s/alpha $ hg commit -m 'Message!' committing subrepository s - Sending.*s/alpha + Sending*s/alpha (glob) Transmitting file data . Committed revision 3. @@ -92,7 +92,7 @@ change file in svn and hg, commit At revision 3. $ hg debugsub path s - source file:///.*/svn-repo/src + source file:///*/svn-repo/src (glob) revision 3 $ echo a > s/a @@ -127,7 +127,7 @@ this commit from hg will fail $ hg ci -m 'amend alpha from hg' committing subrepository s abort: svn: Commit failed (details follow): - svn: (Out of date)?.*/src/alpha.*(is out of date)? + svn: (Out of date)?.*/src/alpha.*(is out of date)? (re) [255] $ svn revert -q s/alpha @@ -138,7 +138,7 @@ this commit fails because of meta change $ hg ci -m 'amend alpha from hg' committing subrepository s abort: svn: Commit failed (details follow): - svn: (Out of date)?.*/src/alpha.*(is out of date)? + svn: (Out of date)?.*/src/alpha.*(is out of date)? (re) [255] $ svn revert -q s/alpha @@ -192,7 +192,7 @@ debugsub in clone $ hg debugsub path s - source file:///.*/svn-repo/src + source file:///*/svn-repo/src (glob) revision 3 verify subrepo is contained within the repo directory