|
1 ============================================ |
|
2 Testing obsolescence markers push: Cases A.2 |
|
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 2: Two heads, only one of them pushed |
|
14 |
|
15 A.2 Two heads, only on of then pushed |
|
16 ===================================== |
|
17 |
|
18 .. {{{ |
|
19 .. ⇠○ B |
|
20 .. ⇠◔ | A |
|
21 .. |/ |
|
22 .. ● O |
|
23 .. }}} |
|
24 .. |
|
25 .. Markers exist from: |
|
26 .. |
|
27 .. * A |
|
28 .. * B |
|
29 .. |
|
30 .. |
|
31 .. Command runs: |
|
32 .. |
|
33 .. * hg push -r A |
|
34 .. |
|
35 .. Expected exchange: |
|
36 .. |
|
37 .. * chain from A |
|
38 .. |
|
39 .. Expected Exclude: |
|
40 .. |
|
41 .. * chain from B |
|
42 |
|
43 Setup |
|
44 ----- |
|
45 |
|
46 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh |
|
47 |
|
48 initial |
|
49 |
|
50 $ setuprepos A.2 |
|
51 creating test repo for test case A.2 |
|
52 - pulldest |
|
53 - main |
|
54 - pushdest |
|
55 cd into `main` and proceed with env setup |
|
56 $ cd main |
|
57 $ mkcommit A |
|
58 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` |
|
59 $ hg up '.~1' |
|
60 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
61 $ mkcommit B |
|
62 created new head |
|
63 $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'` |
|
64 $ hg log -G |
|
65 @ 35b183996678 (draft): B |
|
66 | |
|
67 | o f5bc6836db60 (draft): A |
|
68 |/ |
|
69 o a9bdc8b26820 (public): O |
|
70 |
|
71 $ inspect_obsmarkers |
|
72 obsstore content |
|
73 ================ |
|
74 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
75 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
76 obshashtree |
|
77 =========== |
|
78 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 |
|
79 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 |
|
80 35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245 |
|
81 obshashrange |
|
82 ============ |
|
83 rev node index size depth obshash |
|
84 2 35b183996678 0 2 2 b9c8f20eef89 |
|
85 1 f5bc6836db60 0 2 2 50656e04a95e |
|
86 2 35b183996678 1 1 2 b9c8f20eef89 |
|
87 0 a9bdc8b26820 0 1 1 000000000000 |
|
88 1 f5bc6836db60 1 1 2 50656e04a95e |
|
89 $ cd .. |
|
90 $ cd .. |
|
91 |
|
92 Actual Test |
|
93 ----------- |
|
94 |
|
95 $ dotest A.2 A |
|
96 ## Running testcase A.2 |
|
97 # testing echange of "A" (f5bc6836db60) |
|
98 ## initial state |
|
99 # obstore: main |
|
100 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
101 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
102 # obstore: pushdest |
|
103 # obstore: pulldest |
|
104 ## pushing "A" from main to pushdest |
|
105 pushing to pushdest |
|
106 searching for changes |
|
107 remote: adding changesets |
|
108 remote: adding manifests |
|
109 remote: adding file changes |
|
110 remote: added 1 changesets with 1 changes to 1 files |
|
111 remote: 1 new obsolescence markers |
|
112 ## post push state |
|
113 # obstore: main |
|
114 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
115 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
116 # obstore: pushdest |
|
117 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
118 # obstore: pulldest |
|
119 ## pulling "f5bc6836db60" from main into pulldest |
|
120 pulling from main |
|
121 searching for changes |
|
122 adding changesets |
|
123 adding manifests |
|
124 adding file changes |
|
125 added 1 changesets with 1 changes to 1 files |
|
126 1 new obsolescence markers |
|
127 (run 'hg update' to get a working copy) |
|
128 ## post pull state |
|
129 # obstore: main |
|
130 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
131 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
132 # obstore: pushdest |
|
133 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
134 # obstore: pulldest |
|
135 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
136 |
|
137 $ cd .. |