comparison tests/test-default-push.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 b3100653bafd
children 2a258985ffeb
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
25 $ cd .. 25 $ cd ..
26 26
27 Push should push to 'default' when 'default-push' not set: 27 Push should push to 'default' when 'default-push' not set:
28 28
29 $ hg --cwd b push 29 $ hg --cwd b push
30 pushing to $TESTTMP/a (glob) 30 pushing to $TESTTMP/a
31 searching for changes 31 searching for changes
32 adding changesets 32 adding changesets
33 adding manifests 33 adding manifests
34 adding file changes 34 adding file changes
35 added 1 changesets with 1 changes to 1 files 35 added 1 changesets with 1 changes to 1 files
37 Push should push to 'default-push' when set: 37 Push should push to 'default-push' when set:
38 38
39 $ echo '[paths]' >> b/.hg/hgrc 39 $ echo '[paths]' >> b/.hg/hgrc
40 $ echo 'default-push = ../c' >> b/.hg/hgrc 40 $ echo 'default-push = ../c' >> b/.hg/hgrc
41 $ hg --cwd b push 41 $ hg --cwd b push
42 pushing to $TESTTMP/c (glob) 42 pushing to $TESTTMP/c
43 searching for changes 43 searching for changes
44 adding changesets 44 adding changesets
45 adding manifests 45 adding manifests
46 adding file changes 46 adding file changes
47 added 1 changesets with 1 changes to 1 files 47 added 1 changesets with 1 changes to 1 files
48 48
49 But push should push to 'default' if explicitly specified (issue5000): 49 But push should push to 'default' if explicitly specified (issue5000):
50 50
51 $ hg --cwd b push default 51 $ hg --cwd b push default
52 pushing to $TESTTMP/a (glob) 52 pushing to $TESTTMP/a
53 searching for changes 53 searching for changes
54 no changes found 54 no changes found
55 [1] 55 [1]
56 56
57 Push should push to 'default-push' when 'default' is not set 57 Push should push to 'default-push' when 'default' is not set
61 $ rm .hg/hgrc 61 $ rm .hg/hgrc
62 62
63 $ touch foo 63 $ touch foo
64 $ hg -q commit -A -m 'add foo' 64 $ hg -q commit -A -m 'add foo'
65 $ hg --config paths.default-push=../a push 65 $ hg --config paths.default-push=../a push
66 pushing to $TESTTMP/a (glob) 66 pushing to $TESTTMP/a
67 searching for changes 67 searching for changes
68 adding changesets 68 adding changesets
69 adding manifests 69 adding manifests
70 adding file changes 70 adding file changes
71 added 1 changesets with 1 changes to 1 files 71 added 1 changesets with 1 changes to 1 files