Mercurial > hg
annotate tests/test-push-checkheads-pruned-B4.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 |
rev | line source |
---|---|
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 ==================================== |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 Testing head checking code: Case B-4 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 ==================================== |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 into play to detect if existing branches on the server are being replaced by |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
7 some of the new one we push. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
9 This case is part of a series of tests checking this behavior. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
11 Category B: simple case involving pruned changesets |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 TestCase 4: multi-changeset branch, all are pruned |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 .. old-state: |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 .. * 2 changeset branch |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 .. new-state: |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 .. * old branch is pruned |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 .. expected-result: |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 .. * push allowed |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 .. graph-summary: |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 .. |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 .. B ⊗ |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 .. | |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 .. A ⊗ |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 .. | |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
32 .. | ◔ C |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
33 .. |/ |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
34 .. ● |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
35 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 $ . $TESTDIR/testlib/push-checkheads-util.sh |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
37 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
38 Test setup |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
39 ---------- |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
40 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 $ mkdir B4 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 $ cd B4 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 $ setuprepos |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 creating basic server and client repo |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 updating to branch default |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 $ cd server |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 $ mkcommit B0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
49 $ cd ../client |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 $ hg pull |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
51 pulling from $TESTTMP/B4/server |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 searching for changes |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 adding changesets |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
54 adding manifests |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
55 adding file changes |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
33542
diff
changeset
|
57 new changesets d73caddc5533 |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
58 (run 'hg update' to get a working copy) |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 $ hg up 0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 $ mkcommit C0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
62 created new head |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
63 $ hg debugobsolete --record-parents `getid "desc(A0)"` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33252
diff
changeset
|
64 obsoleted 1 changesets |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
65 $ hg debugobsolete --record-parents `getid "desc(B0)"` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33252
diff
changeset
|
66 obsoleted 1 changesets |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 $ hg log -G --hidden |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 @ 0f88766e02d6 (draft): C0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
69 | |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 | x d73caddc5533 (draft): B0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
71 | | |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
72 | x 8aaa48160adc (draft): A0 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
73 |/ |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 o 1e4be0697311 (public): root |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
75 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
76 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 Actual testing |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
78 -------------- |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
79 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
80 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
81 pushing to $TESTTMP/B4/server |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
82 searching for changes |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
83 adding changesets |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
84 adding manifests |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
85 adding file changes |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
86 added 1 changesets with 1 changes to 1 files (+1 heads) |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
87 2 new obsolescence markers |
33252
53b3a1968aa6
obsolete: reports the number of local changeset obsoleted when unbundling
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
32011
diff
changeset
|
88 obsoleted 2 changesets |
32011
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
89 |
698623950bf5
obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
90 $ cd ../.. |