##// END OF EJS Templates
help: add/fix docstrings for a bunch of extensions
Dirkjan Ochtman -
r8873:e872ef2e default
parent child Browse files
Show More
@@ -1,4 +1,5 b''
1 1 # perf.py - performance test routines
2 '''helper extension to measure performance'''
2 3
3 4 from mercurial import cmdutil, match, commands
4 5 import time, os, sys
@@ -5,45 +5,45 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7 #
8 # this hook allows to allow or deny access to parts of a repo when
9 # taking incoming changesets.
10 #
11 # authorization is against local user name on system where hook is
12 # run, not committer of original changeset (since that is easy to
13 # spoof).
14 #
15 # acl hook is best to use if you use hgsh to set up restricted shells
16 # for authenticated users to only push to / pull from. not safe if
17 # user has interactive shell access, because they can disable hook.
18 # also not safe if remote users share one local account, because then
19 # no way to tell remote users apart.
20 #
21 # to use, configure acl extension in hgrc like this:
22 #
23 # [extensions]
24 # hgext.acl =
25 #
26 # [hooks]
27 # pretxnchangegroup.acl = python:hgext.acl.hook
28 #
29 # [acl]
30 # sources = serve # check if source of incoming changes in this list
31 # # ("serve" == ssh or http, "push", "pull", "bundle")
32 #
33 # allow and deny lists have subtree pattern (default syntax is glob)
34 # on left, user names on right. deny list checked before allow list.
35 #
36 # [acl.allow]
37 # # if acl.allow not present, all users allowed by default
38 # # empty acl.allow = no users allowed
39 # docs/** = doc_writer
40 # .hgtags = release_engineer
41 #
42 # [acl.deny]
43 # # if acl.deny not present, no users denied by default
44 # # empty acl.deny = all users allowed
45 # glob pattern = user4, user5
46 # ** = user6
8
9 '''provide simple hooks for access control
10
11 Authorization is against local user name on system where hook is run, not
12 committer of original changeset (since that is easy to spoof).
13
14 The acl hook is best to use if you use hgsh to set up restricted shells for
15 authenticated users to only push to / pull from. It's not safe if user has
16 interactive shell access, because they can disable the hook. It's also not
17 safe if remote users share one local account, because then there's no way to
18 tell remote users apart.
19
20 To use, configure the acl extension in hgrc like this:
21
22 [extensions]
23 hgext.acl =
24
25 [hooks]
26 pretxnchangegroup.acl = python:hgext.acl.hook
27
28 [acl]
29 sources = serve # check if source of incoming changes in this list
30 # ("serve" == ssh or http, "push", "pull", "bundle")
31
32 Allow and deny lists have a subtree pattern (default syntax is glob) on the
33 left and user names on right. The deny list is checked before the allow list.
34
35 [acl.allow]
36 # if acl.allow not present, all users allowed by default
37 # empty acl.allow = no users allowed
38 docs/** = doc_writer
39 .hgtags = release_engineer
40
41 [acl.deny]
42 # if acl.deny not present, no users denied by default
43 # empty acl.deny = all users allowed
44 glob pattern = user4, user5
45 ** = user6
46 '''
47 47
48 48 from mercurial.i18n import _
49 49 from mercurial import util, match
@@ -8,6 +8,8 b''
8 8 # This software may be used and distributed according to the terms of the
9 9 # GNU General Public License version 2, incorporated herein by reference.
10 10
11 '''provides children command to show children changesets'''
12
11 13 from mercurial import cmdutil
12 14 from mercurial.commands import templateopts
13 15 from mercurial.i18n import _
@@ -5,7 +5,8 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 '''
8 '''allow external programs to compare revisions
9
9 10 The `extdiff' Mercurial extension allows you to use external programs
10 11 to compare revisions, or revision with working directory. The external diff
11 12 programs are called with a configurable set of options and two
@@ -1,10 +1,10 b''
1 # GnuPG signing extension for Mercurial
2 #
3 1 # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
4 2 #
5 3 # This software may be used and distributed according to the terms of the
6 4 # GNU General Public License version 2, incorporated herein by reference.
7 5
6 '''GnuPG signing extension for Mercurial'''
7
8 8 import os, tempfile, binascii
9 9 from mercurial import util, commands, match
10 10 from mercurial import node as hgnode
@@ -5,8 +5,7 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 '''\
9 use suffixes to refer to ancestor revisions
8 '''use suffixes to refer to ancestor revisions
10 9
11 10 This extension allows you to use git-style suffixes to refer to the
12 11 ancestors of a specific revision.
@@ -23,6 +23,8 b''
23 23 # along with this program; if not, write to the Free Software
24 24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 25
26 '''enable removing untracked files only'''
27
26 28 from mercurial import util, commands, cmdutil
27 29 from mercurial.i18n import _
28 30 import os, stat
@@ -1,10 +1,10 b''
1 # Mercurial extension to provide the 'hg share' command
2 #
3 1 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
4 2 #
5 3 # This software may be used and distributed according to the terms of the
6 4 # GNU General Public License version 2, incorporated herein by reference.
7 5
6 '''provides the hg share command'''
7
8 8 import os
9 9 from mercurial.i18n import _
10 10 from mercurial import hg, commands
@@ -4,31 +4,34 b''
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 #
8 # To perform automatic newline conversion, use:
9 #
10 # [extensions]
11 # hgext.win32text =
12 # [encode]
13 # ** = cleverencode:
14 # # or ** = macencode:
15 # [decode]
16 # ** = cleverdecode:
17 # # or ** = macdecode:
18 #
19 # If not doing conversion, to make sure you do not commit CRLF/CR by
20 # accident:
21 #
22 # [hooks]
23 # pretxncommit.crlf = python:hgext.win32text.forbidcrlf
24 # # or pretxncommit.cr = python:hgext.win32text.forbidcr
25 #
26 # To do the same check on a server to prevent CRLF/CR from being
27 # pushed or pulled:
28 #
29 # [hooks]
30 # pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
31 # # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
7
8 '''LF <-> CRLF/CR translation utilities
9
10 To perform automatic newline conversion, use:
11
12 [extensions]
13 hgext.win32text =
14 [encode]
15 ** = cleverencode:
16 # or ** = macencode:
17
18 [decode]
19 ** = cleverdecode:
20 # or ** = macdecode:
21
22 If not doing conversion, to make sure you do not commit CRLF/CR by accident:
23
24 [hooks]
25 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
26 # or pretxncommit.cr = python:hgext.win32text.forbidcr
27
28 To do the same check on a server to prevent CRLF/CR from being
29 pushed or pulled:
30
31 [hooks]
32 pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
33 # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
34 '''
32 35
33 36 from mercurial.i18n import _
34 37 from mercurial.node import short
General Comments 0
You need to be logged in to leave comments. Login now