Show More
@@ -1,721 +1,721 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > graphlog= |
|
4 | 4 | > [phases] |
|
5 | 5 | > # public changeset are not obsolete |
|
6 | 6 | > publish=false |
|
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 id --debug --hidden -ir "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: obsolete feature is not enabled on this repo |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Enabling it |
|
39 | 39 | |
|
40 | 40 | $ cat > ../obs.py << EOF |
|
41 | 41 | > import mercurial.obsolete |
|
42 | 42 | > mercurial.obsolete._enabled = True |
|
43 | 43 | > EOF |
|
44 | 44 | $ echo '[extensions]' >> $HGRCPATH |
|
45 | 45 | $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH |
|
46 | 46 | |
|
47 | 47 | Killing a single changeset without replacement |
|
48 | 48 | |
|
49 | 49 | $ hg debugobsolete 0 |
|
50 | 50 | abort: changeset references must be full hexadecimal node identifiers |
|
51 | 51 | [255] |
|
52 | 52 | $ hg debugobsolete '00' |
|
53 | 53 | abort: changeset references must be full hexadecimal node identifiers |
|
54 | 54 | [255] |
|
55 | 55 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
56 | 56 | $ hg debugobsolete |
|
57 | 57 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'} |
|
58 | 58 | |
|
59 | 59 | (test that mercurial is not confused) |
|
60 | 60 | |
|
61 | 61 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
62 | 62 | $ hg tip |
|
63 | 63 | changeset: -1:000000000000 |
|
64 | 64 | tag: tip |
|
65 | 65 | user: |
|
66 | 66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | 67 | |
|
68 | 68 | $ hg up --hidden tip --quiet |
|
69 | 69 | $ cd .. |
|
70 | 70 | |
|
71 | 71 | Killing a single changeset with replacement |
|
72 | 72 | |
|
73 | 73 | $ hg init tmpb |
|
74 | 74 | $ cd tmpb |
|
75 | 75 | $ mkcommit a |
|
76 | 76 | $ mkcommit b |
|
77 | 77 | $ mkcommit original_c |
|
78 | 78 | $ hg up "desc('b')" |
|
79 | 79 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
80 | 80 | $ mkcommit new_c |
|
81 | 81 | created new head |
|
82 | 82 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
83 | 83 | $ hg debugobsolete --flag 12 `getid original_c` `getid new_c` -d '56 12' |
|
84 | 84 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
85 | 85 | 2:245bde4270cd add original_c |
|
86 | 86 | $ hg debugobsolete |
|
87 | 87 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
88 | 88 | |
|
89 | 89 | do it again (it read the obsstore before adding new changeset) |
|
90 | 90 | |
|
91 | 91 | $ hg up '.^' |
|
92 | 92 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
93 | 93 | $ mkcommit new_2_c |
|
94 | 94 | created new head |
|
95 | 95 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
96 | 96 | $ hg debugobsolete |
|
97 | 97 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
98 | 98 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
99 | 99 | |
|
100 | 100 | Register two markers with a missing node |
|
101 | 101 | |
|
102 | 102 | $ hg up '.^' |
|
103 | 103 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
104 | 104 | $ mkcommit new_3_c |
|
105 | 105 | created new head |
|
106 | 106 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
107 | 107 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
108 | 108 | $ hg debugobsolete |
|
109 | 109 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
110 | 110 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
111 | 111 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
112 | 112 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
113 | 113 | |
|
114 | 114 | Refuse pathological nullid successors |
|
115 | 115 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
116 | 116 | transaction abort! |
|
117 | 117 | rollback completed |
|
118 | 118 | abort: bad obsolescence marker detected: invalid successors nullid |
|
119 | 119 | [255] |
|
120 | 120 | |
|
121 | 121 | Check that graphlog detect that a changeset is obsolete: |
|
122 | 122 | |
|
123 | 123 | $ hg glog |
|
124 | 124 | @ changeset: 5:5601fb93a350 |
|
125 | 125 | | tag: tip |
|
126 | 126 | | parent: 1:7c3bad9141dc |
|
127 | 127 | | user: test |
|
128 | 128 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
129 | 129 | | summary: add new_3_c |
|
130 | 130 | | |
|
131 | 131 | o changeset: 1:7c3bad9141dc |
|
132 | 132 | | user: test |
|
133 | 133 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 | 134 | | summary: add b |
|
135 | 135 | | |
|
136 | 136 | o changeset: 0:1f0dee641bb7 |
|
137 | 137 | user: test |
|
138 | 138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
139 | 139 | summary: add a |
|
140 | 140 | |
|
141 | 141 | |
|
142 | 142 | check that heads does not report them |
|
143 | 143 | |
|
144 | 144 | $ hg heads |
|
145 | 145 | changeset: 5:5601fb93a350 |
|
146 | 146 | tag: tip |
|
147 | 147 | parent: 1:7c3bad9141dc |
|
148 | 148 | user: test |
|
149 | 149 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
150 | 150 | summary: add new_3_c |
|
151 | 151 | |
|
152 | 152 | $ hg heads --hidden |
|
153 | 153 | changeset: 5:5601fb93a350 |
|
154 | 154 | tag: tip |
|
155 | 155 | parent: 1:7c3bad9141dc |
|
156 | 156 | user: test |
|
157 | 157 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
158 | 158 | summary: add new_3_c |
|
159 | 159 | |
|
160 | 160 | changeset: 4:ca819180edb9 |
|
161 | 161 | parent: 1:7c3bad9141dc |
|
162 | 162 | user: test |
|
163 | 163 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | 164 | summary: add new_2_c |
|
165 | 165 | |
|
166 | 166 | changeset: 3:cdbce2fbb163 |
|
167 | 167 | parent: 1:7c3bad9141dc |
|
168 | 168 | user: test |
|
169 | 169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | 170 | summary: add new_c |
|
171 | 171 | |
|
172 | 172 | changeset: 2:245bde4270cd |
|
173 | 173 | user: test |
|
174 | 174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
175 | 175 | summary: add original_c |
|
176 | 176 | |
|
177 | 177 | |
|
178 | 178 | |
|
179 | 179 | check that summary does not report them |
|
180 | 180 | |
|
181 | 181 | $ hg init ../sink |
|
182 | 182 | $ echo '[paths]' >> .hg/hgrc |
|
183 | 183 | $ echo 'default=../sink' >> .hg/hgrc |
|
184 | 184 | $ hg summary --remote |
|
185 | 185 | parent: 5:5601fb93a350 tip |
|
186 | 186 | add new_3_c |
|
187 | 187 | branch: default |
|
188 | 188 | commit: (clean) |
|
189 | 189 | update: (current) |
|
190 | 190 | remote: 3 outgoing |
|
191 | 191 | |
|
192 | 192 | $ hg summary --remote --hidden |
|
193 | 193 | parent: 5:5601fb93a350 tip |
|
194 | 194 | add new_3_c |
|
195 | 195 | branch: default |
|
196 | 196 | commit: (clean) |
|
197 | 197 | update: 3 new changesets, 4 branch heads (merge) |
|
198 | 198 | remote: 3 outgoing |
|
199 | 199 | |
|
200 | 200 | check that various commands work well with filtering |
|
201 | 201 | |
|
202 | 202 | $ hg tip |
|
203 | 203 | changeset: 5:5601fb93a350 |
|
204 | 204 | tag: tip |
|
205 | 205 | parent: 1:7c3bad9141dc |
|
206 | 206 | user: test |
|
207 | 207 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
208 | 208 | summary: add new_3_c |
|
209 | 209 | |
|
210 | 210 | $ hg log -r 6 |
|
211 | 211 | abort: unknown revision '6'! |
|
212 | 212 | [255] |
|
213 | 213 | $ hg log -r 4 |
|
214 | 214 | abort: unknown revision '4'! |
|
215 | 215 | [255] |
|
216 | 216 | |
|
217 | 217 | Check that public changeset are not accounted as obsolete: |
|
218 | 218 | |
|
219 | 219 | $ hg --hidden phase --public 2 |
|
220 | 220 | $ hg --config 'extensions.graphlog=' glog |
|
221 | 221 | @ changeset: 5:5601fb93a350 |
|
222 | 222 | | tag: tip |
|
223 | 223 | | parent: 1:7c3bad9141dc |
|
224 | 224 | | user: test |
|
225 | 225 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
226 | 226 | | summary: add new_3_c |
|
227 | 227 | | |
|
228 | 228 | | o changeset: 2:245bde4270cd |
|
229 | 229 | |/ user: test |
|
230 | 230 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
231 | 231 | | summary: add original_c |
|
232 | 232 | | |
|
233 | 233 | o changeset: 1:7c3bad9141dc |
|
234 | 234 | | user: test |
|
235 | 235 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
236 | 236 | | summary: add b |
|
237 | 237 | | |
|
238 | 238 | o changeset: 0:1f0dee641bb7 |
|
239 | 239 | user: test |
|
240 | 240 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
241 | 241 | summary: add a |
|
242 | 242 | |
|
243 | 243 | |
|
244 | 244 | And that bumped changeset are detected |
|
245 | 245 | -------------------------------------- |
|
246 | 246 | |
|
247 | 247 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
248 | 248 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
249 | 249 | the public changeset |
|
250 | 250 | |
|
251 | 251 | $ hg log --hidden -r 'bumped()' |
|
252 | 252 | changeset: 5:5601fb93a350 |
|
253 | 253 | tag: tip |
|
254 | 254 | parent: 1:7c3bad9141dc |
|
255 | 255 | user: test |
|
256 | 256 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
257 | 257 | summary: add new_3_c |
|
258 | 258 | |
|
259 | 259 | |
|
260 | 260 | And that we can't push bumped changeset |
|
261 | 261 | |
|
262 | 262 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
263 | 263 | pushing to ../tmpa |
|
264 | 264 | searching for changes |
|
265 | 265 | warning: repository is unrelated |
|
266 | 266 | adding changesets |
|
267 | 267 | adding manifests |
|
268 | 268 | adding file changes |
|
269 | 269 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
270 | 270 | $ hg push ../tmpa |
|
271 | 271 | pushing to ../tmpa |
|
272 | 272 | searching for changes |
|
273 | 273 | abort: push includes bumped changeset: 5601fb93a350! |
|
274 | 274 | [255] |
|
275 | 275 | |
|
276 | 276 | Fixing "bumped" situation |
|
277 | 277 | We need to create a clone of 5 and add a special marker with a flag |
|
278 | 278 | |
|
279 | 279 | $ hg up '5^' |
|
280 | 280 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
281 | 281 | $ hg revert -ar 5 |
|
282 | 282 | adding new_3_c |
|
283 | 283 | $ hg ci -m 'add n3w_3_c' |
|
284 | 284 | created new head |
|
285 | 285 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
286 | 286 | $ hg log -r 'bumped()' |
|
287 | 287 | $ hg log -G |
|
288 | 288 | @ changeset: 6:6f9641995072 |
|
289 | 289 | | tag: tip |
|
290 | 290 | | parent: 1:7c3bad9141dc |
|
291 | 291 | | user: test |
|
292 | 292 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
293 | 293 | | summary: add n3w_3_c |
|
294 | 294 | | |
|
295 | 295 | | o changeset: 2:245bde4270cd |
|
296 | 296 | |/ user: test |
|
297 | 297 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
298 | 298 | | summary: add original_c |
|
299 | 299 | | |
|
300 | 300 | o changeset: 1:7c3bad9141dc |
|
301 | 301 | | user: test |
|
302 | 302 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
303 | 303 | | summary: add b |
|
304 | 304 | | |
|
305 | 305 | o changeset: 0:1f0dee641bb7 |
|
306 | 306 | user: test |
|
307 | 307 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | 308 | summary: add a |
|
309 | 309 | |
|
310 | 310 | |
|
311 | 311 | |
|
312 | 312 | |
|
313 | 313 | $ cd .. |
|
314 | 314 | |
|
315 | 315 | Exchange Test |
|
316 | 316 | ============================ |
|
317 | 317 | |
|
318 | 318 | Destination repo does not have any data |
|
319 | 319 | --------------------------------------- |
|
320 | 320 | |
|
321 | 321 | Try to pull markers |
|
322 | 322 | (extinct changeset are excluded but marker are pushed) |
|
323 | 323 | |
|
324 | 324 | $ hg init tmpc |
|
325 | 325 | $ cd tmpc |
|
326 | 326 | $ hg pull ../tmpb |
|
327 | 327 | pulling from ../tmpb |
|
328 | 328 | requesting all changes |
|
329 | 329 | adding changesets |
|
330 | 330 | adding manifests |
|
331 | 331 | adding file changes |
|
332 | 332 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
333 | 333 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
334 | 334 | $ hg debugobsolete |
|
335 | 335 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
336 | 336 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
337 | 337 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
338 | 338 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
339 | 339 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
340 | 340 | |
|
341 | 341 | Rollback//Transaction support |
|
342 | 342 | |
|
343 | 343 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
344 | 344 | $ hg debugobsolete |
|
345 | 345 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
346 | 346 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
347 | 347 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
348 | 348 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
349 | 349 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
350 | 350 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 {'date': '1340 0', 'user': 'test'} |
|
351 | 351 | $ hg rollback -n |
|
352 | 352 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
353 | 353 | $ hg rollback |
|
354 | 354 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
355 | 355 | $ hg debugobsolete |
|
356 | 356 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
357 | 357 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
358 | 358 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
359 | 359 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
360 | 360 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
361 | 361 | |
|
362 | 362 | $ cd .. |
|
363 | 363 | |
|
364 |
Try to pu |
|
|
364 | Try to push markers | |
|
365 | 365 | |
|
366 | 366 | $ hg init tmpd |
|
367 | 367 | $ hg -R tmpb push tmpd |
|
368 | 368 | pushing to tmpd |
|
369 | 369 | searching for changes |
|
370 | 370 | adding changesets |
|
371 | 371 | adding manifests |
|
372 | 372 | adding file changes |
|
373 | 373 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
374 | 374 | $ hg -R tmpd debugobsolete |
|
375 | 375 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
376 | 376 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
377 | 377 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
378 | 378 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
379 | 379 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
380 | 380 | |
|
381 | 381 | Check obsolete keys are exchanged only if source has an obsolete store |
|
382 | 382 | |
|
383 | 383 | $ hg init empty |
|
384 | 384 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
385 | 385 | pushing to tmpd |
|
386 | 386 | no changes found |
|
387 | 387 | listkeys phases |
|
388 | 388 | listkeys bookmarks |
|
389 | 389 | [1] |
|
390 | 390 | |
|
391 | 391 | clone support |
|
392 | 392 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
393 | 393 | |
|
394 | 394 | $ hg clone tmpb clone-dest |
|
395 | 395 | updating to branch default |
|
396 | 396 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
397 | 397 | $ hg -R clone-dest log -G --hidden |
|
398 | 398 | @ changeset: 6:6f9641995072 |
|
399 | 399 | | tag: tip |
|
400 | 400 | | parent: 1:7c3bad9141dc |
|
401 | 401 | | user: test |
|
402 | 402 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
403 | 403 | | summary: add n3w_3_c |
|
404 | 404 | | |
|
405 | 405 | | x changeset: 5:5601fb93a350 |
|
406 | 406 | |/ parent: 1:7c3bad9141dc |
|
407 | 407 | | user: test |
|
408 | 408 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
409 | 409 | | summary: add new_3_c |
|
410 | 410 | | |
|
411 | 411 | | x changeset: 4:ca819180edb9 |
|
412 | 412 | |/ parent: 1:7c3bad9141dc |
|
413 | 413 | | user: test |
|
414 | 414 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
415 | 415 | | summary: add new_2_c |
|
416 | 416 | | |
|
417 | 417 | | x changeset: 3:cdbce2fbb163 |
|
418 | 418 | |/ parent: 1:7c3bad9141dc |
|
419 | 419 | | user: test |
|
420 | 420 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
421 | 421 | | summary: add new_c |
|
422 | 422 | | |
|
423 | 423 | | o changeset: 2:245bde4270cd |
|
424 | 424 | |/ user: test |
|
425 | 425 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
426 | 426 | | summary: add original_c |
|
427 | 427 | | |
|
428 | 428 | o changeset: 1:7c3bad9141dc |
|
429 | 429 | | user: test |
|
430 | 430 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
431 | 431 | | summary: add b |
|
432 | 432 | | |
|
433 | 433 | o changeset: 0:1f0dee641bb7 |
|
434 | 434 | user: test |
|
435 | 435 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
436 | 436 | summary: add a |
|
437 | 437 | |
|
438 | 438 | $ hg -R clone-dest debugobsolete |
|
439 | 439 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
440 | 440 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
441 | 441 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
442 | 442 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
443 | 443 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
444 | 444 | |
|
445 | 445 | |
|
446 | 446 | Destination repo have existing data |
|
447 | 447 | --------------------------------------- |
|
448 | 448 | |
|
449 | 449 | On pull |
|
450 | 450 | |
|
451 | 451 | $ hg init tmpe |
|
452 | 452 | $ cd tmpe |
|
453 | 453 | $ hg debugobsolete -d '1339 0' 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 |
|
454 | 454 | $ hg pull ../tmpb |
|
455 | 455 | pulling from ../tmpb |
|
456 | 456 | requesting all changes |
|
457 | 457 | adding changesets |
|
458 | 458 | adding manifests |
|
459 | 459 | adding file changes |
|
460 | 460 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
461 | 461 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
462 | 462 | $ hg debugobsolete |
|
463 | 463 | 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'} |
|
464 | 464 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
465 | 465 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
466 | 466 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
467 | 467 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
468 | 468 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
469 | 469 | |
|
470 | 470 | |
|
471 | 471 | On push |
|
472 | 472 | |
|
473 | 473 | $ hg push ../tmpc |
|
474 | 474 | pushing to ../tmpc |
|
475 | 475 | searching for changes |
|
476 | 476 | no changes found |
|
477 | 477 | [1] |
|
478 | 478 | $ hg -R ../tmpc debugobsolete |
|
479 | 479 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} |
|
480 | 480 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} |
|
481 | 481 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} |
|
482 | 482 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} |
|
483 | 483 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'} |
|
484 | 484 | 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'} |
|
485 | 485 | |
|
486 | 486 | detect outgoing obsolete and unstable |
|
487 | 487 | --------------------------------------- |
|
488 | 488 | |
|
489 | 489 | |
|
490 | 490 | $ hg glog |
|
491 | 491 | o changeset: 3:6f9641995072 |
|
492 | 492 | | tag: tip |
|
493 | 493 | | parent: 1:7c3bad9141dc |
|
494 | 494 | | user: test |
|
495 | 495 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
496 | 496 | | summary: add n3w_3_c |
|
497 | 497 | | |
|
498 | 498 | | o changeset: 2:245bde4270cd |
|
499 | 499 | |/ user: test |
|
500 | 500 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
501 | 501 | | summary: add original_c |
|
502 | 502 | | |
|
503 | 503 | o changeset: 1:7c3bad9141dc |
|
504 | 504 | | user: test |
|
505 | 505 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
506 | 506 | | summary: add b |
|
507 | 507 | | |
|
508 | 508 | o changeset: 0:1f0dee641bb7 |
|
509 | 509 | user: test |
|
510 | 510 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
511 | 511 | summary: add a |
|
512 | 512 | |
|
513 | 513 | $ hg up 'desc("n3w_3_c")' |
|
514 | 514 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
515 | 515 | $ mkcommit original_d |
|
516 | 516 | $ mkcommit original_e |
|
517 | 517 | $ hg debugobsolete `getid original_d` -d '0 0' |
|
518 | 518 | $ hg log -r 'obsolete()' |
|
519 | 519 | changeset: 4:94b33453f93b |
|
520 | 520 | user: test |
|
521 | 521 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
522 | 522 | summary: add original_d |
|
523 | 523 | |
|
524 | 524 | $ hg glog -r '::unstable()' |
|
525 | 525 | @ changeset: 5:cda648ca50f5 |
|
526 | 526 | | tag: tip |
|
527 | 527 | | user: test |
|
528 | 528 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
529 | 529 | | summary: add original_e |
|
530 | 530 | | |
|
531 | 531 | x changeset: 4:94b33453f93b |
|
532 | 532 | | user: test |
|
533 | 533 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
534 | 534 | | summary: add original_d |
|
535 | 535 | | |
|
536 | 536 | o changeset: 3:6f9641995072 |
|
537 | 537 | | parent: 1:7c3bad9141dc |
|
538 | 538 | | user: test |
|
539 | 539 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
540 | 540 | | summary: add n3w_3_c |
|
541 | 541 | | |
|
542 | 542 | o changeset: 1:7c3bad9141dc |
|
543 | 543 | | user: test |
|
544 | 544 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
545 | 545 | | summary: add b |
|
546 | 546 | | |
|
547 | 547 | o changeset: 0:1f0dee641bb7 |
|
548 | 548 | user: test |
|
549 | 549 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
550 | 550 | summary: add a |
|
551 | 551 | |
|
552 | 552 | |
|
553 | 553 | refuse to push obsolete changeset |
|
554 | 554 | |
|
555 | 555 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
556 | 556 | pushing to ../tmpc/ |
|
557 | 557 | searching for changes |
|
558 | 558 | abort: push includes obsolete changeset: 94b33453f93b! |
|
559 | 559 | [255] |
|
560 | 560 | |
|
561 | 561 | refuse to push unstable changeset |
|
562 | 562 | |
|
563 | 563 | $ hg push ../tmpc/ |
|
564 | 564 | pushing to ../tmpc/ |
|
565 | 565 | searching for changes |
|
566 | 566 | abort: push includes unstable changeset: cda648ca50f5! |
|
567 | 567 | [255] |
|
568 | 568 | |
|
569 | 569 | Test that extinct changeset are properly detected |
|
570 | 570 | |
|
571 | 571 | $ hg log -r 'extinct()' |
|
572 | 572 | |
|
573 | 573 | Don't try to push extinct changeset |
|
574 | 574 | |
|
575 | 575 | $ hg init ../tmpf |
|
576 | 576 | $ hg out ../tmpf |
|
577 | 577 | comparing with ../tmpf |
|
578 | 578 | searching for changes |
|
579 | 579 | changeset: 0:1f0dee641bb7 |
|
580 | 580 | user: test |
|
581 | 581 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
582 | 582 | summary: add a |
|
583 | 583 | |
|
584 | 584 | changeset: 1:7c3bad9141dc |
|
585 | 585 | user: test |
|
586 | 586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
587 | 587 | summary: add b |
|
588 | 588 | |
|
589 | 589 | changeset: 2:245bde4270cd |
|
590 | 590 | user: test |
|
591 | 591 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
592 | 592 | summary: add original_c |
|
593 | 593 | |
|
594 | 594 | changeset: 3:6f9641995072 |
|
595 | 595 | parent: 1:7c3bad9141dc |
|
596 | 596 | user: test |
|
597 | 597 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
598 | 598 | summary: add n3w_3_c |
|
599 | 599 | |
|
600 | 600 | changeset: 4:94b33453f93b |
|
601 | 601 | user: test |
|
602 | 602 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
603 | 603 | summary: add original_d |
|
604 | 604 | |
|
605 | 605 | changeset: 5:cda648ca50f5 |
|
606 | 606 | tag: tip |
|
607 | 607 | user: test |
|
608 | 608 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
609 | 609 | summary: add original_e |
|
610 | 610 | |
|
611 | 611 | $ hg push ../tmpf -f # -f because be push unstable too |
|
612 | 612 | pushing to ../tmpf |
|
613 | 613 | searching for changes |
|
614 | 614 | adding changesets |
|
615 | 615 | adding manifests |
|
616 | 616 | adding file changes |
|
617 | 617 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
618 | 618 | |
|
619 | 619 | no warning displayed |
|
620 | 620 | |
|
621 | 621 | $ hg push ../tmpf |
|
622 | 622 | pushing to ../tmpf |
|
623 | 623 | searching for changes |
|
624 | 624 | no changes found |
|
625 | 625 | [1] |
|
626 | 626 | |
|
627 | 627 | Do not warn about new head when the new head is a successors of a remote one |
|
628 | 628 | |
|
629 | 629 | $ hg glog |
|
630 | 630 | @ changeset: 5:cda648ca50f5 |
|
631 | 631 | | tag: tip |
|
632 | 632 | | user: test |
|
633 | 633 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
634 | 634 | | summary: add original_e |
|
635 | 635 | | |
|
636 | 636 | x changeset: 4:94b33453f93b |
|
637 | 637 | | user: test |
|
638 | 638 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
639 | 639 | | summary: add original_d |
|
640 | 640 | | |
|
641 | 641 | o changeset: 3:6f9641995072 |
|
642 | 642 | | parent: 1:7c3bad9141dc |
|
643 | 643 | | user: test |
|
644 | 644 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
645 | 645 | | summary: add n3w_3_c |
|
646 | 646 | | |
|
647 | 647 | | o changeset: 2:245bde4270cd |
|
648 | 648 | |/ user: test |
|
649 | 649 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
650 | 650 | | summary: add original_c |
|
651 | 651 | | |
|
652 | 652 | o changeset: 1:7c3bad9141dc |
|
653 | 653 | | user: test |
|
654 | 654 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
655 | 655 | | summary: add b |
|
656 | 656 | | |
|
657 | 657 | o changeset: 0:1f0dee641bb7 |
|
658 | 658 | user: test |
|
659 | 659 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
660 | 660 | summary: add a |
|
661 | 661 | |
|
662 | 662 | $ hg up -q 'desc(n3w_3_c)' |
|
663 | 663 | $ mkcommit obsolete_e |
|
664 | 664 | created new head |
|
665 | 665 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` |
|
666 | 666 | $ hg push ../tmpf |
|
667 | 667 | pushing to ../tmpf |
|
668 | 668 | searching for changes |
|
669 | 669 | adding changesets |
|
670 | 670 | adding manifests |
|
671 | 671 | adding file changes |
|
672 | 672 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
673 | 673 | |
|
674 | 674 | check hgweb does not explode |
|
675 | 675 | ==================================== |
|
676 | 676 | |
|
677 | 677 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
678 | 678 | adding changesets |
|
679 | 679 | adding manifests |
|
680 | 680 | adding file changes |
|
681 | 681 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
682 | 682 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
683 | 683 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
684 | 684 | > do |
|
685 | 685 | > hg debugobsolete $node |
|
686 | 686 | > done |
|
687 | 687 | $ hg up tip |
|
688 | 688 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
689 | 689 | |
|
690 | 690 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
691 | 691 | $ cat hg.pid >> $DAEMON_PIDS |
|
692 | 692 | |
|
693 | 693 | check changelog view |
|
694 | 694 | |
|
695 | 695 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/' |
|
696 | 696 | 200 Script output follows |
|
697 | 697 | |
|
698 | 698 | check graph view |
|
699 | 699 | |
|
700 | 700 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph' |
|
701 | 701 | 200 Script output follows |
|
702 | 702 | |
|
703 | 703 | check filelog view |
|
704 | 704 | |
|
705 | 705 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar' |
|
706 | 706 | 200 Script output follows |
|
707 | 707 | $ kill `cat hg.pid` |
|
708 | 708 | |
|
709 | 709 | Checking _enable=False warning if obsolete marker exists |
|
710 | 710 | |
|
711 | 711 | $ echo '[extensions]' >> $HGRCPATH |
|
712 | 712 | $ echo "obs=!" >> $HGRCPATH |
|
713 | 713 | $ hg log -r tip |
|
714 | 714 | obsolete feature not enabled but 68 markers found! |
|
715 | 715 | changeset: 68:c15e9edfca13 |
|
716 | 716 | tag: tip |
|
717 | 717 | parent: 7:50c51b361e60 |
|
718 | 718 | user: test |
|
719 | 719 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
720 | 720 | summary: add celestine |
|
721 | 721 |
General Comments 0
You need to be logged in to leave comments.
Login now