From patchwork Thu Jun 6 18:06:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2,of,2] doc: make it easier to read how to enable extensions From: =?utf-8?q?Jordi_Guti=C3=A9rrez_Hermoso?= X-Patchwork-Id: 1709 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 06 Jun 2013 14:06:01 -0400 # HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1370541903 14400 # Branch stable # Node ID da16d21cf4ed9f0c48efcf26f732657c1fca884b # Parent 73066ba46ec5631470617e22bd5ed0e036890c73 doc: make it easier to read how to enable extensions We tell people all the time that enabling extensions is not a scary thing to do, but we don't make it easy enough for an absolute novice to do so. When they see a suggestion to do "hg extfoo bar", the error message tells them "see hg help extensions", but that help page doesn't actually tell them where configuration files are. Furthermore, the big warning about why extensions aren't enabled by default should be pushed down a little bit. Most of the extensions shipped by hg are not all that scary, and some very basic and useful cosmetic extensions like graphlog, color, pager, and progress, should be enabled for many hg users. diff --git a/mercurial/help/extensions.txt b/mercurial/help/extensions.txt --- a/mercurial/help/extensions.txt +++ b/mercurial/help/extensions.txt @@ -3,14 +3,6 @@ existing commands, change the default behavior of commands, or implement hooks. -Extensions are not loaded by default for a variety of reasons: -they can increase startup overhead; they may be meant for advanced -usage only; they may provide potentially dangerous abilities (such -as letting you destroy or modify history); they might not be ready -for prime time; or they may alter some usual behaviors of stock -Mercurial. It is thus up to the user to activate extensions as -needed. - To enable the "foo" extension, either shipped with Mercurial or in the Python search path, create an entry for it in your configuration file, like this:: @@ -23,6 +15,16 @@ [extensions] myfeature = ~/.hgext/myfeature.py +See :hg:`help config` for more information on configuration files. + +Extensions are not loaded by default for a variety of reasons: +they can increase startup overhead; they may be meant for advanced +usage only; they may provide potentially dangerous abilities (such +as letting you destroy or modify history); they might not be ready +for prime time; or they may alter some usual behaviors of stock +Mercurial. It is thus up to the user to activate extensions as +needed. + To explicitly disable an extension enabled in a configuration file of broader scope, prepend its path with !::