Show More
@@ -1242,3 +1242,101 b' Intermediary parents are on different br' | |||||
1242 | C 3:4a546028fa8f (inactive) |
|
1242 | C 3:4a546028fa8f (inactive) | |
1243 | B 1:0bc7d348d965 (inactive) |
|
1243 | B 1:0bc7d348d965 (inactive) | |
1244 | $ cd .. |
|
1244 | $ cd .. | |
|
1245 | ||||
|
1246 | Check that the cache are not written too early | |||
|
1247 | ---------------------------------------------- | |||
|
1248 | ||||
|
1249 | $ hg log -R branchmap-testing1 -G | |||
|
1250 | o changeset: 3:71ca9a6d524e | |||
|
1251 | |\ branch: A | |||
|
1252 | | | tag: tip | |||
|
1253 | | | parent: 2:a3b807b3ff0b | |||
|
1254 | | | parent: 1:99ba08759bc7 | |||
|
1255 | | | user: debugbuilddag | |||
|
1256 | | | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
1257 | | | summary: r3 | |||
|
1258 | | | | |||
|
1259 | | o changeset: 2:a3b807b3ff0b | |||
|
1260 | | | branch: A | |||
|
1261 | | | parent: 0:2ab8003a1750 | |||
|
1262 | | | user: debugbuilddag | |||
|
1263 | | | date: Thu Jan 01 00:00:02 1970 +0000 | |||
|
1264 | | | summary: r2 | |||
|
1265 | | | | |||
|
1266 | o | changeset: 1:99ba08759bc7 | |||
|
1267 | |/ branch: A | |||
|
1268 | | tag: p1 | |||
|
1269 | | user: debugbuilddag | |||
|
1270 | | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
1271 | | summary: r1 | |||
|
1272 | | | |||
|
1273 | o changeset: 0:2ab8003a1750 | |||
|
1274 | branch: A | |||
|
1275 | tag: base | |||
|
1276 | user: debugbuilddag | |||
|
1277 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
1278 | summary: r0 | |||
|
1279 | ||||
|
1280 | $ hg bundle -R branchmap-testing1 --base 1 bundle.hg --rev 'head()' | |||
|
1281 | 2 changesets found | |||
|
1282 | ||||
|
1283 | Unbundling revision should warm the served cache | |||
|
1284 | ||||
|
1285 | $ hg clone branchmap-testing1 --rev 1 branchmap-update-01 | |||
|
1286 | adding changesets | |||
|
1287 | adding manifests | |||
|
1288 | adding file changes | |||
|
1289 | added 2 changesets with 0 changes to 0 files | |||
|
1290 | new changesets 2ab8003a1750:99ba08759bc7 | |||
|
1291 | updating to branch A | |||
|
1292 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1293 | $ cat branchmap-update-01/.hg/cache/branch2-served | |||
|
1294 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 | |||
|
1295 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A | |||
|
1296 | $ hg -R branchmap-update-01 unbundle bundle.hg | |||
|
1297 | adding changesets | |||
|
1298 | adding manifests | |||
|
1299 | adding file changes | |||
|
1300 | added 2 changesets with 0 changes to 0 files | |||
|
1301 | new changesets a3b807b3ff0b:71ca9a6d524e (2 drafts) | |||
|
1302 | (run 'hg update' to get a working copy) | |||
|
1303 | $ cat branchmap-update-01/.hg/cache/branch2-served | |||
|
1304 | 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3 | |||
|
1305 | 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A | |||
|
1306 | ||||
|
1307 | aborted Unbundle should not update the on disk cache | |||
|
1308 | ||||
|
1309 | $ cat >> simplehook.py << EOF | |||
|
1310 | > import sys | |||
|
1311 | > from mercurial import node | |||
|
1312 | > from mercurial import branchmap | |||
|
1313 | > def hook(ui, repo, *args, **kwargs): | |||
|
1314 | > s = repo.filtered(b"served") | |||
|
1315 | > s.branchmap() | |||
|
1316 | > return 1 | |||
|
1317 | > EOF | |||
|
1318 | $ hg clone branchmap-testing1 --rev 1 branchmap-update-02 | |||
|
1319 | adding changesets | |||
|
1320 | adding manifests | |||
|
1321 | adding file changes | |||
|
1322 | added 2 changesets with 0 changes to 0 files | |||
|
1323 | new changesets 2ab8003a1750:99ba08759bc7 | |||
|
1324 | updating to branch A | |||
|
1325 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1326 | ||||
|
1327 | $ cat branchmap-update-02/.hg/cache/branch2-served | |||
|
1328 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 | |||
|
1329 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A | |||
|
1330 | $ hg -R branchmap-update-02 unbundle bundle.hg --config "hooks.pretxnclose=python:$TESTTMP/simplehook.py:hook" | |||
|
1331 | adding changesets | |||
|
1332 | adding manifests | |||
|
1333 | adding file changes | |||
|
1334 | transaction abort! | |||
|
1335 | rollback completed | |||
|
1336 | abort: pretxnclose hook failed | |||
|
1337 | [40] | |||
|
1338 | $ cat branchmap-update-02/.hg/cache/branch2-served | |||
|
1339 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 (missing-correct-output !) | |||
|
1340 | 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A (missing-correct-output !) | |||
|
1341 | 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3 (known-bad-output !) | |||
|
1342 | 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A (known-bad-output !) |
General Comments 0
You need to be logged in to leave comments.
Login now