comparison tests/test-exchange-obsmarkers-case-A5.t @ 2268:f2ebe960998b stable

tests: update test to match upstreamable version Name have been clarified, documentation has been updated and some test-case have been updated to match the intended test.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 08 Apr 2017 12:48:20 +0200
parents tests/test-exchange-A5.t@a202f3af890c
children 21f06d932231
comparison
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
1 ============================================
2 Testing obsolescence markers push: Cases A.5
3 ============================================
4
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
6 all changesets that requested to be "in sync" after the push (even if they are
7 already on both side).
8
9 This test belongs to a series of tests checking such set is properly computed
10 and applied. This does not tests "obsmarkers" discovery capabilities.
11
12 Category A: simple cases
13 TestCase 5: partial reordering
14
15 A.5 partial reordering
16 ======================
17
18 ..
19 .. {{{
20 .. B ø⇠⇠
21 .. | ⇡
22 .. A ø⇠⇠⇠○ A'
23 .. | ⇡/
24 .. | ○ B'
25 .. |/
26 .. ● O
27 .. }}}
28 ..
29 .. Marker exist from:
30 ..
31 .. * `Aø⇠○ A'`
32 .. * `Bø⇠○ B'`
33 ..
34 .. Command run:
35 ..
36 .. * hg push -r B
37 ..
38 .. Expected exchange:
39 ..
40 .. * `Bø⇠○ B'`
41 ..
42 .. Expected Exclude:
43 ..
44 .. * `Aø⇠○ A'`
45
46 Setup
47 -----
48
49 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
50
51 initial
52
53 $ setuprepos A.5
54 creating test repo for test case A.5
55 - pulldest
56 - main
57 - pushdest
58 cd into `main` and proceed with env setup
59 $ cd main
60 $ mkcommit A0
61 $ mkcommit B0
62 $ hg update 0
63 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
64 $ mkcommit B1
65 created new head
66 $ mkcommit A1
67 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
68 $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
69 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
70 $ hg log -G --hidden
71 @ 8c0a98c83722 (draft): A1
72 |
73 o f6298a8ac3a4 (draft): B1
74 |
75 | x 6e72f0a95b5e (draft): B0
76 | |
77 | x 28b51eb45704 (draft): A0
78 |/
79 o a9bdc8b26820 (public): O
80
81 $ inspect_obsmarkers
82 obsstore content
83 ================
84 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
85 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
86 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
87 obshashtree
88 ===========
89 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
90 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
91 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
92 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
93 8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21
94 obshashrange
95 ============
96 rev node index size depth obshash
97 4 8c0a98c83722 0 3 3 70185b996296
98 3 f6298a8ac3a4 0 2 2 91716bfd671b
99 4 8c0a98c83722 2 1 3 4d835a45c1e9
100 0 a9bdc8b26820 0 1 1 000000000000
101 3 f6298a8ac3a4 1 1 2 91716bfd671b
102 $ cd ..
103 $ cd ..
104
105 Actual Test
106 -----------
107
108 $ dotest A.5 B1
109 ## Running testcase A.5
110 # testing echange of "B1" (f6298a8ac3a4)
111 ## initial state
112 # obstore: main
113 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
114 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
115 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
116 # obstore: pushdest
117 # obstore: pulldest
118 ## pushing "B1" from main to pushdest
119 pushing to pushdest
120 searching for changes
121 remote: adding changesets
122 remote: adding manifests
123 remote: adding file changes
124 remote: added 1 changesets with 1 changes to 1 files
125 remote: 1 new obsolescence markers
126 ## post push state
127 # obstore: main
128 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
130 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
131 # obstore: pushdest
132 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
133 # obstore: pulldest
134 ## pulling "f6298a8ac3a4" from main into pulldest
135 pulling from main
136 searching for changes
137 adding changesets
138 adding manifests
139 adding file changes
140 added 1 changesets with 1 changes to 1 files
141 1 new obsolescence markers
142 (run 'hg update' to get a working copy)
143 ## post pull state
144 # obstore: main
145 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
146 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 # obstore: pushdest
149 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
150 # obstore: pulldest
151 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}