tests/test-empty.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 14 Feb 2023 23:05:18 +0100
changeset 50002 e358f6e0e50e
parent 49825 2f2682f40ea0
child 50195 11e6eee4b063
permissions -rw-r--r--
dirstate: do not write an empty dirstate just for backup This will get in the way when we get more strict about holding the lock when writing the dirstate. Instead, we simply don't copy dirstate files around if there are None at backup time. A couple of tests are impacted they no longer need to backup such "empty" dirstate.

Create an empty repo:

  $ hg init a
  $ cd a

Try some commands:

  $ hg log
  $ hg grep wah
  [1]
  $ hg manifest
  $ hg verify -q

Check the basic files created:

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

Should be empty (except for the "basic" requires):

  $ ls .hg/store
  requires

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 -q
  $ ls .hg
  00changelog.i
  cache
  hgrc
  requires
  store
  wcache

Should be empty (except for the "basic" requires):

  $ ls .hg/store
  requires

  $ cd ..