Mercurial > hg
annotate mercurial/help/extensions.txt @ 11322:3d6915f5a2bb
improve --branch processing (and differentiate from # syntax)
Previously #foo and --branch foo were handled identically.
The behavior of #foo hasn't changed, but --branch now works like this:
1) If branchmap is not supported on the remote, the operation fails.
2) If branch is '.', substitute with branch of the working dir parent.
3) If branch exists remotely, its heads are expanded.
4) Otherwise, the operation fails.
Tests have been added for the new cases.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 10 Jun 2010 12:46:09 +0200 |
parents | 52c98c6d7297 |
children | ebfc46929f3e |
rev | line source |
---|---|
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
1 Mercurial has the ability to add new features through the use of |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
2 extensions. Extensions may add new commands, add options to |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
3 existing commands, change the default behavior of commands, or |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
4 implement hooks. |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
5 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
6 Extensions are not loaded by default for a variety of reasons: |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
7 they can increase startup overhead; they may be meant for advanced |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
8 usage only; they may provide potentially dangerous abilities (such |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
9 as letting you destroy or modify history); they might not be ready |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
10 for prime time; or they may alter some usual behaviors of stock |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
11 Mercurial. It is thus up to the user to activate extensions as |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
12 needed. |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
13 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
14 To enable the "foo" extension, either shipped with Mercurial or in |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
15 the Python search path, create an entry for it in your hgrc, like |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
16 this:: |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
17 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
18 [extensions] |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
19 foo = |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
20 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
21 You may also specify the full path to an extension:: |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
22 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
23 [extensions] |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
24 myfeature = ~/.hgext/myfeature.py |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
25 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
26 To explicitly disable an extension enabled in an hgrc of broader |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
27 scope, prepend its path with !:: |
9539
c904e76e3834
help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
28 |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
29 [extensions] |
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
30 # disabling extension bar residing in /path/to/extension/bar.py |
10122
0ddbc0299742
extensions help: make disabling example analogous to enabling example
Christian Ebert <blacktrash@gmx.net>
parents:
9540
diff
changeset
|
31 bar = !/path/to/extension/bar.py |
9540
cad36e496640
help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents:
9539
diff
changeset
|
32 # ditto, but no path was supplied for extension baz |
10122
0ddbc0299742
extensions help: make disabling example analogous to enabling example
Christian Ebert <blacktrash@gmx.net>
parents:
9540
diff
changeset
|
33 baz = ! |