Mercurial > hg
comparison tests/test-push-checkheads-unpushed-D2.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 | 1a09dad8b85a |
comparison
equal
deleted
inserted
replaced
35392:5feb782c7a95 | 35393:4441705b7111 |
---|---|
49 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 49 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
50 $ cd server | 50 $ cd server |
51 $ mkcommit B0 | 51 $ mkcommit B0 |
52 $ cd ../client | 52 $ cd ../client |
53 $ hg pull | 53 $ hg pull |
54 pulling from $TESTTMP/D2/server (glob) | 54 pulling from $TESTTMP/D2/server |
55 searching for changes | 55 searching for changes |
56 adding changesets | 56 adding changesets |
57 adding manifests | 57 adding manifests |
58 adding file changes | 58 adding file changes |
59 added 1 changesets with 1 changes to 1 files | 59 added 1 changesets with 1 changes to 1 files |
85 | 85 |
86 Actual testing | 86 Actual testing |
87 -------------- | 87 -------------- |
88 | 88 |
89 $ hg push --rev 'desc(C0)' | 89 $ hg push --rev 'desc(C0)' |
90 pushing to $TESTTMP/D2/server (glob) | 90 pushing to $TESTTMP/D2/server |
91 searching for changes | 91 searching for changes |
92 abort: push creates new remote head 0f88766e02d6! | 92 abort: push creates new remote head 0f88766e02d6! |
93 (merge or see 'hg help push' for details about pushing new heads) | 93 (merge or see 'hg help push' for details about pushing new heads) |
94 [255] | 94 [255] |
95 | 95 |