comparison tests/test-nested-repo.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 4cdec37f0018
children
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
12 $ hg st 12 $ hg st
13 13
14 Should fail: 14 Should fail:
15 15
16 $ hg st b/x 16 $ hg st b/x
17 abort: path 'b/x' is inside nested repo 'b' (glob) 17 abort: path 'b/x' is inside nested repo 'b'
18 [255] 18 [255]
19 $ hg add b/x 19 $ hg add b/x
20 abort: path 'b/x' is inside nested repo 'b' (glob) 20 abort: path 'b/x' is inside nested repo 'b'
21 [255] 21 [255]
22 22
23 Should fail: 23 Should fail:
24 24
25 $ hg add b b/x 25 $ hg add b b/x
26 abort: path 'b/x' is inside nested repo 'b' (glob) 26 abort: path 'b/x' is inside nested repo 'b'
27 [255] 27 [255]
28 $ hg st 28 $ hg st
29 29
30 Should arguably print nothing: 30 Should arguably print nothing:
31 31
35 $ hg ci -Ama a 35 $ hg ci -Ama a
36 36
37 Should fail: 37 Should fail:
38 38
39 $ hg mv a b 39 $ hg mv a b
40 abort: path 'b/a' is inside nested repo 'b' (glob) 40 abort: path 'b/a' is inside nested repo 'b'
41 [255] 41 [255]
42 $ hg st 42 $ hg st
43 43
44 $ cd .. 44 $ cd ..