Debian Codegraph @

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

raw
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 1 new obsolescence markers
67 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
68 1 new obsolescence markers
69 obsoleted 1 changesets
70 1 new orphan changesets
71 $ hg log -G --hidden
72 @ e5ea8f9c7314 (draft): A1
73 |
74 | * 06055a7959d4 (draft): B
75 | |
76 | x 28b51eb45704 (draft): A0
77 |/
78 o a9bdc8b26820 (public): O
79
80 $ inspect_obsmarkers
81 obsstore content
82 ================
83 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
84 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
85 $ cd ..
86 $ cd ..
87
88 Actual Test for first version
89 -----------------------------
90
91 $ dotest A.4 B -f
92 ## Running testcase A.4
93 # testing echange of "B" (06055a7959d4)
94 ## initial state
95 # obstore: main
96 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
97 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
98 # obstore: pushdest
99 # obstore: pulldest
100 ## pushing "B" from main to pushdest
101 pushing to pushdest
102 searching for changes
103 remote: adding changesets
104 remote: adding manifests
105 remote: adding file changes
106 remote: added 2 changesets with 2 changes to 2 files
107 remote: 1 new obsolescence markers
108 ## post push state
109 # obstore: main
110 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
112 # obstore: pushdest
113 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
114 # obstore: pulldest
115 ## pulling "06055a7959d4" from main into pulldest
116 pulling from main
117 searching for changes
118 adding changesets
119 adding manifests
120 adding file changes
121 added 2 changesets with 2 changes to 2 files
122 1 new obsolescence markers
123 new changesets 28b51eb45704:06055a7959d4 (2 drafts)
124 (run 'hg update' to get a working copy)
125 ## post pull state
126 # obstore: main
127 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
128 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 # obstore: pushdest
130 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
131 # obstore: pulldest
132 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}