Show More
@@ -1,6 +1,8 b'' | |||||
1 | # common patterns in test at can safely be replaced |
|
1 | # common patterns in test at can safely be replaced | |
2 | from __future__ import absolute_import |
|
2 | from __future__ import absolute_import | |
3 |
|
3 | |||
|
4 | import os | |||
|
5 | ||||
4 | substitutions = [ |
|
6 | substitutions = [ | |
5 | # list of possible compressions |
|
7 | # list of possible compressions | |
6 | (br'(zstd,)?zlib,none,bzip2', |
|
8 | (br'(zstd,)?zlib,none,bzip2', | |
@@ -83,3 +85,48 b' substitutions = [' | |||||
83 |
|
85 | |||
84 | for replace, msgs in _errors.items(): |
|
86 | for replace, msgs in _errors.items(): | |
85 | substitutions.extend((m, replace) for m in msgs) |
|
87 | substitutions.extend((m, replace) for m in msgs) | |
|
88 | ||||
|
89 | # Output lines on Windows that can be autocorrected for '\' vs '/' path | |||
|
90 | # differences. | |||
|
91 | _winpathfixes = [ | |||
|
92 | # cloning subrepo s\ss from $TESTTMP/t/s/ss | |||
|
93 | # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar | |||
|
94 | br'(?m)^cloning subrepo \S+\\.*', | |||
|
95 | ||||
|
96 | # pulling from $TESTTMP\issue1852a | |||
|
97 | br'(?m)^pulling from \$TESTTMP\\.*', | |||
|
98 | ||||
|
99 | # pushing to $TESTTMP\a | |||
|
100 | br'(?m)^pushing to \$TESTTMP\\.*', | |||
|
101 | ||||
|
102 | # pushing subrepo s\ss to $TESTTMP/t/s/ss | |||
|
103 | br'(?m)^pushing subrepo \S+\\\S+ to.*', | |||
|
104 | ||||
|
105 | # moving d1\d11\a1 to d3/d11/a1 | |||
|
106 | br'(?m)^moving \S+\\.*', | |||
|
107 | ||||
|
108 | # d1\a: not recording move - dummy does not exist | |||
|
109 | br'\S+\\\S+: not recording move .+', | |||
|
110 | ||||
|
111 | # reverting s\a | |||
|
112 | br'(?m)^reverting (?!subrepo ).*\\.*', | |||
|
113 | ||||
|
114 | # saved backup bundle to | |||
|
115 | # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg | |||
|
116 | br'(?m)^saved backup bundle to \$TESTTMP.*\.hg', | |||
|
117 | ||||
|
118 | # no changes made to subrepo s\ss since last push to ../tcc/s/ss | |||
|
119 | br'(?m)^no changes made to subrepo \S+\\\S+ since.*', | |||
|
120 | ||||
|
121 | # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing | |||
|
122 | # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38 | |||
|
123 | br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*', | |||
|
124 | ||||
|
125 | # stuff/maybelarge.dat: largefile 76..38 not available from | |||
|
126 | # file:/*/$TESTTMP\largefiles-repo (glob) | |||
|
127 | br'.*: largefile \S+ not available from file:/\*/.+', | |||
|
128 | ] | |||
|
129 | ||||
|
130 | if os.name == 'nt': | |||
|
131 | substitutions.extend([(s, lambda match: match.group().replace(b'\\', b'/')) | |||
|
132 | for s in _winpathfixes]) |
@@ -972,8 +972,6 b' class Test(unittest.TestCase):' | |||||
972 | self._portmap(0), |
|
972 | self._portmap(0), | |
973 | self._portmap(1), |
|
973 | self._portmap(1), | |
974 | self._portmap(2), |
|
974 | self._portmap(2), | |
975 | (br'(?m)^(saved backup bundle to .*\.hg)( \(glob\))?$', |
|
|||
976 | br'\1'.replace(br'\\', br'/')), |
|
|||
977 | (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'), |
|
975 | (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'), | |
978 | (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'), |
|
976 | (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'), | |
979 | ] |
|
977 | ] |
General Comments 0
You need to be logged in to leave comments.
Login now