annotate tests/test-exchange-obsmarkers-case-D3.t @ 34993:625d5ebce066

templatekw: add verbosity keyword to select template by -q/-v/--debug flag This can be used in conjunction with the ifeq() function.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 21 Oct 2017 17:46:41 +0900
parents b11e8c67fb0f
children 34a46d48d24e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31971
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
1 ============================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
2 Testing obsolescence markers push: Cases D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
3 ============================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
4
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
6 all changesets that requested to be "in sync" after the push (even if they are
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
7 already on both side).
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
8
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
9 This test belongs to a series of tests checking such set is properly computed
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
10 and applied. This does not tests "obsmarkers" discovery capabilities.
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
11
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
12 Category D: Partial Information Case
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
13 TestCase 3: missing prune target (prune not in "pushed set")
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
14
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
15 D.3 missing prune target (prune not in "pushed set")
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
16 ====================================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
17
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
18 .. {{{
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
19 .. A ø⇠✕ A'
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
20 .. | |
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
21 .. | ○ B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
22 .. |/
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
23 .. ● O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
24 .. }}}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
25 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
26 .. Marker exist from:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
27 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
28 .. * `A ø⇠o A'`
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
29 .. * A' (prune)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
30 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
31 .. Command runs:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
32 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
33 .. * hg push
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
34 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
35 .. Expected exclude:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
36 ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
37 .. * `A ø⇠o A'`
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
38 .. * A' (prune)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
39
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
40 Setup
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
41 -----
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
42
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
43 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
44
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
45 initial
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
46
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
47 $ setuprepos D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
48 creating test repo for test case D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
49 - pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
50 - main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
51 - pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
52 cd into `main` and proceed with env setup
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
53 $ cd main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
54 $ mkcommit A0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
55 $ hg up -q 0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
56 $ mkcommit B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
57 created new head
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
58 $ mkcommit A1
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
59 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 31971
diff changeset
60 obsoleted 1 changesets
31971
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
61 $ hg prune -d '0 0' .
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 31971
diff changeset
62 obsoleted 1 changesets
31971
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
63 $ hg strip --hidden -q 'desc(A1)'
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
64 $ hg log -G --hidden
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
65 @ 35b183996678 (draft): B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
66 |
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
67 | x 28b51eb45704 (draft): A0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
68 |/
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
69 o a9bdc8b26820 (public): O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
70
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
71 $ inspect_obsmarkers
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
72 obsstore content
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
73 ================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
74 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
75 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
76 $ cd ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
77 $ cd ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
78
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
79 Actual Test
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
80 -----------
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
81
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
82 $ dotest D.3 O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
83 ## Running testcase D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
84 # testing echange of "O" (a9bdc8b26820)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
85 ## initial state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
86 # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
87 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
88 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
89 # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
90 # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
91 ## pushing "O" from main to pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
92 pushing to pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
93 searching for changes
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
94 no changes found
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
95 ## post push state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
96 # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
97 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
98 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
99 # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
100 # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
101 ## pulling "a9bdc8b26820" from main into pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
102 pulling from main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
103 no changes found
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
104 ## post pull state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
105 # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
106 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
107 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
108 # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
109 # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
110