comparison tests/test-git-export.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 8b51ec98a326
children 0492002560f3
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
97 97
98 $ hg diff --git --root dir1 -r 1:tip dir2 98 $ hg diff --git --root dir1 -r 1:tip dir2
99 warning: dir2 not inside relative root dir1 99 warning: dir2 not inside relative root dir1
100 100
101 $ hg diff --git --root dir1 -r 1:tip 'dir2/{copy}' 101 $ hg diff --git --root dir1 -r 1:tip 'dir2/{copy}'
102 warning: dir2/{copy} not inside relative root dir1 (glob) 102 warning: dir2/{copy} not inside relative root dir1
103 103
104 $ cd dir1 104 $ cd dir1
105 $ hg diff --git --root .. -r 1:tip 105 $ hg diff --git --root .. -r 1:tip
106 diff --git a/dir1/new b/dir1/copy 106 diff --git a/dir1/new b/dir1/copy
107 copy from dir1/new 107 copy from dir1/new
159 +++ b/copy 159 +++ b/copy
160 @@ -1,1 +1,2 @@ 160 @@ -1,1 +1,2 @@
161 new 161 new
162 +copy1 162 +copy1
163 $ hg diff --git --root . -r 1:tip ../dir2 163 $ hg diff --git --root . -r 1:tip ../dir2
164 warning: ../dir2 not inside relative root . (glob) 164 warning: ../dir2 not inside relative root .
165 $ hg diff --git --root . -r 1:tip '../dir2/*' 165 $ hg diff --git --root . -r 1:tip '../dir2/*'
166 warning: ../dir2/* not inside relative root . (glob) 166 warning: ../dir2/* not inside relative root . (glob)
167 $ cd .. 167 $ cd ..
168 168
169 Rename: 169 Rename: