|
1 |
|
2 |
|
3 Initial setup |
|
4 |
|
5 $ cat >> $HGRCPATH <<EOF |
|
6 > [web] |
|
7 > push_ssl = false |
|
8 > allow_push = * |
|
9 > [ui] |
|
10 > logtemplate ="{node|short} ({phase}): {desc}\n" |
|
11 > [phases] |
|
12 > publish=False |
|
13 > [extensions] |
|
14 > hgext.rebase= |
|
15 > EOF |
|
16 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
|
17 |
|
18 $ mkcommit() { |
|
19 > echo "$1" > "$1" |
|
20 > hg add "$1" |
|
21 > hg ci -m "$1" |
|
22 > } |
|
23 $ getid() { |
|
24 > hg id --hidden --debug -ir "$1" |
|
25 > } |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 === A.2 Two heads === |
|
32 |
|
33 .. {{{ |
|
34 .. ⇠○ B |
|
35 .. ⇠◔ | A |
|
36 .. |/ |
|
37 .. ● O |
|
38 .. }}} |
|
39 .. |
|
40 .. Marker exist from: |
|
41 .. |
|
42 .. * A |
|
43 .. * B |
|
44 .. |
|
45 .. |
|
46 .. Command run: |
|
47 .. |
|
48 .. * hg push -r A |
|
49 .. |
|
50 .. Expected exchange: |
|
51 .. |
|
52 .. * chain from A |
|
53 .. |
|
54 .. Expected Exclude: |
|
55 .. |
|
56 .. * chain from B |
|
57 |
|
58 initial |
|
59 |
|
60 $ mkdir A.2 |
|
61 $ cd A.2 |
|
62 $ hg init main |
|
63 $ hg init pushdest |
|
64 $ hg init pulldest |
|
65 $ cd main |
|
66 $ mkcommit O |
|
67 $ hg phase --public . |
|
68 $ hg push -q ../pushdest |
|
69 $ hg push -q ../pulldest |
|
70 $ mkcommit A |
|
71 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` |
|
72 $ hg up .^ |
|
73 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
74 $ mkcommit B |
|
75 created new head |
|
76 $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'` |
|
77 $ hg log -G |
|
78 @ 35b183996678 (draft): B |
|
79 | |
|
80 | o f5bc6836db60 (draft): A |
|
81 |/ |
|
82 o a9bdc8b26820 (public): O |
|
83 |
|
84 $ hg debugobsolete |
|
85 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
86 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'} |
|
87 $ cd .. |
|
88 $ cd .. |
|
89 |
|
90 |
|
91 Actual Test |
|
92 --------------- |
|
93 |
|
94 $ cd A.2 |
|
95 $ hg -R main id -r 'desc(A)' |
|
96 f5bc6836db60 |
|
97 $ hg -R main debugobsolete |
|
98 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
99 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'} |
|
100 $ hg -R pushdest debugobsolete |
|
101 $ hg -R pulldest debugobsolete |
|
102 |
|
103 $ hg -R main push -r 'desc(A)' pushdest |
|
104 pushing to pushdest |
|
105 searching for changes |
|
106 adding changesets |
|
107 adding manifests |
|
108 adding file changes |
|
109 added 1 changesets with 1 changes to 1 files |
|
110 OBSEXC: computing relevant nodes |
|
111 OBSEXC: computing markers relevant to 2 nodes |
|
112 OBSEXC: encoding 1 markers |
|
113 OBSEXC: sending 1 pushkey payload (78 bytes) |
|
114 OBSEXC: DONE |
|
115 $ hg -R main debugobsolete |
|
116 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
117 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'} |
|
118 $ hg -R pushdest debugobsolete |
|
119 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
120 $ hg -R pulldest debugobsolete |
|
121 $ hg -R pulldest pull -r 'f5bc6836db60' main |
|
122 pulling from main |
|
123 searching for changes |
|
124 adding changesets |
|
125 adding manifests |
|
126 adding file changes |
|
127 added 1 changesets with 1 changes to 1 files |
|
128 OBSEXC: pull obsolescence markers |
|
129 OBSEXC: merging obsolescence markers (62 bytes) |
|
130 OBSEXC: 1 markers added |
|
131 OBSEXC: DONE |
|
132 (run 'hg update' to get a working copy) |
|
133 $ hg -R main debugobsolete |
|
134 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
135 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'} |
|
136 $ hg -R pushdest debugobsolete |
|
137 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
138 $ hg -R pulldest debugobsolete |
|
139 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'} |
|
140 |
|
141 $ cd .. |