annotate tests/test-exchange-obsmarkers-case-D3.t @ 3440:42b3ac0a5b05 mercurial-4.3

test-compat: merge stable into mercurial-4.3
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 20 Jan 2018 12:38:09 +0100
parents 21f06d932231
children 2280461343e5 d166b3dc5e8a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
1 ============================================
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
2 Testing obsolescence markers push: Cases D.3
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
3 ============================================
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
6 all changesets that requested to be "in sync" after the push (even if they are
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
7 already on both side).
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
9 This test belongs to a series of tests checking such set is properly computed
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
10 and applied. This does not tests "obsmarkers" discovery capabilities.
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
12 Category D: Partial Information Case
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
13 TestCase 3: missing prune target (prune not in "pushed set")
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
15 D.3 missing prune target (prune not in "pushed set")
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
16 ====================================================
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
18 .. {{{
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
19 .. A ø⇠✕ A'
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
20 .. | |
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
21 .. | ○ B
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
22 .. |/
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
23 .. ● O
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
24 .. }}}
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
25 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
26 .. Marker exist from:
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
27 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
28 .. * `A ø⇠o A'`
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
29 .. * A' (prune)
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
30 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
31 .. Command runs:
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
32 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
33 .. * hg push
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
34 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
35 .. Expected exclude:
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
36 ..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
37 .. * `A ø⇠o A'`
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
38 .. * A' (prune)
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
40 Setup
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
41 -----
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
43 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
45 initial
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46
2266
fe4ca27ed700 tests: fix directory names in exchange-D3 test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
47 $ setuprepos D.3
fe4ca27ed700 tests: fix directory names in exchange-D3 test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
48 creating test repo for test case D.3
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 - pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 - main
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 - pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 cd into `main` and proceed with env setup
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 $ cd main
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ mkcommit A0
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ hg up -q 0
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 $ mkcommit B
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 created new head
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 $ mkcommit A1
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
2754
21f06d932231 test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2580
diff changeset
60 obsoleted 1 changesets
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 $ hg prune -d '0 0' .
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 working directory now at 35b183996678
1239
8a06b32061ce evolve: apply prune update before creating obsolescence markers
Laurent Charignon <lcharignon@fb.com>
parents: 1093
diff changeset
64 1 changesets pruned
2562
279ec10273b8 test-exchange-case-D3: avoid stripping obsolescence marker
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2268
diff changeset
65 $ hg strip --hidden -q 'desc(A1)' --config devel.strip-obsmarkers=no
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 $ hg log -G --hidden
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 @ 35b183996678 (draft): B
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 |
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 | x 28b51eb45704 (draft): A0
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 |/
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 o a9bdc8b26820 (public): O
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
73 $ inspect_obsmarkers
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
74 obsstore content
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
75 ================
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
76 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (*) {'user': 'test'} (glob)
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
77 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (*) {'ef1': '*', 'user': 'test'} (glob)
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
78 obshashtree
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
79 ===========
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
80 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
81 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
82 35b1839966785d5703a01607229eea932db42f87 43ff2c20d850ad18dee0f7f252c98c1f1a0cfd5c
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
83 obshashrange
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
84 ============
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
85 rev node index size depth obshash
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
86 2 35b183996678 0 2 2 43ff2c20d850
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
87 2 35b183996678 1 1 2 43ff2c20d850
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
88 0 a9bdc8b26820 0 1 1 000000000000
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 $ cd ..
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 $ cd ..
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 Actual Test
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2266
diff changeset
93 -----------
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94
2266
fe4ca27ed700 tests: fix directory names in exchange-D3 test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
95 $ dotest D.3 O
fe4ca27ed700 tests: fix directory names in exchange-D3 test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
96 ## Running testcase D.3
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 # testing echange of "O" (a9bdc8b26820)
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 ## initial state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
100 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (*) {'user': 'test'} (glob)
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
101 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (*) {'ef1': '*', 'user': 'test'} (glob)
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 ## pushing "O" from main to pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 pushing to pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
107 no changes found
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 ## post push state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
110 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (*) {'user': 'test'} (glob)
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
111 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (*) {'ef1': '*', 'user': 'test'} (glob)
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 ## pulling "a9bdc8b26820" from main into pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 pulling from main
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
116 no changes found
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 ## post pull state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
119 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (*) {'user': 'test'} (glob)
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2562
diff changeset
120 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (*) {'ef1': '*', 'user': 'test'} (glob)
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
121 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123