comparison tests/test-subrepo-relative-path.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 eb586ed5d8ce
children 0c14b3f23294
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
3 Preparing the subrepository 'sub' 3 Preparing the subrepository 'sub'
4 4
5 $ hg init sub 5 $ hg init sub
6 $ echo sub > sub/sub 6 $ echo sub > sub/sub
7 $ hg add -R sub 7 $ hg add -R sub
8 adding sub/sub (glob) 8 adding sub/sub
9 $ hg commit -R sub -m "sub import" 9 $ hg commit -R sub -m "sub import"
10 10
11 Preparing the 'main' repo which depends on the subrepo 'sub' 11 Preparing the 'main' repo which depends on the subrepo 'sub'
12 12
13 $ hg init main 13 $ hg init main
15 $ echo "sub = ../sub" > main/.hgsub 15 $ echo "sub = ../sub" > main/.hgsub
16 $ hg clone sub main/sub 16 $ hg clone sub main/sub
17 updating to branch default 17 updating to branch default
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 $ hg add -R main 19 $ hg add -R main
20 adding main/.hgsub (glob) 20 adding main/.hgsub
21 adding main/main (glob) 21 adding main/main
22 $ hg commit -R main -m "main import" 22 $ hg commit -R main -m "main import"
23 23
24 Cleaning both repositories, just as a clone -U 24 Cleaning both repositories, just as a clone -U
25 25
26 $ hg up -C -R sub null 26 $ hg up -C -R sub null