Show More
@@ -1,1472 +1,1506 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [phases] |
|
3 | 3 | > # public changeset are not obsolete |
|
4 | 4 | > publish=false |
|
5 | 5 | > [ui] |
|
6 | 6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}\n" |
|
7 | 7 | > EOF |
|
8 | 8 | $ mkcommit() { |
|
9 | 9 | > echo "$1" > "$1" |
|
10 | 10 | > hg add "$1" |
|
11 | 11 | > hg ci -m "add $1" |
|
12 | 12 | > } |
|
13 | 13 | $ getid() { |
|
14 | 14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
15 | 15 | > } |
|
16 | 16 | |
|
17 | 17 | $ cat > debugkeys.py <<EOF |
|
18 | 18 | > def reposetup(ui, repo): |
|
19 | 19 | > class debugkeysrepo(repo.__class__): |
|
20 | 20 | > def listkeys(self, namespace): |
|
21 | 21 | > ui.write('listkeys %s\n' % (namespace,)) |
|
22 | 22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
23 | 23 | > |
|
24 | 24 | > if repo.local(): |
|
25 | 25 | > repo.__class__ = debugkeysrepo |
|
26 | 26 | > EOF |
|
27 | 27 | |
|
28 | 28 | $ hg init tmpa |
|
29 | 29 | $ cd tmpa |
|
30 | 30 | $ mkcommit kill_me |
|
31 | 31 | |
|
32 | 32 | Checking that the feature is properly disabled |
|
33 | 33 | |
|
34 | 34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
35 | 35 | abort: creating obsolete markers is not enabled on this repo |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Enabling it |
|
39 | 39 | |
|
40 | 40 | $ cat >> $HGRCPATH << EOF |
|
41 | 41 | > [experimental] |
|
42 | 42 | > stabilization=createmarkers,exchange |
|
43 | 43 | > EOF |
|
44 | 44 | |
|
45 | 45 | Killing a single changeset without replacement |
|
46 | 46 | |
|
47 | 47 | $ hg debugobsolete 0 |
|
48 | 48 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | 49 | [255] |
|
50 | 50 | $ hg debugobsolete '00' |
|
51 | 51 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | 52 | [255] |
|
53 | 53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | 54 | obsoleted 1 changesets |
|
55 | 55 | $ hg debugobsolete |
|
56 | 56 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
57 | 57 | |
|
58 | 58 | (test that mercurial is not confused) |
|
59 | 59 | |
|
60 | 60 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
61 | 61 | $ hg tip |
|
62 | 62 | -1:000000000000 (public) [tip ] |
|
63 | 63 | $ hg up --hidden tip --quiet |
|
64 | 64 | |
|
65 | 65 | Killing a single changeset with itself should fail |
|
66 | 66 | (simple local safeguard) |
|
67 | 67 | |
|
68 | 68 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
69 | 69 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
70 | 70 | [255] |
|
71 | 71 | |
|
72 | 72 | $ cd .. |
|
73 | 73 | |
|
74 | 74 | Killing a single changeset with replacement |
|
75 | 75 | (and testing the format option) |
|
76 | 76 | |
|
77 | 77 | $ hg init tmpb |
|
78 | 78 | $ cd tmpb |
|
79 | 79 | $ mkcommit a |
|
80 | 80 | $ mkcommit b |
|
81 | 81 | $ mkcommit original_c |
|
82 | 82 | $ hg up "desc('b')" |
|
83 | 83 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
84 | 84 | $ mkcommit new_c |
|
85 | 85 | created new head |
|
86 | 86 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
87 | 87 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
88 | 88 | obsoleted 1 changesets |
|
89 | 89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
90 | 90 | 2:245bde4270cd add original_c |
|
91 | 91 | $ hg debugrevlog -cd |
|
92 | 92 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
93 | 93 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
94 | 94 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
95 | 95 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
96 | 96 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
97 | 97 | $ hg debugobsolete |
|
98 | 98 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
99 | 99 | |
|
100 | 100 | (check for version number of the obsstore) |
|
101 | 101 | |
|
102 | 102 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
103 | 103 | \x00 (no-eol) (esc) |
|
104 | 104 | |
|
105 | 105 | do it again (it read the obsstore before adding new changeset) |
|
106 | 106 | |
|
107 | 107 | $ hg up '.^' |
|
108 | 108 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
109 | 109 | $ mkcommit new_2_c |
|
110 | 110 | created new head |
|
111 | 111 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
112 | 112 | obsoleted 1 changesets |
|
113 | 113 | $ hg debugobsolete |
|
114 | 114 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
115 | 115 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
116 | 116 | |
|
117 | 117 | Register two markers with a missing node |
|
118 | 118 | |
|
119 | 119 | $ hg up '.^' |
|
120 | 120 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
121 | 121 | $ mkcommit new_3_c |
|
122 | 122 | created new head |
|
123 | 123 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
124 | 124 | obsoleted 1 changesets |
|
125 | 125 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
126 | 126 | $ hg debugobsolete |
|
127 | 127 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
128 | 128 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
129 | 129 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
130 | 130 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
131 | 131 | |
|
132 | 132 | Test the --index option of debugobsolete command |
|
133 | 133 | $ hg debugobsolete --index |
|
134 | 134 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
135 | 135 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
136 | 136 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
137 | 137 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
138 | 138 | |
|
139 | 139 | Refuse pathological nullid successors |
|
140 | 140 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
141 | 141 | transaction abort! |
|
142 | 142 | rollback completed |
|
143 | 143 | abort: bad obsolescence marker detected: invalid successors nullid |
|
144 | 144 | [255] |
|
145 | 145 | |
|
146 | 146 | Check that graphlog detect that a changeset is obsolete: |
|
147 | 147 | |
|
148 | 148 | $ hg log -G |
|
149 | 149 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
150 | 150 | | |
|
151 | 151 | o 1:7c3bad9141dc (draft) [ ] add b |
|
152 | 152 | | |
|
153 | 153 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | check that heads does not report them |
|
157 | 157 | |
|
158 | 158 | $ hg heads |
|
159 | 159 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
160 | 160 | $ hg heads --hidden |
|
161 | 161 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
162 | 162 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
163 | 163 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
164 | 164 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | check that summary does not report them |
|
168 | 168 | |
|
169 | 169 | $ hg init ../sink |
|
170 | 170 | $ echo '[paths]' >> .hg/hgrc |
|
171 | 171 | $ echo 'default=../sink' >> .hg/hgrc |
|
172 | 172 | $ hg summary --remote |
|
173 | 173 | parent: 5:5601fb93a350 tip |
|
174 | 174 | add new_3_c |
|
175 | 175 | branch: default |
|
176 | 176 | commit: (clean) |
|
177 | 177 | update: (current) |
|
178 | 178 | phases: 3 draft |
|
179 | 179 | remote: 3 outgoing |
|
180 | 180 | |
|
181 | 181 | $ hg summary --remote --hidden |
|
182 | 182 | parent: 5:5601fb93a350 tip |
|
183 | 183 | add new_3_c |
|
184 | 184 | branch: default |
|
185 | 185 | commit: (clean) |
|
186 | 186 | update: 3 new changesets, 4 branch heads (merge) |
|
187 | 187 | phases: 6 draft |
|
188 | 188 | remote: 3 outgoing |
|
189 | 189 | |
|
190 | 190 | check that various commands work well with filtering |
|
191 | 191 | |
|
192 | 192 | $ hg tip |
|
193 | 193 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
194 | 194 | $ hg log -r 6 |
|
195 | 195 | abort: unknown revision '6'! |
|
196 | 196 | [255] |
|
197 | 197 | $ hg log -r 4 |
|
198 | 198 | abort: hidden revision '4'! |
|
199 | 199 | (use --hidden to access hidden revisions) |
|
200 | 200 | [255] |
|
201 | 201 | $ hg debugrevspec 'rev(6)' |
|
202 | 202 | $ hg debugrevspec 'rev(4)' |
|
203 | 203 | $ hg debugrevspec 'null' |
|
204 | 204 | -1 |
|
205 | 205 | |
|
206 | 206 | Check that public changeset are not accounted as obsolete: |
|
207 | 207 | |
|
208 | 208 | $ hg --hidden phase --public 2 |
|
209 | 209 | $ hg log -G |
|
210 | 210 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
211 | 211 | | |
|
212 | 212 | | o 2:245bde4270cd (public) [ ] add original_c |
|
213 | 213 | |/ |
|
214 | 214 | o 1:7c3bad9141dc (public) [ ] add b |
|
215 | 215 | | |
|
216 | 216 | o 0:1f0dee641bb7 (public) [ ] add a |
|
217 | 217 | |
|
218 | 218 | |
|
219 | 219 | And that bumped changeset are detected |
|
220 | 220 | -------------------------------------- |
|
221 | 221 | |
|
222 | 222 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
223 | 223 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
224 | 224 | the public changeset |
|
225 | 225 | |
|
226 | 226 | $ hg log --hidden -r 'phasedivergent()' |
|
227 | 227 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
228 | 228 | |
|
229 | 229 | And that we can't push bumped changeset |
|
230 | 230 | |
|
231 | 231 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
232 | 232 | pushing to ../tmpa |
|
233 | 233 | searching for changes |
|
234 | 234 | warning: repository is unrelated |
|
235 | 235 | adding changesets |
|
236 | 236 | adding manifests |
|
237 | 237 | adding file changes |
|
238 | 238 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
239 | 239 | $ hg push ../tmpa |
|
240 | 240 | pushing to ../tmpa |
|
241 | 241 | searching for changes |
|
242 | 242 | abort: push includes phase-divergent changeset: 5601fb93a350! |
|
243 | 243 | [255] |
|
244 | 244 | |
|
245 | 245 | Fixing "bumped" situation |
|
246 | 246 | We need to create a clone of 5 and add a special marker with a flag |
|
247 | 247 | |
|
248 | 248 | $ hg summary |
|
249 | 249 | parent: 5:5601fb93a350 tip (phase-divergent) |
|
250 | 250 | add new_3_c |
|
251 | 251 | branch: default |
|
252 | 252 | commit: (clean) |
|
253 | 253 | update: 1 new changesets, 2 branch heads (merge) |
|
254 | 254 | phases: 1 draft |
|
255 | 255 | phase-divergent: 1 changesets |
|
256 | 256 | $ hg up '5^' |
|
257 | 257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
258 | 258 | $ hg revert -ar 5 |
|
259 | 259 | adding new_3_c |
|
260 | 260 | $ hg ci -m 'add n3w_3_c' |
|
261 | 261 | created new head |
|
262 | 262 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
263 | 263 | obsoleted 1 changesets |
|
264 | 264 | $ hg log -r 'phasedivergent()' |
|
265 | 265 | $ hg log -G |
|
266 | 266 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
267 | 267 | | |
|
268 | 268 | | o 2:245bde4270cd (public) [ ] add original_c |
|
269 | 269 | |/ |
|
270 | 270 | o 1:7c3bad9141dc (public) [ ] add b |
|
271 | 271 | | |
|
272 | 272 | o 0:1f0dee641bb7 (public) [ ] add a |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | Basic exclusive testing |
|
276 | 276 | |
|
277 | 277 | $ hg log -G --hidden |
|
278 | 278 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
279 | 279 | | |
|
280 | 280 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
281 | 281 | |/ |
|
282 | 282 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
283 | 283 | |/ |
|
284 | 284 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
285 | 285 | |/ |
|
286 | 286 | | o 2:245bde4270cd (public) [ ] add original_c |
|
287 | 287 | |/ |
|
288 | 288 | o 1:7c3bad9141dc (public) [ ] add b |
|
289 | 289 | | |
|
290 | 290 | o 0:1f0dee641bb7 (public) [ ] add a |
|
291 | 291 | |
|
292 | 292 | $ hg debugobsolete --rev 6f9641995072 |
|
293 | 293 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
294 | 294 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
295 | 295 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
296 | 296 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
297 | 297 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
298 | 298 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
299 | 299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
300 | 300 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
301 | 301 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
302 | 302 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
303 | 303 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
304 | 304 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
305 | 305 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
306 | 306 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
307 | 307 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
308 | 308 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
309 | 309 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
310 | 310 | |
|
311 | 311 | $ cd .. |
|
312 | 312 | |
|
313 | 313 | Revision 0 is hidden |
|
314 | 314 | -------------------- |
|
315 | 315 | |
|
316 | 316 | $ hg init rev0hidden |
|
317 | 317 | $ cd rev0hidden |
|
318 | 318 | |
|
319 | 319 | $ mkcommit kill0 |
|
320 | 320 | $ hg up -q null |
|
321 | 321 | $ hg debugobsolete `getid kill0` |
|
322 | 322 | obsoleted 1 changesets |
|
323 | 323 | $ mkcommit a |
|
324 | 324 | $ mkcommit b |
|
325 | 325 | |
|
326 | 326 | Should pick the first visible revision as "repo" node |
|
327 | 327 | |
|
328 | 328 | $ hg archive ../archive-null |
|
329 | 329 | $ cat ../archive-null/.hg_archival.txt |
|
330 | 330 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
331 | 331 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
332 | 332 | branch: default |
|
333 | 333 | latesttag: null |
|
334 | 334 | latesttagdistance: 2 |
|
335 | 335 | changessincelatesttag: 2 |
|
336 | 336 | |
|
337 | 337 | |
|
338 | 338 | $ cd .. |
|
339 | 339 | |
|
340 | 340 | Exchange Test |
|
341 | 341 | ============================ |
|
342 | 342 | |
|
343 | 343 | Destination repo does not have any data |
|
344 | 344 | --------------------------------------- |
|
345 | 345 | |
|
346 | 346 | Simple incoming test |
|
347 | 347 | |
|
348 | 348 | $ hg init tmpc |
|
349 | 349 | $ cd tmpc |
|
350 | 350 | $ hg incoming ../tmpb |
|
351 | 351 | comparing with ../tmpb |
|
352 | 352 | 0:1f0dee641bb7 (public) [ ] add a |
|
353 | 353 | 1:7c3bad9141dc (public) [ ] add b |
|
354 | 354 | 2:245bde4270cd (public) [ ] add original_c |
|
355 | 355 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
356 | 356 | |
|
357 | 357 | Try to pull markers |
|
358 | 358 | (extinct changeset are excluded but marker are pushed) |
|
359 | 359 | |
|
360 | 360 | $ hg pull ../tmpb |
|
361 | 361 | pulling from ../tmpb |
|
362 | 362 | requesting all changes |
|
363 | 363 | adding changesets |
|
364 | 364 | adding manifests |
|
365 | 365 | adding file changes |
|
366 | 366 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
367 | 367 | 5 new obsolescence markers |
|
368 | 368 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
369 | 369 | $ hg debugobsolete |
|
370 | 370 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
371 | 371 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
372 | 372 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
373 | 373 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
374 | 374 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
375 | 375 | |
|
376 | 376 | Rollback//Transaction support |
|
377 | 377 | |
|
378 | 378 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
379 | 379 | $ hg debugobsolete |
|
380 | 380 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
381 | 381 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
382 | 382 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
383 | 383 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
384 | 384 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
385 | 385 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
386 | 386 | $ hg rollback -n |
|
387 | 387 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
388 | 388 | $ hg rollback |
|
389 | 389 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
390 | 390 | $ hg debugobsolete |
|
391 | 391 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
392 | 392 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
393 | 393 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
394 | 394 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
395 | 395 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
396 | 396 | |
|
397 | 397 | $ cd .. |
|
398 | 398 | |
|
399 | 399 | Try to push markers |
|
400 | 400 | |
|
401 | 401 | $ hg init tmpd |
|
402 | 402 | $ hg -R tmpb push tmpd |
|
403 | 403 | pushing to tmpd |
|
404 | 404 | searching for changes |
|
405 | 405 | adding changesets |
|
406 | 406 | adding manifests |
|
407 | 407 | adding file changes |
|
408 | 408 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
409 | 409 | 5 new obsolescence markers |
|
410 | 410 | $ hg -R tmpd debugobsolete | sort |
|
411 | 411 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
412 | 412 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
413 | 413 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
414 | 414 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
415 | 415 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
416 | 416 | |
|
417 | 417 | Check obsolete keys are exchanged only if source has an obsolete store |
|
418 | 418 | |
|
419 | 419 | $ hg init empty |
|
420 | 420 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
421 | 421 | pushing to tmpd |
|
422 | 422 | listkeys phases |
|
423 | 423 | listkeys bookmarks |
|
424 | 424 | no changes found |
|
425 | 425 | listkeys phases |
|
426 | 426 | [1] |
|
427 | 427 | |
|
428 | 428 | clone support |
|
429 | 429 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
430 | 430 | |
|
431 | 431 | $ hg clone tmpb clone-dest |
|
432 | 432 | updating to branch default |
|
433 | 433 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
434 | 434 | $ hg -R clone-dest log -G --hidden |
|
435 | 435 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
436 | 436 | | |
|
437 | 437 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
438 | 438 | |/ |
|
439 | 439 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
440 | 440 | |/ |
|
441 | 441 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
442 | 442 | |/ |
|
443 | 443 | | o 2:245bde4270cd (public) [ ] add original_c |
|
444 | 444 | |/ |
|
445 | 445 | o 1:7c3bad9141dc (public) [ ] add b |
|
446 | 446 | | |
|
447 | 447 | o 0:1f0dee641bb7 (public) [ ] add a |
|
448 | 448 | |
|
449 | 449 | $ hg -R clone-dest debugobsolete |
|
450 | 450 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
451 | 451 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
452 | 452 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
453 | 453 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
454 | 454 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
455 | 455 | |
|
456 | 456 | |
|
457 | 457 | Destination repo have existing data |
|
458 | 458 | --------------------------------------- |
|
459 | 459 | |
|
460 | 460 | On pull |
|
461 | 461 | |
|
462 | 462 | $ hg init tmpe |
|
463 | 463 | $ cd tmpe |
|
464 | 464 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
465 | 465 | $ hg pull ../tmpb |
|
466 | 466 | pulling from ../tmpb |
|
467 | 467 | requesting all changes |
|
468 | 468 | adding changesets |
|
469 | 469 | adding manifests |
|
470 | 470 | adding file changes |
|
471 | 471 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
472 | 472 | 5 new obsolescence markers |
|
473 | 473 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
474 | 474 | $ hg debugobsolete |
|
475 | 475 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
476 | 476 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
477 | 477 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
478 | 478 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
479 | 479 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
480 | 480 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
481 | 481 | |
|
482 | 482 | |
|
483 | 483 | On push |
|
484 | 484 | |
|
485 | 485 | $ hg push ../tmpc |
|
486 | 486 | pushing to ../tmpc |
|
487 | 487 | searching for changes |
|
488 | 488 | no changes found |
|
489 | 489 | 1 new obsolescence markers |
|
490 | 490 | [1] |
|
491 | 491 | $ hg -R ../tmpc debugobsolete |
|
492 | 492 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
493 | 493 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
494 | 494 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
495 | 495 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
496 | 496 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
497 | 497 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
498 | 498 | |
|
499 | 499 | detect outgoing obsolete and unstable |
|
500 | 500 | --------------------------------------- |
|
501 | 501 | |
|
502 | 502 | |
|
503 | 503 | $ hg log -G |
|
504 | 504 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
505 | 505 | | |
|
506 | 506 | | o 2:245bde4270cd (public) [ ] add original_c |
|
507 | 507 | |/ |
|
508 | 508 | o 1:7c3bad9141dc (public) [ ] add b |
|
509 | 509 | | |
|
510 | 510 | o 0:1f0dee641bb7 (public) [ ] add a |
|
511 | 511 | |
|
512 | 512 | $ hg up 'desc("n3w_3_c")' |
|
513 | 513 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
514 | 514 | $ mkcommit original_d |
|
515 | 515 | $ mkcommit original_e |
|
516 | 516 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
517 | 517 | obsoleted 1 changesets |
|
518 | 518 | $ hg debugobsolete | grep `getid original_d` |
|
519 | 519 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
520 | 520 | $ hg log -r 'obsolete()' |
|
521 | 521 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
522 | 522 | $ hg summary |
|
523 | 523 | parent: 5:cda648ca50f5 tip (orphan) |
|
524 | 524 | add original_e |
|
525 | 525 | branch: default |
|
526 | 526 | commit: (clean) |
|
527 | 527 | update: 1 new changesets, 2 branch heads (merge) |
|
528 | 528 | phases: 3 draft |
|
529 | 529 | orphan: 1 changesets |
|
530 | 530 | $ hg log -G -r '::orphan()' |
|
531 | 531 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
532 | 532 | | |
|
533 | 533 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
534 | 534 | | |
|
535 | 535 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
536 | 536 | | |
|
537 | 537 | o 1:7c3bad9141dc (public) [ ] add b |
|
538 | 538 | | |
|
539 | 539 | o 0:1f0dee641bb7 (public) [ ] add a |
|
540 | 540 | |
|
541 | 541 | |
|
542 | 542 | refuse to push obsolete changeset |
|
543 | 543 | |
|
544 | 544 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
545 | 545 | pushing to ../tmpc/ |
|
546 | 546 | searching for changes |
|
547 | 547 | abort: push includes obsolete changeset: 94b33453f93b! |
|
548 | 548 | [255] |
|
549 | 549 | |
|
550 | 550 | refuse to push unstable changeset |
|
551 | 551 | |
|
552 | 552 | $ hg push ../tmpc/ |
|
553 | 553 | pushing to ../tmpc/ |
|
554 | 554 | searching for changes |
|
555 | 555 | abort: push includes orphan changeset: cda648ca50f5! |
|
556 | 556 | [255] |
|
557 | 557 | |
|
558 | 558 | Test that extinct changeset are properly detected |
|
559 | 559 | |
|
560 | 560 | $ hg log -r 'extinct()' |
|
561 | 561 | |
|
562 | 562 | Don't try to push extinct changeset |
|
563 | 563 | |
|
564 | 564 | $ hg init ../tmpf |
|
565 | 565 | $ hg out ../tmpf |
|
566 | 566 | comparing with ../tmpf |
|
567 | 567 | searching for changes |
|
568 | 568 | 0:1f0dee641bb7 (public) [ ] add a |
|
569 | 569 | 1:7c3bad9141dc (public) [ ] add b |
|
570 | 570 | 2:245bde4270cd (public) [ ] add original_c |
|
571 | 571 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
572 | 572 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
573 | 573 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
574 | 574 | $ hg push ../tmpf -f # -f because be push unstable too |
|
575 | 575 | pushing to ../tmpf |
|
576 | 576 | searching for changes |
|
577 | 577 | adding changesets |
|
578 | 578 | adding manifests |
|
579 | 579 | adding file changes |
|
580 | 580 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
581 | 581 | 7 new obsolescence markers |
|
582 | 582 | |
|
583 | 583 | no warning displayed |
|
584 | 584 | |
|
585 | 585 | $ hg push ../tmpf |
|
586 | 586 | pushing to ../tmpf |
|
587 | 587 | searching for changes |
|
588 | 588 | no changes found |
|
589 | 589 | [1] |
|
590 | 590 | |
|
591 | 591 | Do not warn about new head when the new head is a successors of a remote one |
|
592 | 592 | |
|
593 | 593 | $ hg log -G |
|
594 | 594 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
595 | 595 | | |
|
596 | 596 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
597 | 597 | | |
|
598 | 598 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
599 | 599 | | |
|
600 | 600 | | o 2:245bde4270cd (public) [ ] add original_c |
|
601 | 601 | |/ |
|
602 | 602 | o 1:7c3bad9141dc (public) [ ] add b |
|
603 | 603 | | |
|
604 | 604 | o 0:1f0dee641bb7 (public) [ ] add a |
|
605 | 605 | |
|
606 | 606 | $ hg up -q 'desc(n3w_3_c)' |
|
607 | 607 | $ mkcommit obsolete_e |
|
608 | 608 | created new head |
|
609 | 609 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
610 | 610 | > -u 'test <test@example.net>' |
|
611 | 611 | obsoleted 1 changesets |
|
612 | 612 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
613 | 613 | comparing with ../tmpf |
|
614 | 614 | searching for changes |
|
615 | 615 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
616 | 616 | $ hg push ../tmpf |
|
617 | 617 | pushing to ../tmpf |
|
618 | 618 | searching for changes |
|
619 | 619 | adding changesets |
|
620 | 620 | adding manifests |
|
621 | 621 | adding file changes |
|
622 | 622 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
623 | 623 | 1 new obsolescence markers |
|
624 | 624 | obsoleted 1 changesets |
|
625 | 625 | |
|
626 | 626 | test relevance computation |
|
627 | 627 | --------------------------------------- |
|
628 | 628 | |
|
629 | 629 | Checking simple case of "marker relevance". |
|
630 | 630 | |
|
631 | 631 | |
|
632 | 632 | Reminder of the repo situation |
|
633 | 633 | |
|
634 | 634 | $ hg log --hidden --graph |
|
635 | 635 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
636 | 636 | | |
|
637 | 637 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e |
|
638 | 638 | | | |
|
639 | 639 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
640 | 640 | |/ |
|
641 | 641 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
642 | 642 | | |
|
643 | 643 | | o 2:245bde4270cd (public) [ ] add original_c |
|
644 | 644 | |/ |
|
645 | 645 | o 1:7c3bad9141dc (public) [ ] add b |
|
646 | 646 | | |
|
647 | 647 | o 0:1f0dee641bb7 (public) [ ] add a |
|
648 | 648 | |
|
649 | 649 | |
|
650 | 650 | List of all markers |
|
651 | 651 | |
|
652 | 652 | $ hg debugobsolete |
|
653 | 653 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
654 | 654 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
655 | 655 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
656 | 656 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
657 | 657 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
658 | 658 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
659 | 659 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
660 | 660 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
661 | 661 | |
|
662 | 662 | List of changesets with no chain |
|
663 | 663 | |
|
664 | 664 | $ hg debugobsolete --hidden --rev ::2 |
|
665 | 665 | |
|
666 | 666 | List of changesets that are included on marker chain |
|
667 | 667 | |
|
668 | 668 | $ hg debugobsolete --hidden --rev 6 |
|
669 | 669 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
670 | 670 | |
|
671 | 671 | List of changesets with a longer chain, (including a pruned children) |
|
672 | 672 | |
|
673 | 673 | $ hg debugobsolete --hidden --rev 3 |
|
674 | 674 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
675 | 675 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
676 | 676 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
677 | 677 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
678 | 678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
679 | 679 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
680 | 680 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
681 | 681 | |
|
682 | 682 | List of both |
|
683 | 683 | |
|
684 | 684 | $ hg debugobsolete --hidden --rev 3::6 |
|
685 | 685 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
686 | 686 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
687 | 687 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
688 | 688 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
689 | 689 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
690 | 690 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
691 | 691 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
692 | 692 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
693 | 693 | |
|
694 | 694 | List of all markers in JSON |
|
695 | 695 | |
|
696 | 696 | $ hg debugobsolete -Tjson |
|
697 | 697 | [ |
|
698 | 698 | { |
|
699 | 699 | "date": [1339.0, 0], |
|
700 | 700 | "flag": 0, |
|
701 | 701 | "metadata": {"user": "test"}, |
|
702 | 702 | "precnode": "1339133913391339133913391339133913391339", |
|
703 | 703 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
704 | 704 | }, |
|
705 | 705 | { |
|
706 | 706 | "date": [1339.0, 0], |
|
707 | 707 | "flag": 0, |
|
708 | 708 | "metadata": {"user": "test"}, |
|
709 | 709 | "precnode": "1337133713371337133713371337133713371337", |
|
710 | 710 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
711 | 711 | }, |
|
712 | 712 | { |
|
713 | 713 | "date": [121.0, 120], |
|
714 | 714 | "flag": 12, |
|
715 | 715 | "metadata": {"user": "test"}, |
|
716 | 716 | "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
717 | 717 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
718 | 718 | }, |
|
719 | 719 | { |
|
720 | 720 | "date": [1338.0, 0], |
|
721 | 721 | "flag": 1, |
|
722 | 722 | "metadata": {"user": "test"}, |
|
723 | 723 | "precnode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
724 | 724 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
725 | 725 | }, |
|
726 | 726 | { |
|
727 | 727 | "date": [1338.0, 0], |
|
728 | 728 | "flag": 0, |
|
729 | 729 | "metadata": {"user": "test"}, |
|
730 | 730 | "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
731 | 731 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
732 | 732 | }, |
|
733 | 733 | { |
|
734 | 734 | "date": [1337.0, 0], |
|
735 | 735 | "flag": 0, |
|
736 | 736 | "metadata": {"user": "test"}, |
|
737 | 737 | "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
738 | 738 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
739 | 739 | }, |
|
740 | 740 | { |
|
741 | 741 | "date": [0.0, 0], |
|
742 | 742 | "flag": 0, |
|
743 | 743 | "metadata": {"user": "test"}, |
|
744 | 744 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
745 | 745 | "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
746 | 746 | "succnodes": [] |
|
747 | 747 | }, |
|
748 | 748 | { |
|
749 | 749 | "date": *, (glob) |
|
750 | 750 | "flag": 0, |
|
751 | 751 | "metadata": {"user": "test <test@example.net>"}, |
|
752 | 752 | "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
753 | 753 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
754 | 754 | } |
|
755 | 755 | ] |
|
756 | 756 | |
|
757 | 757 | Template keywords |
|
758 | 758 | |
|
759 | 759 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
760 | 760 | 3de5eca88c00 ????-??-?? (glob) |
|
761 | 761 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
762 | 762 | user=test <test@example.net> |
|
763 | 763 | $ hg debugobsolete -r6 -T '{metadata}\n' |
|
764 | 764 | 'user': 'test <test@example.net>' |
|
765 | 765 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
766 | 766 | 0 test <test@example.net> |
|
767 | 767 | |
|
768 | 768 | Test the debug output for exchange |
|
769 | 769 | ---------------------------------- |
|
770 | 770 | |
|
771 | 771 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
772 | 772 | pulling from ../tmpb |
|
773 | 773 | searching for changes |
|
774 | 774 | no changes found |
|
775 | 775 | obsmarker-exchange: 346 bytes received |
|
776 | 776 | |
|
777 | 777 | check hgweb does not explode |
|
778 | 778 | ==================================== |
|
779 | 779 | |
|
780 | 780 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
781 | 781 | adding changesets |
|
782 | 782 | adding manifests |
|
783 | 783 | adding file changes |
|
784 | 784 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
785 | 785 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
786 | 786 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
787 | 787 | > do |
|
788 | 788 | > hg debugobsolete $node |
|
789 | 789 | > done |
|
790 | 790 | obsoleted 1 changesets |
|
791 | 791 | obsoleted 1 changesets |
|
792 | 792 | obsoleted 1 changesets |
|
793 | 793 | obsoleted 1 changesets |
|
794 | 794 | obsoleted 1 changesets |
|
795 | 795 | obsoleted 1 changesets |
|
796 | 796 | obsoleted 1 changesets |
|
797 | 797 | obsoleted 1 changesets |
|
798 | 798 | obsoleted 1 changesets |
|
799 | 799 | obsoleted 1 changesets |
|
800 | 800 | obsoleted 1 changesets |
|
801 | 801 | obsoleted 1 changesets |
|
802 | 802 | obsoleted 1 changesets |
|
803 | 803 | obsoleted 1 changesets |
|
804 | 804 | obsoleted 1 changesets |
|
805 | 805 | obsoleted 1 changesets |
|
806 | 806 | obsoleted 1 changesets |
|
807 | 807 | obsoleted 1 changesets |
|
808 | 808 | obsoleted 1 changesets |
|
809 | 809 | obsoleted 1 changesets |
|
810 | 810 | obsoleted 1 changesets |
|
811 | 811 | obsoleted 1 changesets |
|
812 | 812 | obsoleted 1 changesets |
|
813 | 813 | obsoleted 1 changesets |
|
814 | 814 | obsoleted 1 changesets |
|
815 | 815 | obsoleted 1 changesets |
|
816 | 816 | obsoleted 1 changesets |
|
817 | 817 | obsoleted 1 changesets |
|
818 | 818 | obsoleted 1 changesets |
|
819 | 819 | obsoleted 1 changesets |
|
820 | 820 | obsoleted 1 changesets |
|
821 | 821 | obsoleted 1 changesets |
|
822 | 822 | obsoleted 1 changesets |
|
823 | 823 | obsoleted 1 changesets |
|
824 | 824 | obsoleted 1 changesets |
|
825 | 825 | obsoleted 1 changesets |
|
826 | 826 | obsoleted 1 changesets |
|
827 | 827 | obsoleted 1 changesets |
|
828 | 828 | obsoleted 1 changesets |
|
829 | 829 | obsoleted 1 changesets |
|
830 | 830 | obsoleted 1 changesets |
|
831 | 831 | obsoleted 1 changesets |
|
832 | 832 | obsoleted 1 changesets |
|
833 | 833 | obsoleted 1 changesets |
|
834 | 834 | obsoleted 1 changesets |
|
835 | 835 | obsoleted 1 changesets |
|
836 | 836 | obsoleted 1 changesets |
|
837 | 837 | obsoleted 1 changesets |
|
838 | 838 | obsoleted 1 changesets |
|
839 | 839 | obsoleted 1 changesets |
|
840 | 840 | obsoleted 1 changesets |
|
841 | 841 | obsoleted 1 changesets |
|
842 | 842 | obsoleted 1 changesets |
|
843 | 843 | obsoleted 1 changesets |
|
844 | 844 | obsoleted 1 changesets |
|
845 | 845 | obsoleted 1 changesets |
|
846 | 846 | obsoleted 1 changesets |
|
847 | 847 | obsoleted 1 changesets |
|
848 | 848 | obsoleted 1 changesets |
|
849 | 849 | obsoleted 1 changesets |
|
850 | 850 | $ hg up tip |
|
851 | 851 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
852 | 852 | |
|
853 | 853 | #if serve |
|
854 | 854 | |
|
855 | 855 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
856 | 856 | $ cat hg.pid >> $DAEMON_PIDS |
|
857 | 857 | |
|
858 | 858 | check changelog view |
|
859 | 859 | |
|
860 | 860 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
861 | 861 | 200 Script output follows |
|
862 | 862 | |
|
863 | 863 | check graph view |
|
864 | 864 | |
|
865 | 865 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
866 | 866 | 200 Script output follows |
|
867 | 867 | |
|
868 | 868 | check filelog view |
|
869 | 869 | |
|
870 | 870 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
871 | 871 | 200 Script output follows |
|
872 | 872 | |
|
873 | 873 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
874 | 874 | 200 Script output follows |
|
875 | 875 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
876 | 876 | 404 Not Found |
|
877 | 877 | [1] |
|
878 | 878 | |
|
879 | 879 | check that web.view config option: |
|
880 | 880 | |
|
881 | 881 | $ killdaemons.py hg.pid |
|
882 | 882 | $ cat >> .hg/hgrc << EOF |
|
883 | 883 | > [web] |
|
884 | 884 | > view=all |
|
885 | 885 | > EOF |
|
886 | 886 | $ wait |
|
887 | 887 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
888 | 888 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
889 | 889 | 200 Script output follows |
|
890 | 890 | $ killdaemons.py hg.pid |
|
891 | 891 | |
|
892 | 892 | Checking _enable=False warning if obsolete marker exists |
|
893 | 893 | |
|
894 | 894 | $ echo '[experimental]' >> $HGRCPATH |
|
895 | 895 | $ echo "stabilization=" >> $HGRCPATH |
|
896 | 896 | $ hg log -r tip |
|
897 | 897 | obsolete feature not enabled but 68 markers found! |
|
898 | 898 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
899 | 899 | |
|
900 | 900 | reenable for later test |
|
901 | 901 | |
|
902 | 902 | $ echo '[experimental]' >> $HGRCPATH |
|
903 | 903 | $ echo "stabilization=createmarkers,exchange" >> $HGRCPATH |
|
904 | 904 | |
|
905 | 905 | $ rm hg.pid access.log errors.log |
|
906 | 906 | #endif |
|
907 | 907 | |
|
908 | 908 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
909 | 909 | |
|
910 | 910 | $ hg debugobsolete `getid obsolete_e` |
|
911 | 911 | obsoleted 1 changesets |
|
912 | 912 | $ hg debugobsolete `getid original_c` `getid babar` |
|
913 | 913 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' |
|
914 | 914 | changeset: 7:50c51b361e60 |
|
915 | 915 | user: test |
|
916 | 916 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
917 | 917 | instability: orphan, phase-divergent |
|
918 | 918 | summary: add babar |
|
919 | 919 | |
|
920 | 920 | |
|
921 | 921 | test the "obsolete" templatekw |
|
922 | 922 | |
|
923 | 923 | $ hg log -r 'obsolete()' |
|
924 | 924 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e |
|
925 | 925 | |
|
926 | 926 | test the "troubles" templatekw |
|
927 | 927 | |
|
928 | 928 | $ hg log -r 'phasedivergent() and orphan()' |
|
929 | 929 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar |
|
930 | 930 | |
|
931 | 931 | test the default cmdline template |
|
932 | 932 | |
|
933 | 933 | $ hg log -T default -r 'phasedivergent()' |
|
934 | 934 | changeset: 7:50c51b361e60 |
|
935 | 935 | user: test |
|
936 | 936 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
937 | 937 | instability: orphan, phase-divergent |
|
938 | 938 | summary: add babar |
|
939 | 939 | |
|
940 | 940 | $ hg log -T default -r 'obsolete()' |
|
941 | 941 | changeset: 6:3de5eca88c00 |
|
942 | 942 | parent: 3:6f9641995072 |
|
943 | 943 | user: test |
|
944 | 944 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
945 | 945 | summary: add obsolete_e |
|
946 | 946 | |
|
947 | 947 | |
|
948 | test the obsolete labels | |
|
949 | ||
|
950 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' | |
|
951 | [log.changeset changeset.draft changeset.troubled trouble.orphan trouble.phase-divergent|changeset: 7:50c51b361e60] | |
|
952 | [log.user|user: test] | |
|
953 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
|
954 | [log.trouble|instability: orphan, phase-divergent] | |
|
955 | [log.summary|summary: add babar] | |
|
956 | ||
|
957 | ||
|
958 | $ hg log -T default -r 'phasedivergent()' --color=debug | |
|
959 | [log.changeset changeset.draft changeset.troubled trouble.orphantrouble.phase-divergent|changeset: 7:50c51b361e60] | |
|
960 | [log.user|user: test] | |
|
961 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
|
962 | [log.trouble|instability: orphan, phase-divergent] | |
|
963 | [log.summary|summary: add babar] | |
|
964 | ||
|
965 | ||
|
966 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" | |
|
967 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
|
968 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
|
969 | [log.user|user: test] | |
|
970 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
|
971 | [log.summary|summary: add obsolete_e] | |
|
972 | ||
|
973 | ||
|
974 | $ hg log -T default -r 'obsolete()' --color=debug | |
|
975 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
|
976 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
|
977 | [log.user|user: test] | |
|
978 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
|
979 | [log.summary|summary: add obsolete_e] | |
|
980 | ||
|
981 | ||
|
948 | 982 | test summary output |
|
949 | 983 | |
|
950 | 984 | $ hg up -r 'phasedivergent() and orphan()' |
|
951 | 985 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
952 | 986 | $ hg summary |
|
953 | 987 | parent: 7:50c51b361e60 (orphan, phase-divergent) |
|
954 | 988 | add babar |
|
955 | 989 | branch: default |
|
956 | 990 | commit: (clean) |
|
957 | 991 | update: 2 new changesets (update) |
|
958 | 992 | phases: 4 draft |
|
959 | 993 | orphan: 2 changesets |
|
960 | 994 | phase-divergent: 1 changesets |
|
961 | 995 | $ hg up -r 'obsolete()' |
|
962 | 996 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
963 | 997 | $ hg summary |
|
964 | 998 | parent: 6:3de5eca88c00 (obsolete) |
|
965 | 999 | add obsolete_e |
|
966 | 1000 | branch: default |
|
967 | 1001 | commit: (clean) |
|
968 | 1002 | update: 3 new changesets (update) |
|
969 | 1003 | phases: 4 draft |
|
970 | 1004 | orphan: 2 changesets |
|
971 | 1005 | phase-divergent: 1 changesets |
|
972 | 1006 | |
|
973 | 1007 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
974 | 1008 | =============================================================================== |
|
975 | 1009 | |
|
976 | 1010 | This test issue 3805 |
|
977 | 1011 | |
|
978 | 1012 | $ hg init repo-issue3805 |
|
979 | 1013 | $ cd repo-issue3805 |
|
980 | 1014 | $ echo "base" > base |
|
981 | 1015 | $ hg ci -Am "base" |
|
982 | 1016 | adding base |
|
983 | 1017 | $ echo "foo" > foo |
|
984 | 1018 | $ hg ci -Am "A" |
|
985 | 1019 | adding foo |
|
986 | 1020 | $ hg clone . ../other-issue3805 |
|
987 | 1021 | updating to branch default |
|
988 | 1022 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
989 | 1023 | $ echo "bar" >> foo |
|
990 | 1024 | $ hg ci --amend |
|
991 | 1025 | $ cd ../other-issue3805 |
|
992 | 1026 | $ hg log -G |
|
993 | 1027 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
994 | 1028 | | |
|
995 | 1029 | o 0:d20a80d4def3 (draft) [ ] base |
|
996 | 1030 | |
|
997 | 1031 | $ hg log -G -R ../repo-issue3805 |
|
998 | 1032 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
999 | 1033 | | |
|
1000 | 1034 | o 0:d20a80d4def3 (draft) [ ] base |
|
1001 | 1035 | |
|
1002 | 1036 | $ hg incoming |
|
1003 | 1037 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1004 | 1038 | searching for changes |
|
1005 | 1039 | 3:323a9c3ddd91 (draft) [tip ] A |
|
1006 | 1040 | $ hg incoming --bundle ../issue3805.hg |
|
1007 | 1041 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1008 | 1042 | searching for changes |
|
1009 | 1043 | 3:323a9c3ddd91 (draft) [tip ] A |
|
1010 | 1044 | $ hg outgoing |
|
1011 | 1045 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1012 | 1046 | searching for changes |
|
1013 | 1047 | 1:29f0c6921ddd (draft) [tip ] A |
|
1014 | 1048 | |
|
1015 | 1049 | #if serve |
|
1016 | 1050 | |
|
1017 | 1051 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1018 | 1052 | $ cat hg.pid >> $DAEMON_PIDS |
|
1019 | 1053 | |
|
1020 | 1054 | $ hg incoming http://localhost:$HGPORT |
|
1021 | 1055 | comparing with http://localhost:$HGPORT/ |
|
1022 | 1056 | searching for changes |
|
1023 | 1057 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1024 | 1058 | $ hg outgoing http://localhost:$HGPORT |
|
1025 | 1059 | comparing with http://localhost:$HGPORT/ |
|
1026 | 1060 | searching for changes |
|
1027 | 1061 | 1:29f0c6921ddd (draft) [tip ] A |
|
1028 | 1062 | |
|
1029 | 1063 | $ killdaemons.py |
|
1030 | 1064 | |
|
1031 | 1065 | #endif |
|
1032 | 1066 | |
|
1033 | 1067 | This test issue 3814 |
|
1034 | 1068 | |
|
1035 | 1069 | (nothing to push but locally hidden changeset) |
|
1036 | 1070 | |
|
1037 | 1071 | $ cd .. |
|
1038 | 1072 | $ hg init repo-issue3814 |
|
1039 | 1073 | $ cd repo-issue3805 |
|
1040 | 1074 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
1041 | 1075 | pushing to ../repo-issue3814 |
|
1042 | 1076 | searching for changes |
|
1043 | 1077 | adding changesets |
|
1044 | 1078 | adding manifests |
|
1045 | 1079 | adding file changes |
|
1046 | 1080 | added 2 changesets with 2 changes to 2 files |
|
1047 | 1081 | 2 new obsolescence markers |
|
1048 | 1082 | $ hg out ../repo-issue3814 |
|
1049 | 1083 | comparing with ../repo-issue3814 |
|
1050 | 1084 | searching for changes |
|
1051 | 1085 | no changes found |
|
1052 | 1086 | [1] |
|
1053 | 1087 | |
|
1054 | 1088 | Test that a local tag blocks a changeset from being hidden |
|
1055 | 1089 | |
|
1056 | 1090 | $ hg tag -l visible -r 1 --hidden |
|
1057 | 1091 | $ hg log -G |
|
1058 | 1092 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
1059 | 1093 | | |
|
1060 | 1094 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A |
|
1061 | 1095 | |/ |
|
1062 | 1096 | o 0:d20a80d4def3 (draft) [ ] base |
|
1063 | 1097 | |
|
1064 | 1098 | Test that removing a local tag does not cause some commands to fail |
|
1065 | 1099 | |
|
1066 | 1100 | $ hg tag -l -r tip tiptag |
|
1067 | 1101 | $ hg tags |
|
1068 | 1102 | tiptag 3:323a9c3ddd91 |
|
1069 | 1103 | tip 3:323a9c3ddd91 |
|
1070 | 1104 | visible 1:29f0c6921ddd |
|
1071 | 1105 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1072 | 1106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1073 | 1107 | $ hg tags |
|
1074 | 1108 | visible 1:29f0c6921ddd |
|
1075 | 1109 | tip 1:29f0c6921ddd |
|
1076 | 1110 | |
|
1077 | 1111 | Test bundle overlay onto hidden revision |
|
1078 | 1112 | |
|
1079 | 1113 | $ cd .. |
|
1080 | 1114 | $ hg init repo-bundleoverlay |
|
1081 | 1115 | $ cd repo-bundleoverlay |
|
1082 | 1116 | $ echo "A" > foo |
|
1083 | 1117 | $ hg ci -Am "A" |
|
1084 | 1118 | adding foo |
|
1085 | 1119 | $ echo "B" >> foo |
|
1086 | 1120 | $ hg ci -m "B" |
|
1087 | 1121 | $ hg up 0 |
|
1088 | 1122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1089 | 1123 | $ echo "C" >> foo |
|
1090 | 1124 | $ hg ci -m "C" |
|
1091 | 1125 | created new head |
|
1092 | 1126 | $ hg log -G |
|
1093 | 1127 | @ 2:c186d7714947 (draft) [tip ] C |
|
1094 | 1128 | | |
|
1095 | 1129 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1096 | 1130 | |/ |
|
1097 | 1131 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1098 | 1132 | |
|
1099 | 1133 | |
|
1100 | 1134 | $ hg clone -r1 . ../other-bundleoverlay |
|
1101 | 1135 | adding changesets |
|
1102 | 1136 | adding manifests |
|
1103 | 1137 | adding file changes |
|
1104 | 1138 | added 2 changesets with 2 changes to 1 files |
|
1105 | 1139 | updating to branch default |
|
1106 | 1140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1107 | 1141 | $ cd ../other-bundleoverlay |
|
1108 | 1142 | $ echo "B+" >> foo |
|
1109 | 1143 | $ hg ci --amend -m "B+" |
|
1110 | 1144 | $ hg log -G --hidden |
|
1111 | 1145 | @ 3:b7d587542d40 (draft) [tip ] B+ |
|
1112 | 1146 | | |
|
1113 | 1147 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 |
|
1114 | 1148 | | | |
|
1115 | 1149 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B |
|
1116 | 1150 | |/ |
|
1117 | 1151 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1118 | 1152 | |
|
1119 | 1153 | |
|
1120 | 1154 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1121 | 1155 | comparing with ../repo-bundleoverlay |
|
1122 | 1156 | searching for changes |
|
1123 | 1157 | 1:44526ebb0f98 (draft) [ ] B |
|
1124 | 1158 | 2:c186d7714947 (draft) [tip ] C |
|
1125 | 1159 | $ hg log -G -R ../bundleoverlay.hg |
|
1126 | 1160 | o 4:c186d7714947 (draft) [tip ] C |
|
1127 | 1161 | | |
|
1128 | 1162 | | @ 3:b7d587542d40 (draft) [ ] B+ |
|
1129 | 1163 | |/ |
|
1130 | 1164 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1131 | 1165 | |
|
1132 | 1166 | |
|
1133 | 1167 | #if serve |
|
1134 | 1168 | |
|
1135 | 1169 | Test issue 4506 |
|
1136 | 1170 | |
|
1137 | 1171 | $ cd .. |
|
1138 | 1172 | $ hg init repo-issue4506 |
|
1139 | 1173 | $ cd repo-issue4506 |
|
1140 | 1174 | $ echo "0" > foo |
|
1141 | 1175 | $ hg add foo |
|
1142 | 1176 | $ hg ci -m "content-0" |
|
1143 | 1177 | |
|
1144 | 1178 | $ hg up null |
|
1145 | 1179 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1146 | 1180 | $ echo "1" > bar |
|
1147 | 1181 | $ hg add bar |
|
1148 | 1182 | $ hg ci -m "content-1" |
|
1149 | 1183 | created new head |
|
1150 | 1184 | $ hg up 0 |
|
1151 | 1185 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1152 | 1186 | $ hg graft 1 |
|
1153 | 1187 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1154 | 1188 | |
|
1155 | 1189 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1156 | 1190 | obsoleted 1 changesets |
|
1157 | 1191 | |
|
1158 | 1192 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1159 | 1193 | $ cat hg.pid >> $DAEMON_PIDS |
|
1160 | 1194 | |
|
1161 | 1195 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1162 | 1196 | 404 Not Found |
|
1163 | 1197 | [1] |
|
1164 | 1198 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1165 | 1199 | 200 Script output follows |
|
1166 | 1200 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1167 | 1201 | 200 Script output follows |
|
1168 | 1202 | |
|
1169 | 1203 | $ killdaemons.py |
|
1170 | 1204 | |
|
1171 | 1205 | #endif |
|
1172 | 1206 | |
|
1173 | 1207 | Test heads computation on pending index changes with obsolescence markers |
|
1174 | 1208 | $ cd .. |
|
1175 | 1209 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1176 | 1210 | > from mercurial import cmdutil, registrar |
|
1177 | 1211 | > from mercurial.i18n import _ |
|
1178 | 1212 | > |
|
1179 | 1213 | > cmdtable = {} |
|
1180 | 1214 | > command = registrar.command(cmdtable) |
|
1181 | 1215 | > @command(b"amendtransient",[], _('hg amendtransient [rev]')) |
|
1182 | 1216 | > def amend(ui, repo, *pats, **opts): |
|
1183 | 1217 | > def commitfunc(ui, repo, message, match, opts): |
|
1184 | 1218 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) |
|
1185 | 1219 | > opts['message'] = 'Test' |
|
1186 | 1220 | > opts['logfile'] = None |
|
1187 | 1221 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) |
|
1188 | 1222 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1189 | 1223 | > EOF |
|
1190 | 1224 | $ cat >> $HGRCPATH << EOF |
|
1191 | 1225 | > [extensions] |
|
1192 | 1226 | > testextension=$TESTTMP/test_extension.py |
|
1193 | 1227 | > EOF |
|
1194 | 1228 | $ hg init repo-issue-nativerevs-pending-changes |
|
1195 | 1229 | $ cd repo-issue-nativerevs-pending-changes |
|
1196 | 1230 | $ mkcommit a |
|
1197 | 1231 | $ mkcommit b |
|
1198 | 1232 | $ hg up ".^" |
|
1199 | 1233 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1200 | 1234 | $ echo aa > a |
|
1201 | 1235 | $ hg amendtransient |
|
1202 | 1236 | [1, 3] |
|
1203 | 1237 | |
|
1204 | 1238 | Test cache consistency for the visible filter |
|
1205 | 1239 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1206 | 1240 | bookmarks change |
|
1207 | 1241 | $ cd .. |
|
1208 | 1242 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1209 | 1243 | > import weakref |
|
1210 | 1244 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
1211 | 1245 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1212 | 1246 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1213 | 1247 | > def trhook(tr): |
|
1214 | 1248 | > repo = reporef() |
|
1215 | 1249 | > hidden1 = repoview.computehidden(repo) |
|
1216 | 1250 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1217 | 1251 | > if sorted(hidden1) != sorted(hidden): |
|
1218 | 1252 | > print "cache inconsistency" |
|
1219 | 1253 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1220 | 1254 | > orig(bkmstoreinst, *args, **kwargs) |
|
1221 | 1255 | > def extsetup(ui): |
|
1222 | 1256 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1223 | 1257 | > _bookmarkchanged) |
|
1224 | 1258 | > EOF |
|
1225 | 1259 | |
|
1226 | 1260 | $ hg init repo-cache-inconsistency |
|
1227 | 1261 | $ cd repo-issue-nativerevs-pending-changes |
|
1228 | 1262 | $ mkcommit a |
|
1229 | 1263 | a already tracked! |
|
1230 | 1264 | $ mkcommit b |
|
1231 | 1265 | $ hg id |
|
1232 | 1266 | 13bedc178fce tip |
|
1233 | 1267 | $ echo "hello" > b |
|
1234 | 1268 | $ hg commit --amend -m "message" |
|
1235 | 1269 | $ hg book bookb -r 13bedc178fce --hidden |
|
1236 | 1270 | $ hg log -r 13bedc178fce |
|
1237 | 1271 | 5:13bedc178fce (draft *obsolete*) [ bookb] add b |
|
1238 | 1272 | $ hg book -d bookb |
|
1239 | 1273 | $ hg log -r 13bedc178fce |
|
1240 | 1274 | abort: hidden revision '13bedc178fce'! |
|
1241 | 1275 | (use --hidden to access hidden revisions) |
|
1242 | 1276 | [255] |
|
1243 | 1277 | |
|
1244 | 1278 | Empty out the test extension, as it isn't compatible with later parts |
|
1245 | 1279 | of the test. |
|
1246 | 1280 | $ echo > $TESTTMP/test_extension.py |
|
1247 | 1281 | |
|
1248 | 1282 | Test ability to pull changeset with locally applying obsolescence markers |
|
1249 | 1283 | (issue4945) |
|
1250 | 1284 | |
|
1251 | 1285 | $ cd .. |
|
1252 | 1286 | $ hg init issue4845 |
|
1253 | 1287 | $ cd issue4845 |
|
1254 | 1288 | |
|
1255 | 1289 | $ echo foo > f0 |
|
1256 | 1290 | $ hg add f0 |
|
1257 | 1291 | $ hg ci -m '0' |
|
1258 | 1292 | $ echo foo > f1 |
|
1259 | 1293 | $ hg add f1 |
|
1260 | 1294 | $ hg ci -m '1' |
|
1261 | 1295 | $ echo foo > f2 |
|
1262 | 1296 | $ hg add f2 |
|
1263 | 1297 | $ hg ci -m '2' |
|
1264 | 1298 | |
|
1265 | 1299 | $ echo bar > f2 |
|
1266 | 1300 | $ hg commit --amend --config experimetnal.stabilization=createmarkers |
|
1267 | 1301 | $ hg log -G |
|
1268 | 1302 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1269 | 1303 | | |
|
1270 | 1304 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1271 | 1305 | | |
|
1272 | 1306 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1273 | 1307 | |
|
1274 | 1308 | $ hg log -G --hidden |
|
1275 | 1309 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1276 | 1310 | | |
|
1277 | 1311 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 |
|
1278 | 1312 | | | |
|
1279 | 1313 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 |
|
1280 | 1314 | |/ |
|
1281 | 1315 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1282 | 1316 | | |
|
1283 | 1317 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1284 | 1318 | |
|
1285 | 1319 | |
|
1286 | 1320 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1287 | 1321 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-39c978dc-backup.hg (glob) |
|
1288 | 1322 | $ hg debugobsolete |
|
1289 | 1323 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1290 | 1324 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1291 | 1325 | $ hg log -G |
|
1292 | 1326 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1293 | 1327 | | |
|
1294 | 1328 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1295 | 1329 | | |
|
1296 | 1330 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1297 | 1331 | |
|
1298 | 1332 | $ hg log -G --hidden |
|
1299 | 1333 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1300 | 1334 | | |
|
1301 | 1335 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1302 | 1336 | | |
|
1303 | 1337 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1304 | 1338 | |
|
1305 | 1339 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1306 | 1340 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1307 | 1341 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1308 | 1342 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1309 | 1343 | f27abbcc1f77fb409cf9160482fe619541e2d605 |
|
1310 | 1344 | obsmarkers -- 'sortdict()' |
|
1311 | 1345 | version: 1 (70 bytes) |
|
1312 | 1346 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1313 | 1347 | phase-heads -- 'sortdict()' |
|
1314 | 1348 | f27abbcc1f77fb409cf9160482fe619541e2d605 draft |
|
1315 | 1349 | |
|
1316 | 1350 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1317 | 1351 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg |
|
1318 | 1352 | searching for changes |
|
1319 | 1353 | no changes found |
|
1320 | 1354 | $ hg debugobsolete |
|
1321 | 1355 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1322 | 1356 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1323 | 1357 | $ hg log -G |
|
1324 | 1358 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1325 | 1359 | | |
|
1326 | 1360 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1327 | 1361 | | |
|
1328 | 1362 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1329 | 1363 | |
|
1330 | 1364 | $ hg log -G --hidden |
|
1331 | 1365 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1332 | 1366 | | |
|
1333 | 1367 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1334 | 1368 | | |
|
1335 | 1369 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1336 | 1370 | |
|
1337 | 1371 | |
|
1338 | 1372 | Testing that strip remove markers: |
|
1339 | 1373 | |
|
1340 | 1374 | $ hg strip -r 1 --config extensions.strip= |
|
1341 | 1375 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1342 | 1376 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) |
|
1343 | 1377 | $ hg debugobsolete |
|
1344 | 1378 | $ hg log -G |
|
1345 | 1379 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1346 | 1380 | |
|
1347 | 1381 | $ hg log -G --hidden |
|
1348 | 1382 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1349 | 1383 | |
|
1350 | 1384 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1351 | 1385 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1352 | 1386 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1353 | 1387 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1354 | 1388 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1355 | 1389 | obsmarkers -- 'sortdict()' |
|
1356 | 1390 | version: 1 (139 bytes) |
|
1357 | 1391 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1358 | 1392 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1359 | 1393 | phase-heads -- 'sortdict()' |
|
1360 | 1394 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1361 | 1395 | |
|
1362 | 1396 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1363 | 1397 | adding changesets |
|
1364 | 1398 | adding manifests |
|
1365 | 1399 | adding file changes |
|
1366 | 1400 | added 2 changesets with 2 changes to 2 files |
|
1367 | 1401 | 2 new obsolescence markers |
|
1368 | 1402 | (run 'hg update' to get a working copy) |
|
1369 | 1403 | $ hg debugobsolete | sort |
|
1370 | 1404 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1371 | 1405 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1372 | 1406 | $ hg log -G |
|
1373 | 1407 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1374 | 1408 | | |
|
1375 | 1409 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1376 | 1410 | | |
|
1377 | 1411 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1378 | 1412 | |
|
1379 | 1413 | $ hg log -G --hidden |
|
1380 | 1414 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1381 | 1415 | | |
|
1382 | 1416 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1383 | 1417 | | |
|
1384 | 1418 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1385 | 1419 | |
|
1386 | 1420 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1387 | 1421 | only a subset of those are displayed (because of --rev option) |
|
1388 | 1422 | $ hg init doindexrev |
|
1389 | 1423 | $ cd doindexrev |
|
1390 | 1424 | $ echo a > a |
|
1391 | 1425 | $ hg ci -Am a |
|
1392 | 1426 | adding a |
|
1393 | 1427 | $ hg ci --amend -m aa |
|
1394 | 1428 | $ echo b > b |
|
1395 | 1429 | $ hg ci -Am b |
|
1396 | 1430 | adding b |
|
1397 | 1431 | $ hg ci --amend -m bb |
|
1398 | 1432 | $ echo c > c |
|
1399 | 1433 | $ hg ci -Am c |
|
1400 | 1434 | adding c |
|
1401 | 1435 | $ hg ci --amend -m cc |
|
1402 | 1436 | $ echo d > d |
|
1403 | 1437 | $ hg ci -Am d |
|
1404 | 1438 | adding d |
|
1405 | 1439 | $ hg ci --amend -m dd --config experimental.stabilization.track-operation=1 |
|
1406 | 1440 | $ hg debugobsolete --index --rev "3+7" |
|
1407 | 1441 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) |
|
1408 | 1442 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) |
|
1409 | 1443 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1410 | 1444 | [ |
|
1411 | 1445 | { |
|
1412 | 1446 | "date": [0.0, 0], |
|
1413 | 1447 | "flag": 0, |
|
1414 | 1448 | "index": 1, |
|
1415 | 1449 | "metadata": {"user": "test"}, |
|
1416 | 1450 | "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1417 | 1451 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1418 | 1452 | }, |
|
1419 | 1453 | { |
|
1420 | 1454 | "date": [0.0, 0], |
|
1421 | 1455 | "flag": 0, |
|
1422 | 1456 | "index": 3, |
|
1423 | 1457 | "metadata": {"operation": "amend", "user": "test"}, |
|
1424 | 1458 | "precnode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1425 | 1459 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1426 | 1460 | } |
|
1427 | 1461 | ] |
|
1428 | 1462 | |
|
1429 | 1463 | Test the --delete option of debugobsolete command |
|
1430 | 1464 | $ hg debugobsolete --index |
|
1431 | 1465 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1432 | 1466 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1433 | 1467 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1434 | 1468 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1435 | 1469 | $ hg debugobsolete --delete 1 --delete 3 |
|
1436 | 1470 | deleted 2 obsolescence markers |
|
1437 | 1471 | $ hg debugobsolete |
|
1438 | 1472 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1439 | 1473 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1440 | 1474 | |
|
1441 | 1475 | Test adding changeset after obsmarkers affecting it |
|
1442 | 1476 | (eg: during pull, or unbundle) |
|
1443 | 1477 | |
|
1444 | 1478 | $ mkcommit e |
|
1445 | 1479 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1446 | 1480 | 1 changesets found |
|
1447 | 1481 | $ getid . |
|
1448 | 1482 | $ hg --config extensions.strip= strip -r . |
|
1449 | 1483 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1450 | 1484 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) |
|
1451 | 1485 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1452 | 1486 | $ hg unbundle ../bundle-2.hg |
|
1453 | 1487 | adding changesets |
|
1454 | 1488 | adding manifests |
|
1455 | 1489 | adding file changes |
|
1456 | 1490 | added 1 changesets with 1 changes to 1 files |
|
1457 | 1491 | (run 'hg update' to get a working copy) |
|
1458 | 1492 | $ hg log -G |
|
1459 | 1493 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1460 | 1494 | | |
|
1461 | 1495 | | o 6:4715cf767440 (draft) [ ] d |
|
1462 | 1496 | |/ |
|
1463 | 1497 | o 5:29346082e4a9 (draft) [ ] cc |
|
1464 | 1498 | | |
|
1465 | 1499 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1466 | 1500 | | |
|
1467 | 1501 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1468 | 1502 | |/ |
|
1469 | 1503 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1470 | 1504 | |
|
1471 | 1505 | |
|
1472 | 1506 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now