Debian Codegraph @

tests/test-exchange-obsmarkers-case-D3.t

raw
1 ============================================
2 Testing obsolescence markers push: Cases D.3
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 D: Partial Information Case
13 TestCase 3: missing prune target (prune not in "pushed set")
14
15 D.3 missing prune target (prune not in "pushed set")
16 ====================================================
17
18 .. {{{
19 .. A ø⇠✕ A'
20 .. | |
21 .. | ○ B
22 .. |/
23 .. ● O
24 .. }}}
25 ..
26 .. Marker exist from:
27 ..
28 .. * `A ø⇠o A'`
29 .. * A' (prune)
30 ..
31 .. Command runs:
32 ..
33 .. * hg push
34 ..
35 .. Expected exclude:
36 ..
37 .. * `A ø⇠o A'`
38 .. * A' (prune)
39
40 Setup
41 -----
42
43 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
44
45 initial
46
47 $ setuprepos D.3
48 creating test repo for test case D.3
49 - pulldest
50 - main
51 - pushdest
52 cd into `main` and proceed with env setup
53 $ cd main
54 $ mkcommit A0
55 $ hg up -q 0
56 $ mkcommit B
57 created new head
58 $ mkcommit A1
59 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
60 1 new obsolescence markers
61 obsoleted 1 changesets
62 $ hg prune -d '0 0' .
63 1 new obsolescence markers
64 obsoleted 1 changesets
65 $ hg strip --hidden -q 'desc(A1)'
66 $ hg log -G --hidden
67 @ 35b183996678 (draft): B
68 |
69 | x 28b51eb45704 (draft): A0
70 |/
71 o a9bdc8b26820 (public): O
72
73 $ inspect_obsmarkers
74 obsstore content
75 ================
76 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
77 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
78 $ cd ..
79 $ cd ..
80
81 Actual Test
82 -----------
83
84 $ dotest D.3 O
85 ## Running testcase D.3
86 # testing echange of "O" (a9bdc8b26820)
87 ## initial state
88 # obstore: main
89 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
90 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
91 # obstore: pushdest
92 # obstore: pulldest
93 ## pushing "O" from main to pushdest
94 pushing to pushdest
95 searching for changes
96 no changes found
97 ## post push state
98 # obstore: main
99 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
100 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
101 # obstore: pushdest
102 # obstore: pulldest
103 ## pulling "a9bdc8b26820" from main into pulldest
104 pulling from main
105 no changes found
106 ## post pull state
107 # obstore: main
108 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 # obstore: pushdest
111 # obstore: pulldest
112