##// END OF EJS Templates
obsolescence: add test case A-4 for obsolescence markers exchange...
Pierre-Yves David -
r31909:df0f1854 default
parent child Browse files
Show More
@@ -0,0 +1,127 b''
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 $ cd ..
82 $ cd ..
83
84 Actual Test for first version
85 -----------------------------
86
87 $ dotest A.4 B -f
88 ## Running testcase A.4
89 # testing echange of "B" (06055a7959d4)
90 ## initial state
91 # obstore: main
92 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
93 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
94 # obstore: pushdest
95 # obstore: pulldest
96 ## pushing "B" from main to pushdest
97 pushing to pushdest
98 searching for changes
99 remote: adding changesets
100 remote: adding manifests
101 remote: adding file changes
102 remote: added 2 changesets with 2 changes to 2 files
103 remote: 1 new obsolescence markers
104 ## post push state
105 # obstore: main
106 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
107 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
108 # obstore: pushdest
109 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 # obstore: pulldest
111 ## pulling "06055a7959d4" from main into pulldest
112 pulling from main
113 searching for changes
114 adding changesets
115 adding manifests
116 adding file changes
117 added 2 changesets with 2 changes to 2 files
118 1 new obsolescence markers
119 (run 'hg update' to get a working copy)
120 ## post pull 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 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 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