Mercurial > hg
comparison tests/test-wireproto-exchangev2-shallow.t @ 46314:95a615dd77bf
clone: make sure we warm the cache after a clone
This work around any deviciency/limitation of the clone process. In our case
this ensure the persistent nodemap exist with valid content.
Ideally, the cloning process would also do "the right thing". However since
older server will never be able to do "the right thing". The local workaround
will be necessary anyway.
I am not worried by the performance impact of this as `hg clone` is non-instant
on large repositories where is could matters. Warming the cache if they are
already correct is very fast. And if they are not already warm, this seems like
a good time to do so.
This impact various test as more cache are now warmed sooner, all the change
should be harmless.
Differential Revision: https://phab.mercurial-scm.org/D9789
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 15 Jan 2021 12:41:38 +0100 |
parents | 1b5aeb928c8f |
children | c4787ea85cc7 |
comparison
equal
deleted
inserted
replaced
46313:4cde46f62ebf | 46314:95a615dd77bf |
---|---|
166 dir1/e: remote created -> g | 166 dir1/e: remote created -> g |
167 getting dir1/e | 167 getting dir1/e |
168 dir1/f: remote created -> g | 168 dir1/f: remote created -> g |
169 getting dir1/f | 169 getting dir1/f |
170 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | 170 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
171 updating the branch cache | |
171 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) | 172 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) |
172 | 173 |
173 $ sqlite3 -line client-shallow-1/.hg/store/db.sqlite << EOF | 174 $ sqlite3 -line client-shallow-1/.hg/store/db.sqlite << EOF |
174 > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC; | 175 > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC; |
175 > EOF | 176 > EOF |
331 dir0/c: remote created -> g | 332 dir0/c: remote created -> g |
332 getting dir0/c | 333 getting dir0/c |
333 dir0/d: remote created -> g | 334 dir0/d: remote created -> g |
334 getting dir0/d | 335 getting dir0/d |
335 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 336 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
337 updating the branch cache | |
336 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) | 338 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) |
337 | 339 |
338 $ sqlite3 -line client-shallow-narrow-1/.hg/store/db.sqlite << EOF | 340 $ sqlite3 -line client-shallow-narrow-1/.hg/store/db.sqlite << EOF |
339 > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC; | 341 > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC; |
340 > EOF | 342 > EOF |
467 dir1/e: remote created -> g | 469 dir1/e: remote created -> g |
468 getting dir1/e | 470 getting dir1/e |
469 dir1/f: remote created -> g | 471 dir1/f: remote created -> g |
470 getting dir1/f | 472 getting dir1/f |
471 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | 473 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
474 updating the branch cache | |
472 (sent 6 HTTP requests and * bytes; received * bytes in responses) (glob) | 475 (sent 6 HTTP requests and * bytes; received * bytes in responses) (glob) |
473 | 476 |
474 Incremental pull of shallow clone fetches new changesets | 477 Incremental pull of shallow clone fetches new changesets |
475 | 478 |
476 $ hg --cwd client-shallow-2 --debug pull http://localhost:$HGPORT | 479 $ hg --cwd client-shallow-2 --debug pull http://localhost:$HGPORT |