##// END OF EJS Templates
obsolescence: add test case C-4 for obsolescence markers exchange...
Pierre-Yves David -
r31968:02c696bb default
parent child Browse files
Show More
@@ -0,0 +1,129 b''
1 ============================================
2 Testing obsolescence markers push: Cases C.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 C: advanced case
13 TestCase 4: multiple successors, one is pruned
14
15 C.4 multiple successors, one is pruned
16 ======================================
17
18 .. (A similarish situation can appends with split markers see the Z section)
19 ..
20 .. {{{
21 .. A
22 .. B β—‹β‡’ΓΈβ‡ βŠ— C
23 .. \|/
24 .. ● O
25 .. }}}
26 ..
27 .. Marker exist from:
28 ..
29 .. * `A ΓΈβ‡ β—‹ B`
30 .. * `A ΓΈβ‡ β—‹ C`
31 .. * C (prune)
32 ..
33 .. Command run:
34 ..
35 .. * hg push -r O
36 ..
37 .. Expected exchange:
38 ..
39 .. * `A ΓΈβ‡ β—‹ C`
40 .. * C (prune)
41 ..
42 .. Expected exclude:
43 ..
44 .. * `A ΓΈβ‡ β—‹ B`
45
46 Setup
47 -----
48
49 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
50
51 Implemented as the non-split version
52
53 $ setuprepos C.4
54 creating test repo for test case C.4
55 - pulldest
56 - main
57 - pushdest
58 cd into `main` and proceed with env setup
59 $ cd main
60 $ mkcommit A
61 $ hg update -q 0
62 $ mkcommit B
63 created new head
64 $ hg update -q 0
65 $ mkcommit C
66 created new head
67 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
68 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
69 $ hg prune -qd '0 0' .
70 $ hg log -G --hidden
71 x 7f7f229b13a6 (draft): C
72 |
73 | o 35b183996678 (draft): B
74 |/
75 | x f5bc6836db60 (draft): A
76 |/
77 @ a9bdc8b26820 (public): O
78
79 $ inspect_obsmarkers
80 obsstore content
81 ================
82 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
83 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
84 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
85 $ cd ..
86 $ cd ..
87
88 Actual Test
89 -----------
90
91 $ dotest C.4 O
92 ## Running testcase C.4
93 # testing echange of "O" (a9bdc8b26820)
94 ## initial state
95 # obstore: main
96 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
97 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
98 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
99 # obstore: pushdest
100 # obstore: pulldest
101 ## pushing "O" from main to pushdest
102 pushing to pushdest
103 searching for changes
104 no changes found
105 remote: 2 new obsolescence markers
106 ## post push state
107 # obstore: main
108 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
111 # obstore: pushdest
112 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
113 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
114 # obstore: pulldest
115 ## pulling "a9bdc8b26820" from main into pulldest
116 pulling from main
117 no changes found
118 2 new obsolescence markers
119 ## post pull state
120 # obstore: main
121 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
122 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
123 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
124 # obstore: pushdest
125 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
127 # obstore: pulldest
128 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
General Comments 0
You need to be logged in to leave comments. Login now