view tests/test-empty.t @ 33803:707750e5310b

localrepo: use peer interfaces We now have a formal abstract base class for peers. Let's transition the peer classes in localrepo to it. As part of the transition, we reorder methods so they are grouped by interface and match the order they are defined in the interface. We also had to change self.ui from an instance attribute to a property to satisfy the @abstractproperty requirement. As part of this change, we uncover the first "bug" as part of enforcing interfaces: stream_out() wasn't implemented on localpeer! This isn't technically a bug since the repo isn't advertising the stream capability, so clients shouldn't be attempting to call it. But I don't think there's a good reason why this is the case. We implement a dummy method to satisfy the interface requriements. We can make localpeer instances streamable as a future enhancement. # no-check-commit Differential Revision: https://phab.mercurial-scm.org/D335
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 09 Aug 2017 23:52:25 -0700
parents ab2362e1672e
children f1186c292d03
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
  0 files, 0 changesets, 0 total revisions

Check the basic files created:

  $ ls .hg
  00changelog.i
  requires
  store

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
  0 files, 0 changesets, 0 total revisions
  $ ls .hg
  00changelog.i
  hgrc
  requires
  store

Should be empty:

  $ ls .hg/store

  $ cd ..