tests/test-options.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 09 Apr 2019 20:45:36 +0200
branchstable
changeset 4479 2db0aca03a88
parent 4185 9bce7e6c18b3
child 4354 cb39b767ad3c
permissions -rw-r--r--
extensions: avoid enabling evolve for unrelated repositories (issue6057) The support for the `experimental.evolve` config have been there forever. So we can stop using the global variable. This help avoiding evolve to enable itself of repository that did not explicitly activated it. For example, this is useful for hgwebdir. Before this change, evolution feature had to be explicitly disabled or enabled in every single repository.

  $ cat >> $HGRCPATH <<EOF
  > [ui]
  > logtemplate={rev}:{node|short}[{bookmarks}] ({obsolete}/{phase}) {desc|firstline}\n
  > [extensions]
  > EOF
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH

  $ mkcommit() {
  >    echo "$1" > "$1"
  >    hg add "$1"
  >    hg ci -m "add $1"
  > }

  $ hg init repo
  $ cd repo
  $ mkcommit a
  $ mkcommit b

test disabling commands

  $ cat >> .hg/hgrc <<EOF
  > [experimental]
  > evolution=createmarkers
  >   allowunstable
  >   exchange
  > EOF
  $ hg prune
  hg: unknown command 'prune'
  (use 'hg help' for a list of commands)
  [255]