Mercurial > public > mercurial-scm > hg
annotate tests/common-pattern.py @ 35792:1d118f9f4f57
bundle2: always advertise client support for stream parts
Previously, enabling of stream clone over bundle2 was a server-side
only change. And clients would only advertise bundle2 support for
stream clones if an experimental config option was set.
This situation wasn't forward compatible because in the future
(when the feature is enabled on servers by default), an old client
would send a request to the server but it wouldn't send its own
bundle2 capability support for stream parts. Servers would have to
infer that clients not sending this capability were old Mercurial
clients that only sent the capability if the feature was
explicitly enabled. Implicit and inferred behavior makes implementing
servers hard. It's much better to be explicit about client features.
We should either make the config option for bundle2 stream clones
disable the feature client-side as well (so a server doesn't see
a request from a client not advertising stream support). Or we
should always advertise stream support if a client is willing
to accept stream parts.
Since I anticipating stabilizing stream clone support in bundle2
quickly, I think it's safe to always advertise client support
in the bundle2 capabilities. So this commit changes things to
do that.
Because capabilities now vary between client and server, we had
to create variations of the variable substitutions for those
strings.
Differential Revision: https://phab.mercurial-scm.org/D1931
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 22 Jan 2018 12:23:47 -0800 |
parents | 24528dba0e64 |
children | ab239e3de23b |
rev | line source |
---|---|
35070
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
1 # common patterns in test at can safely be replaced |
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
2 from __future__ import absolute_import |
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
3 |
35449
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
4 import os |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
5 |
35070
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
6 substitutions = [ |
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
7 # list of possible compressions |
35234
f0445eea9b93
test: fix common-pattern for pure variant
Boris Feld <boris.feld@octobus.net>
parents:
35233
diff
changeset
|
8 (br'(zstd,)?zlib,none,bzip2', |
35070
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
9 br'$USUAL_COMPRESSIONS$' |
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
10 ), |
35071
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
11 # capabilities sent through http |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
12 (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A' |
35259
ad5f2b923b0d
push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35234
diff
changeset
|
13 br'bookmarks%250A' |
35071
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
14 br'changegroup%253D01%252C02%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
15 br'digests%253Dmd5%252Csha1%252Csha512%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
16 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
17 br'hgtagsfnodes%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
18 br'listkeys%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
19 br'phases%253Dheads%250A' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
20 br'pushkey%250A' |
35792
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
21 br'remote-changegroup%253Dhttp%252Chttps%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
22 br'stream%253Dv2', |
35071
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
23 # (the replacement patterns) |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
24 br'$USUAL_BUNDLE_CAPS$' |
b4767ae63b32
test-pattern: register current the bundlecaps string
Boris Feld <boris.feld@octobus.net>
parents:
35070
diff
changeset
|
25 ), |
35792
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
26 (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
27 br'bookmarks%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
28 br'changegroup%253D01%252C02%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
29 br'digests%253Dmd5%252Csha1%252Csha512%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
30 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
31 br'hgtagsfnodes%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
32 br'listkeys%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
33 br'phases%253Dheads%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
34 br'pushkey%250A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
35 br'remote-changegroup%253Dhttp%252Chttps', |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
36 # (the replacement patterns) |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
37 br'$USUAL_BUNDLE_CAPS_SERVER$' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
38 ), |
35072
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
39 # bundle2 capabilities sent through ssh |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
40 (br'bundle2=HG20%0A' |
35259
ad5f2b923b0d
push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35234
diff
changeset
|
41 br'bookmarks%0A' |
35072
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
42 br'changegroup%3D01%2C02%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
43 br'digests%3Dmd5%2Csha1%2Csha512%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
44 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
45 br'hgtagsfnodes%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
46 br'listkeys%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
47 br'phases%3Dheads%0A' |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
48 br'pushkey%0A' |
35792
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
49 br'remote-changegroup%3Dhttp%2Chttps%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
50 br'stream%3Dv2', |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
51 # (replacement patterns) |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
52 br'$USUAL_BUNDLE2_CAPS$' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
53 ), |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
54 # bundle2 capabilities advertised by the server |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
55 (br'bundle2=HG20%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
56 br'bookmarks%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
57 br'changegroup%3D01%2C02%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
58 br'digests%3Dmd5%2Csha1%2Csha512%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
59 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
60 br'hgtagsfnodes%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
61 br'listkeys%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
62 br'phases%3Dheads%0A' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
63 br'pushkey%0A' |
35072
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
64 br'remote-changegroup%3Dhttp%2Chttps', |
c4ec72a10798
test-pattern: register the current the bundle2 capabilities string
Boris Feld <boris.feld@octobus.net>
parents:
35071
diff
changeset
|
65 # (replacement patterns) |
35792
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
66 br'$USUAL_BUNDLE2_CAPS_SERVER$' |
1d118f9f4f57
bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35449
diff
changeset
|
67 ), |
35073
7f0c9e28a816
test-pattern: substitute the HTTP log timestamp too
Boris Feld <boris.feld@octobus.net>
parents:
35072
diff
changeset
|
68 # HTTP log dates |
7f0c9e28a816
test-pattern: substitute the HTTP log timestamp too
Boris Feld <boris.feld@octobus.net>
parents:
35072
diff
changeset
|
69 (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "GET', |
7f0c9e28a816
test-pattern: substitute the HTTP log timestamp too
Boris Feld <boris.feld@octobus.net>
parents:
35072
diff
changeset
|
70 br' - - [$LOGDATE$] "GET' |
7f0c9e28a816
test-pattern: substitute the HTTP log timestamp too
Boris Feld <boris.feld@octobus.net>
parents:
35072
diff
changeset
|
71 ), |
35446
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
72 # Windows has an extra '/' in the following lines that get globbed away: |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
73 # pushing to file:/*/$TESTTMP/r2 (glob) |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
74 # comparing with file:/*/$TESTTMP/r2 (glob) |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
75 # sub/maybelarge.dat: largefile 34..9c not available from |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
76 # file:/*/$TESTTMP/largefiles-repo (glob) |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
77 (br'(.*file:/)/?(/\$TESTTMP.*)', |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
78 lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)' |
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35259
diff
changeset
|
79 ), |
35070
3abdd7da33bd
test-pattern: substitute common compression list
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
80 ] |
35230
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
81 |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
82 # Various platform error strings, keyed on a common replacement string |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
83 _errors = { |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
84 br'$ENOENT$': ( |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
85 # strerror() |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
86 br'No such file or directory', |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
87 |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
88 # FormatMessage(ERROR_FILE_NOT_FOUND) |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
89 br'The system cannot find the file specified', |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
90 ), |
35231
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
91 br'$ENOTDIR$': ( |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
92 # strerror() |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
93 br'Not a directory', |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
94 |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
95 # FormatMessage(ERROR_PATH_NOT_FOUND) |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
96 br'The system cannot find the path specified', |
b33d4cf38666
tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
97 ), |
35232
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
98 br'$ECONNRESET$': ( |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
99 # strerror() |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
100 br'Connection reset by peer', |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
101 |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
102 # FormatMessage(WSAECONNRESET) |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
103 br'An existing connection was forcibly closed by the remote host', |
a037b6647d8c
tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35231
diff
changeset
|
104 ), |
35233
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
105 br'$EADDRINUSE$': ( |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
106 # strerror() |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
107 br'Address already in use', |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
108 |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
109 # FormatMessage(WSAEADDRINUSE) |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
110 br'Only one usage of each socket address' |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
111 br' \(protocol/network address/port\) is normally permitted', |
1b22d325089c
tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35232
diff
changeset
|
112 ), |
35230
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
113 } |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
114 |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
115 for replace, msgs in _errors.items(): |
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
35073
diff
changeset
|
116 substitutions.extend((m, replace) for m in msgs) |
35449
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
117 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
118 # Output lines on Windows that can be autocorrected for '\' vs '/' path |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
119 # differences. |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
120 _winpathfixes = [ |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
121 # cloning subrepo s\ss from $TESTTMP/t/s/ss |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
122 # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
123 br'(?m)^cloning subrepo \S+\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
124 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
125 # pulling from $TESTTMP\issue1852a |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
126 br'(?m)^pulling from \$TESTTMP\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
127 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
128 # pushing to $TESTTMP\a |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
129 br'(?m)^pushing to \$TESTTMP\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
130 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
131 # pushing subrepo s\ss to $TESTTMP/t/s/ss |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
132 br'(?m)^pushing subrepo \S+\\\S+ to.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
133 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
134 # moving d1\d11\a1 to d3/d11/a1 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
135 br'(?m)^moving \S+\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
136 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
137 # d1\a: not recording move - dummy does not exist |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
138 br'\S+\\\S+: not recording move .+', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
139 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
140 # reverting s\a |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
141 br'(?m)^reverting (?!subrepo ).*\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
142 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
143 # saved backup bundle to |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
144 # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
145 br'(?m)^saved backup bundle to \$TESTTMP.*\.hg', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
146 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
147 # no changes made to subrepo s\ss since last push to ../tcc/s/ss |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
148 br'(?m)^no changes made to subrepo \S+\\\S+ since.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
149 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
150 # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
151 # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
152 br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
153 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
154 # stuff/maybelarge.dat: largefile 76..38 not available from |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
155 # file:/*/$TESTTMP\largefiles-repo (glob) |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
156 br'.*: largefile \S+ not available from file:/\*/.+', |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
157 ] |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
158 |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
159 if os.name == 'nt': |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
160 substitutions.extend([(s, lambda match: match.group().replace(b'\\', b'/')) |
24528dba0e64
run-tests: add substitution patterns for common '\' path output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35446
diff
changeset
|
161 for s in _winpathfixes]) |