comparison tests/test-exchange-obsmarkers-case-A4.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-A4.t@a202f3af890c
children 21f06d932231
comparison
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
1 ============================================
2 Testing obsolescence markers push: Cases A.4
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 4: Push in the middle of the obsolescence chain
14
15 A.4 Push in the middle of the obsolescence chain
16 ================================================
17
18 .. (Where we show that we should not push the marker without the successors)
19 ..
20 .. {{{
21 .. B ◔
22 .. |
23 .. A⇠ø⇠○ A'
24 .. |/
25 .. ● O
26 .. }}}
27 ..
28 .. Markers exist from:
29 ..
30 .. * `A ø⇠○ A'`
31 .. * chain from A
32 ..
33 .. Command runs:
34 ..
35 .. * hg push -r B
36 ..
37 .. Expected exchange:
38 ..
39 .. * Chain from A
40 ..
41 .. Expected Exclude:
42 ..
43 .. * `Ai ø⇠○ A'`
44
45 Setup
46 -----
47
48 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
49
50 initial
51
52 $ setuprepos A.4
53 creating test repo for test case A.4
54 - pulldest
55 - main
56 - pushdest
57 cd into `main` and proceed with env setup
58 $ cd main
59 $ mkcommit A0
60 $ mkcommit B
61 $ hg update 0
62 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
63 $ mkcommit A1
64 created new head
65 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
66 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
67 $ hg log -G --hidden
68 @ e5ea8f9c7314 (draft): A1
69 |
70 | o 06055a7959d4 (draft): B
71 | |
72 | x 28b51eb45704 (draft): A0
73 |/
74 o a9bdc8b26820 (public): O
75
76 $ inspect_obsmarkers
77 obsstore content
78 ================
79 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
80 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
81 obshashtree
82 ===========
83 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
84 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
85 06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
86 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
87 obshashrange
88 ============
89 rev node index size depth obshash
90 2 06055a7959d4 0 3 3 000000000000
91 1 28b51eb45704 0 2 2 5d69322fad9e
92 3 e5ea8f9c7314 0 2 2 cf518031fa75
93 2 06055a7959d4 2 1 3 000000000000
94 1 28b51eb45704 1 1 2 5d69322fad9e
95 0 a9bdc8b26820 0 1 1 000000000000
96 3 e5ea8f9c7314 1 1 2 cf518031fa75
97 $ cd ..
98 $ cd ..
99
100 Actual Test for first version
101 -----------------------------
102
103 $ dotest A.4 B -f
104 ## Running testcase A.4
105 # testing echange of "B" (06055a7959d4)
106 ## initial state
107 # obstore: main
108 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 # obstore: pushdest
111 # obstore: pulldest
112 ## pushing "B" from main to pushdest
113 pushing to pushdest
114 searching for changes
115 remote: adding changesets
116 remote: adding manifests
117 remote: adding file changes
118 remote: added 2 changesets with 2 changes to 2 files
119 remote: 1 new obsolescence markers
120 ## post push state
121 # obstore: main
122 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
123 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
124 # obstore: pushdest
125 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 # obstore: pulldest
127 ## pulling "06055a7959d4" from main into pulldest
128 pulling from main
129 searching for changes
130 adding changesets
131 adding manifests
132 adding file changes
133 added 2 changesets with 2 changes to 2 files
134 1 new obsolescence markers
135 (run 'hg update' to get a working copy)
136 ## post pull state
137 # obstore: main
138 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
139 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
140 # obstore: pushdest
141 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
142 # obstore: pulldest
143 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}