Mercurial > hg
comparison tests/test-convert-svn-sink.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 | 75be14993fda |
children | 41ef02ba329b |
comparison
equal
deleted
inserted
replaced
35392:5feb782c7a95 | 35393:4441705b7111 |
---|---|
46 converting... | 46 converting... |
47 1 add a file | 47 1 add a file |
48 0 modify a file | 48 0 modify a file |
49 $ svnupanddisplay a-hg-wc 2 | 49 $ svnupanddisplay a-hg-wc 2 |
50 2 1 test d1 | 50 2 1 test d1 |
51 2 1 test d1/d2 (glob) | 51 2 1 test d1/d2 |
52 2 1 test d1/d2/b (glob) | 52 2 1 test d1/d2/b |
53 2 2 test . | 53 2 2 test . |
54 2 2 test a | 54 2 2 test a |
55 revision: 2 | 55 revision: 2 |
56 author: test | 56 author: test |
57 msg: modify a file | 57 msg: modify a file |
87 sorting... | 87 sorting... |
88 converting... | 88 converting... |
89 0 rename a file | 89 0 rename a file |
90 $ svnupanddisplay a-hg-wc 1 | 90 $ svnupanddisplay a-hg-wc 1 |
91 3 1 test d1 | 91 3 1 test d1 |
92 3 1 test d1/d2 (glob) | 92 3 1 test d1/d2 |
93 3 1 test d1/d2/b (glob) | 93 3 1 test d1/d2/b |
94 3 3 test . | 94 3 3 test . |
95 3 3 test b | 95 3 3 test b |
96 revision: 3 | 96 revision: 3 |
97 author: test | 97 author: test |
98 msg: rename a file | 98 msg: rename a file |
122 sorting... | 122 sorting... |
123 converting... | 123 converting... |
124 0 copy a file | 124 0 copy a file |
125 $ svnupanddisplay a-hg-wc 1 | 125 $ svnupanddisplay a-hg-wc 1 |
126 4 1 test d1 | 126 4 1 test d1 |
127 4 1 test d1/d2 (glob) | 127 4 1 test d1/d2 |
128 4 1 test d1/d2/b (glob) | 128 4 1 test d1/d2/b |
129 4 3 test b | 129 4 3 test b |
130 4 4 test . | 130 4 4 test . |
131 4 4 test c | 131 4 4 test c |
132 revision: 4 | 132 revision: 4 |
133 author: test | 133 author: test |
159 sorting... | 159 sorting... |
160 converting... | 160 converting... |
161 0 remove a file | 161 0 remove a file |
162 $ svnupanddisplay a-hg-wc 1 | 162 $ svnupanddisplay a-hg-wc 1 |
163 5 1 test d1 | 163 5 1 test d1 |
164 5 1 test d1/d2 (glob) | 164 5 1 test d1/d2 |
165 5 1 test d1/d2/b (glob) | 165 5 1 test d1/d2/b |
166 5 4 test c | 166 5 4 test c |
167 5 5 test . | 167 5 5 test . |
168 revision: 5 | 168 revision: 5 |
169 author: test | 169 author: test |
170 msg: remove a file | 170 msg: remove a file |
201 sorting... | 201 sorting... |
202 converting... | 202 converting... |
203 0 make a file executable | 203 0 make a file executable |
204 $ svnupanddisplay a-hg-wc 1 | 204 $ svnupanddisplay a-hg-wc 1 |
205 6 1 test d1 | 205 6 1 test d1 |
206 6 1 test d1/d2 (glob) | 206 6 1 test d1/d2 |
207 6 1 test d1/d2/b (glob) | 207 6 1 test d1/d2/b |
208 6 6 test . | 208 6 6 test . |
209 6 6 test c | 209 6 6 test c |
210 revision: 6 | 210 revision: 6 |
211 author: test | 211 author: test |
212 msg: make a file executable | 212 msg: make a file executable |
254 Make sure our changes don't affect the rest of the test cases | 254 Make sure our changes don't affect the rest of the test cases |
255 | 255 |
256 $ hg --cwd a up 5 | 256 $ hg --cwd a up 5 |
257 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 257 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
258 $ hg --cwd a --config extensions.strip= strip -r 6 | 258 $ hg --cwd a --config extensions.strip= strip -r 6 |
259 saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-ed505e42-backup.hg (glob) | 259 saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-ed505e42-backup.hg |
260 | 260 |
261 #endif | 261 #endif |
262 | 262 |
263 Convert with --full adds and removes files that didn't change | 263 Convert with --full adds and removes files that didn't change |
264 | 264 |
310 converting... | 310 converting... |
311 0 add executable file in new directory | 311 0 add executable file in new directory |
312 $ svnupanddisplay a-hg-wc 1 | 312 $ svnupanddisplay a-hg-wc 1 |
313 1 1 test . | 313 1 1 test . |
314 1 1 test d1 | 314 1 1 test d1 |
315 1 1 test d1/a (glob) | 315 1 1 test d1/a |
316 revision: 1 | 316 revision: 1 |
317 author: test | 317 author: test |
318 msg: add executable file in new directory | 318 msg: add executable file in new directory |
319 A /d1 | 319 A /d1 |
320 A /d1/a | 320 A /d1/a |
335 sorting... | 335 sorting... |
336 converting... | 336 converting... |
337 0 copy file to new directory | 337 0 copy file to new directory |
338 $ svnupanddisplay a-hg-wc 1 | 338 $ svnupanddisplay a-hg-wc 1 |
339 2 1 test d1 | 339 2 1 test d1 |
340 2 1 test d1/a (glob) | 340 2 1 test d1/a |
341 2 2 test . | 341 2 2 test . |
342 2 2 test d2 | 342 2 2 test d2 |
343 2 2 test d2/a (glob) | 343 2 2 test d2/a |
344 revision: 2 | 344 revision: 2 |
345 author: test | 345 author: test |
346 msg: copy file to new directory | 346 msg: copy file to new directory |
347 A /d2 | 347 A /d2 |
348 A /d2/a (from /d1/a@1) | 348 A /d2/a (from /d1/a@1) |