tests/test-empty.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 23 Sep 2013 20:23:25 +0900
branchstable
changeset 19769 83d79a00cc24
parent 16913 f2719b387380
child 19929 ab2362e1672e
permissions -rw-r--r--
help: use full name of extensions to look up them for keyword search Before this patch, "hg help -k KEYWORD" fails, if there is the extension of which name includes ".", because "extensions.load()" invoked from "help.topicmatch()" fails to look such extension up, even though it is already loaded in. "help.topicmatch()" invokes "extensions.load()" with the name gotten from "extensions.enabled()". The former expects full name of extension (= key in '[extensions]' section), but the latter returns names shortened by "split('.')[-1]". This difference causes failure of looking extension up. This patch adds "shortname" argument to "extensions.enabled()" to make it return shortened names only if it is True. "help.topicmatch()" turns it off to get full name of extensions. Then, this patch shortens full name of extensions by "split('.')[-1]" for showing them in the list of extensions. Shortening is also applied on names gotten from "extensions.disabled()" but harmless, because it returns only extensions directly under "hgext" and their names should not include ".".

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

Should be empty:

  $ ls .hg/store

  $ cd ..