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