view tests/test-empty.t @ 48688:053a5bf508da

discovery: port _postprocessobsolete() changes from evolve, add tests Let's make this function obsolescence-aware as well. Now we check that revisions are not obsolete first, and only then check that they are going to be common after exchange. The tests make sure that rewriting changesets doesn't confuse head computation. They rely on experimental.single-head-per-branch feature to show that remote correctly sees the expected result (i.e. either aborts the push or allows it to succeed). They are ported from evolve as well. Differential Revision: https://phab.mercurial-scm.org/D12098
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 04 Jan 2022 23:38:39 +0300
parents 7ee07e1a25c0
children 2f2682f40ea0
line wrap: on
line source

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 (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
  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
  dirstate
  hgrc
  requires
  store
  wcache

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

  $ ls .hg/store
  requires

  $ cd ..