tests/test-empty.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 15 Jan 2021 12:41:38 +0100
changeset 46314 95a615dd77bf
parent 40794 d5622dfe4ba3
child 47442 d1c1fd7ac46d
permissions -rw-r--r--
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

Create an empty repo:

  $ hg init a
  $ cd a

Try some commands:

  $ hg log
  $ hg grep wah
  [1]
  $ hg manifest
  $ hg verify
  checking changesets
  checking manifests
  crosschecking files in changesets and manifests
  checking files
  checked 0 changesets with 0 changes to 0 files

Check the basic files created:

  $ ls .hg
  00changelog.i
  cache
  requires
  store
  wcache

Should be empty:

  $ ls .hg/store

Poke at a clone:

  $ cd ..
  $ hg clone a b
  updating to branch default
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ cd b
  $ hg verify
  checking changesets
  checking manifests
  crosschecking files in changesets and manifests
  checking files
  checked 0 changesets with 0 changes to 0 files
  $ ls .hg
  00changelog.i
  cache
  hgrc
  requires
  store

Should be empty:

  $ ls .hg/store

  $ cd ..