1 |
|
2 |
|
3 Initial setup |
|
4 |
|
5 $ . $TESTDIR/testlib/exchange-util.sh |
|
6 |
|
7 === C.4 multiple successors, one is pruned === |
|
8 |
|
9 .. Another case were prune are confusing? (A is killed without its successors being |
|
10 .. pushed) |
|
11 .. |
|
12 .. (could split of divergence, if split see the Z section) |
|
13 .. |
|
14 .. {{{ |
|
15 .. A |
|
16 .. B ○⇢ø⇠⊗ C |
|
17 .. \|/ |
|
18 .. ● O |
|
19 .. }}} |
|
20 .. |
|
21 .. Marker exist from: |
|
22 .. |
|
23 .. * `A ø⇠○ B` |
|
24 .. * `A ø⇠○ C` |
|
25 .. * C (prune) |
|
26 .. |
|
27 .. |
|
28 .. Command run: |
|
29 .. |
|
30 .. * hg push -r O |
|
31 .. |
|
32 .. Expected exchange: |
|
33 .. |
|
34 .. * `A ø⇠○ C` |
|
35 .. * C (prune) |
|
36 .. |
|
37 .. Expected exclude: |
|
38 .. |
|
39 .. * `A ø⇠○ B` |
|
40 |
|
41 Implemented as the non-split version |
|
42 |
|
43 $ setuprepos C.4 |
|
44 creating test repo for test case C.4 |
|
45 - pulldest |
|
46 - main |
|
47 - pushdest |
|
48 cd into `main` and proceed with env setup |
|
49 $ cd main |
|
50 $ mkcommit A |
|
51 $ hg update -q 0 |
|
52 $ mkcommit B |
|
53 created new head |
|
54 $ hg update -q 0 |
|
55 $ mkcommit C |
|
56 created new head |
|
57 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'` |
|
58 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'` |
|
59 $ hg prune -qd '0 0' . |
|
60 $ hg log -G --hidden |
|
61 x 7f7f229b13a6 (draft): C |
|
62 | |
|
63 | o 35b183996678 (draft): B |
|
64 |/ |
|
65 | x f5bc6836db60 (draft): A |
|
66 |/ |
|
67 @ a9bdc8b26820 (public): O |
|
68 |
|
69 $ hg debugobsolete |
|
70 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
71 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
72 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
73 $ hg debugobsrelsethashtree |
|
74 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd |
|
75 f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be |
|
76 35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327 |
|
77 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60 |
|
78 $ hg debugobshashrange --subranges --rev 'head()' |
|
79 rev node index size depth obshash |
|
80 2 35b183996678 0 2 2 2a098b4a877f |
|
81 2 35b183996678 1 1 2 916e804c50de |
|
82 0 a9bdc8b26820 0 1 1 a9c02d134f5b |
|
83 $ cd .. |
|
84 $ cd .. |
|
85 |
|
86 Actual Test |
|
87 ------------------------------------- |
|
88 |
|
89 $ dotest C.4 O |
|
90 ## Running testcase C.4 |
|
91 # testing echange of "O" (a9bdc8b26820) |
|
92 ## initial state |
|
93 # obstore: main |
|
94 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
95 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
96 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
97 # obstore: pushdest |
|
98 # obstore: pulldest |
|
99 ## pushing "O" from main to pushdest |
|
100 pushing to pushdest |
|
101 searching for changes |
|
102 no changes found |
|
103 remote: 2 new obsolescence markers |
|
104 ## post push state |
|
105 # obstore: main |
|
106 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
107 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
108 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
109 # obstore: pushdest |
|
110 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
111 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
112 # obstore: pulldest |
|
113 ## pulling "a9bdc8b26820" from main into pulldest |
|
114 pulling from main |
|
115 no changes found |
|
116 2 new obsolescence markers |
|
117 ## post pull state |
|
118 # obstore: main |
|
119 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
120 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
121 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
122 # obstore: pushdest |
|
123 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
124 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
125 # obstore: pulldest |
|
126 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
127 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
128 |
|