##// END OF EJS Templates
admin-commands: move the chainsaw extension to the admin commands module...
Raphaël Gomès -
r52396:d4095f7b stable
parent child Browse files
Show More
@@ -8,7 +8,7 b''
8
8
9 "Don't use a chainsaw to cut your food!"
9 "Don't use a chainsaw to cut your food!"
10
10
11 The chainsaw extension provides commands that are so much geared towards a
11 The chainsaw is a collection of commands that are so much geared towards a
12 specific use case in a specific context or environment that they are totally
12 specific use case in a specific context or environment that they are totally
13 inappropriate and **really dangerous** in other contexts.
13 inappropriate and **really dangerous** in other contexts.
14
14
@@ -21,25 +21,20 b' variable (see :hg:`help scripting`).'
21
21
22 import shutil
22 import shutil
23
23
24 from mercurial.i18n import _
24 from ..i18n import _
25 from mercurial import (
25 from .. import (
26 cmdutil,
26 cmdutil,
27 commands,
27 commands,
28 error,
28 error,
29 localrepo,
29 localrepo,
30 registrar,
30 registrar,
31 )
31 )
32 from mercurial.utils import (
32 from ..utils import (
33 urlutil,
33 urlutil,
34 )
34 )
35
35
36 cmdtable = {}
36 cmdtable = {}
37 command = registrar.command(cmdtable)
37 command = registrar.command(cmdtable)
38 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
39 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
40 # be specifying the version(s) of Mercurial they are tested with, or
41 # leave the attribute unspecified.
42 testedwith = b'ships-with-hg-core'
43
38
44
39
45 @command(
40 @command(
@@ -6,11 +6,12 b''
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from .i18n import _
8 from .i18n import _
9 from .admin import verify
9 from .admin import chainsaw, verify
10 from . import error, registrar, transaction
10 from . import error, registrar, transaction
11
11
12
12
13 table = {}
13 table = {}
14 table.update(chainsaw.command._table)
14 command = registrar.command(table)
15 command = registrar.command(table)
15
16
16
17
@@ -5,11 +5,6 b' Tests for the admin::chainsaw-update com'
5 setup
5 setup
6 =====
6 =====
7
7
8 $ cat >> $HGRCPATH << EOF
9 > [extensions]
10 > chainsaw=
11 > EOF
12
13 $ hg init src
8 $ hg init src
14 $ cd src
9 $ cd src
15 $ echo 1 > root
10 $ echo 1 > root
@@ -3,6 +3,7 b' Show all commands except debug commands'
3 abort
3 abort
4 add
4 add
5 addremove
5 addremove
6 admin::chainsaw-update
6 admin::verify
7 admin::verify
7 annotate
8 annotate
8 archive
9 archive
@@ -66,6 +67,7 b' Show all commands that start with "a"'
66 abort
67 abort
67 add
68 add
68 addremove
69 addremove
70 admin::chainsaw-update
69 admin::verify
71 admin::verify
70 annotate
72 annotate
71 archive
73 archive
@@ -260,6 +262,7 b' Show all commands + options'
260 abort: dry-run
262 abort: dry-run
261 add: include, exclude, subrepos, dry-run
263 add: include, exclude, subrepos, dry-run
262 addremove: similarity, subrepos, include, exclude, dry-run
264 addremove: similarity, subrepos, include, exclude, dry-run
265 admin::chainsaw-update: purge-unknown, purge-ignored, rev, source, dest, initial-clone-minimal
263 admin::verify: check, option
266 admin::verify: check, option
264 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, line-range, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template
267 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, line-range, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template
265 archive: no-decode, prefix, rev, type, subrepos, include, exclude
268 archive: no-decode, prefix, rev, type, subrepos, include, exclude
@@ -412,6 +412,9 b' Test short command list with verbose opt'
412
412
413 abort abort an unfinished operation (EXPERIMENTAL)
413 abort abort an unfinished operation (EXPERIMENTAL)
414 add add the specified files on the next commit
414 add add the specified files on the next commit
415 admin::chainsaw-update, admin::chainsawupdate
416 pull and update to a given revision, no matter what,
417 (EXPERIMENTAL)
415 annotate, blame
418 annotate, blame
416 show changeset information by line for each file
419 show changeset information by line for each file
417 clone make a copy of an existing repository
420 clone make a copy of an existing repository
@@ -2535,6 +2538,13 b' Dish up an empty repo; serve it cold.'
2535 add the specified files on the next commit
2538 add the specified files on the next commit
2536 </td></tr>
2539 </td></tr>
2537 <tr><td>
2540 <tr><td>
2541 <a href="/help/admin::chainsaw-update">
2542 admin::chainsaw-update
2543 </a>
2544 </td><td>
2545 pull and update to a given revision, no matter what, (EXPERIMENTAL)
2546 </td></tr>
2547 <tr><td>
2538 <a href="/help/annotate">
2548 <a href="/help/annotate">
2539 annotate
2549 annotate
2540 </a>
2550 </a>
@@ -2038,6 +2038,10 b' help/ shows help topics'
2038 "topic": "add"
2038 "topic": "add"
2039 },
2039 },
2040 {
2040 {
2041 "summary": "pull and update to a given revision, no matter what, (EXPERIMENTAL)",
2042 "topic": "admin::chainsaw-update"
2043 },
2044 {
2041 "summary": "show changeset information by line for each file",
2045 "summary": "show changeset information by line for each file",
2042 "topic": "annotate"
2046 "topic": "annotate"
2043 },
2047 },
General Comments 0
You need to be logged in to leave comments. Login now