tests/test-empty.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 09 Jun 2021 01:10:34 +0200
changeset 47442 d1c1fd7ac46d
parent 46314 95a615dd77bf
child 47447 377d8fc20e34
permissions -rw-r--r--
clone: use "official" API to create local clone destination This make sure we have a properly created, fully functional repository early. This will be useful to simply the hardlink/copy phases of the local clone to make it share more of its logic with the similar "stream" cloning. This has a minor impact of the test and the resulting repository has is better initialized (eg: the `wcache` directory is pre-created.) Differential Revision: https://phab.mercurial-scm.org/D10850

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
  wcache

Should be empty:

  $ ls .hg/store

  $ cd ..