# HG changeset patch # User Martin Geisler # Date 1247779526 -7200 # Node ID 9261667e9b826747bb4052fb76a0b4e950ad68a8 # Parent c9c7e8cdac9c4460e14ab9dd1244d8fadc48efa8 commands: use minirst parser when displaying help diff -r c9c7e8cdac9c -r 9261667e9b82 hgext/convert/__init__.py --- a/hgext/convert/__init__.py Thu Jul 16 23:25:25 2009 +0200 +++ b/hgext/convert/__init__.py Thu Jul 16 23:25:26 2009 +0200 @@ -19,6 +19,7 @@ """convert a foreign SCM repository to a Mercurial one. Accepted source formats [identifiers]: + - Mercurial [hg] - CVS [cvs] - Darcs [darcs] @@ -30,6 +31,7 @@ - Perforce [p4] Accepted destination formats [identifiers]: + - Mercurial [hg] - Subversion [svn] (history on branches is not preserved) @@ -45,21 +47,23 @@ uses --sourcesort to preserve original revision numbers order. Sort modes have the following effects: - --branchsort: convert from parent to child revision when possible, which - means branches are usually converted one after the other. It generates - more compact repositories. - --datesort: sort revisions by date. Converted repositories have - good-looking changelogs but are often an order of magnitude larger than - the same ones generated by --branchsort. - --sourcesort: try to preserve source revisions order, only supported by - Mercurial sources. + --branchsort convert from parent to child revision when possible, which + means branches are usually converted one after the other. It + generates more compact repositories. + + --datesort sort revisions by date. Converted repositories have + good-looking changelogs but are often an order of magnitude + larger than the same ones generated by --branchsort. + + --sourcesort try to preserve source revisions order, only supported by + Mercurial sources. If isn't given, it will be put in a default location (/.hg/shamap by default). The is a simple text file that maps each source commit ID to the destination ID for that revision, like - so: + so:: - + If the file doesn't exist, it's automatically created. It's updated on each commit copied, so convert-repo can be interrupted and can be run @@ -72,7 +76,7 @@ The filemap is a file that allows filtering and remapping of files and directories. Comment lines start with '#'. Each line can contain one of - the following directives: + the following directives:: include path/to/file @@ -134,17 +138,17 @@ Because CVS does not have changesets, it is necessary to collect individual commits to CVS and merge them into changesets. CVS source uses its internal changeset merging code by default but can be configured to - call the external 'cvsps' program by setting: + call the external 'cvsps' program by setting:: - --config convert.cvsps='cvsps -A -u --cvs-direct -q' + --config convert.cvsps='cvsps -A -u --cvs-direct -q' This option is deprecated and will be removed in Mercurial 1.4. The options shown are the defaults. - Internal cvsps is selected by setting + Internal cvsps is selected by setting :: - --config convert.cvsps=builtin + --config convert.cvsps=builtin and has a few more configurable options: diff -r c9c7e8cdac9c -r 9261667e9b82 hgext/keyword.py --- a/hgext/keyword.py Thu Jul 16 23:25:25 2009 +0200 +++ b/hgext/keyword.py Thu Jul 16 23:25:26 2009 +0200 @@ -38,7 +38,7 @@ Configuration is done in the [keyword] and [keywordmaps] sections of hgrc files. -Example: +Example:: [keyword] # expand keywords in every python file except those matching "x*" diff -r c9c7e8cdac9c -r 9261667e9b82 hgext/mq.py --- a/hgext/mq.py Thu Jul 16 23:25:25 2009 +0200 +++ b/hgext/mq.py Thu Jul 16 23:25:26 2009 +0200 @@ -14,19 +14,19 @@ Known patches are represented as patch files in the .hg/patches directory. Applied patches are both patch files and changesets. -Common tasks (use "hg help command" for more details): +Common tasks (use "hg help command" for more details):: -prepare repository to work with patches qinit -create new patch qnew -import existing patch qimport + prepare repository to work with patches qinit + create new patch qnew + import existing patch qimport -print patch series qseries -print applied patches qapplied -print name of top applied patch qtop + print patch series qseries + print applied patches qapplied + print name of top applied patch qtop -add known patch to applied stack qpush -remove patch from applied stack qpop -refresh contents of top applied patch qrefresh + add known patch to applied stack qpush + remove patch from applied stack qpop + refresh contents of top applied patch qrefresh ''' from mercurial.i18n import _ diff -r c9c7e8cdac9c -r 9261667e9b82 hgext/notify.py --- a/hgext/notify.py Thu Jul 16 23:25:25 2009 +0200 +++ b/hgext/notify.py Thu Jul 16 23:25:26 2009 +0200 @@ -10,7 +10,7 @@ Subscriptions can be managed through a hgrc file. Default mode is to print messages to stdout, for testing and configuring. -To use, configure the notify extension and enable it in hgrc like this: +To use, configure the notify extension and enable it in hgrc like this:: [extensions] hgext.notify = @@ -24,11 +24,11 @@ [notify] # config items go here -Required configuration items: +Required configuration items:: config = /path/to/file # file containing subscriptions -Optional configuration items: +Optional configuration items:: test = True # print messages to stdout for testing strip = 3 # number of slashes to strip for url paths @@ -50,6 +50,8 @@ The notify config file has same format as a regular hgrc file. It has two sections so you can express subscriptions in whatever way is handier for you. +:: + [usersubs] # key is subscriber email, value is ","-separated list of glob patterns user@host = pattern diff -r c9c7e8cdac9c -r 9261667e9b82 hgext/record.py --- a/hgext/record.py Thu Jul 16 23:25:25 2009 +0200 +++ b/hgext/record.py Thu Jul 16 23:25:26 2009 +0200 @@ -364,19 +364,19 @@ You will be prompted for whether to record changes to each modified file, and for files with multiple changes, for each change to use. For each - query, the following responses are possible: + query, the following responses are possible:: - y - record this change - n - skip this change + y - record this change + n - skip this change - s - skip remaining changes to this file - f - record remaining changes to this file + s - skip remaining changes to this file + f - record remaining changes to this file - d - done, skip remaining changes and files - a - record all changes to all remaining files - q - quit, recording no changes + d - done, skip remaining changes and files + a - record all changes to all remaining files + q - quit, recording no changes - ? - display help''' + ? - display help''' def record_committer(ui, repo, pats, opts): commands.commit(ui, repo, *pats, **opts) diff -r c9c7e8cdac9c -r 9261667e9b82 mercurial/commands.py --- a/mercurial/commands.py Thu Jul 16 23:25:25 2009 +0200 +++ b/mercurial/commands.py Thu Jul 16 23:25:26 2009 +0200 @@ -14,6 +14,7 @@ import archival, changegroup, cmdutil, sshserver, hbisect from hgweb import server import merge as merge_ +import minirst # Commands start here, listed alphabetically @@ -133,14 +134,14 @@ By default, the revision used is the parent of the working directory; use -r/--rev to specify a different revision. - To specify the type of archive to create, use -t/--type. Valid types are: - - "files" (default): a directory full of files - "tar": tar archive, uncompressed - "tbz2": tar archive, compressed using bzip2 - "tgz": tar archive, compressed using gzip - "uzip": zip archive, uncompressed - "zip": zip archive, compressed using deflate + To specify the type of archive to create, use -t/--type. Valid types are:: + + "files" (default): a directory full of files + "tar": tar archive, uncompressed + "tbz2": tar archive, compressed using bzip2 + "tgz": tar archive, compressed using gzip + "uzip": zip archive, uncompressed + "zip": zip archive, compressed using deflate The exact name of the destination archive or directory is given using a format string; see 'hg help export' for details. @@ -550,11 +551,11 @@ Output may be to a file, in which case the name of the file is given using a format string. The formatting rules are the same as for the export - command, with the following additions: - - %s basename of file being printed - %d dirname of file being printed, or '.' if in repository root - %p root-relative path name of file being printed + command, with the following additions:: + + %s basename of file being printed + %d dirname of file being printed, or '.' if in repository root + %p root-relative path name of file being printed """ ctx = repo[opts.get('rev')] err = 1 @@ -600,7 +601,7 @@ cases, use the --pull option to avoid hardlinking. In some cases, you can clone repositories and checked out files using full - hardlinks with + hardlinks with :: $ cp -al REPO REPOCLONE @@ -1095,16 +1096,16 @@ it will compare the merge changeset against its first parent only. Output may be to a file, in which case the name of the file is given using - a format string. The formatting rules are as follows: - - %% literal "%" character - %H changeset hash (40 bytes of hexadecimal) - %N number of patches being generated - %R changeset revision number - %b basename of the exporting repository - %h short-form changeset hash (12 bytes of hexadecimal) - %n zero-padded sequence number, starting at 1 - %r zero-padded changeset revision number + a format string. The formatting rules are as follows:: + + %% literal "%" character + %H changeset hash (40 bytes of hexadecimal) + %N number of patches being generated + %R changeset revision number + %b basename of the exporting repository + %h short-form changeset hash (12 bytes of hexadecimal) + %n zero-padded sequence number, starting at 1 + %r zero-padded changeset revision number Without the -a/--text option, export will avoid generating diffs of files it detects as binary. With -a, export will generate a diff anyway, @@ -1397,6 +1398,7 @@ Given a topic, extension, or command name, print help for that topic. """ option_lists = [] + textwidth = util.termwidth() - 2 def addglobalopts(aliases): if ui.verbose: @@ -1449,7 +1451,7 @@ doc = _("(no help text available)") if ui.quiet: doc = doc.splitlines()[0] - ui.write("\n%s\n" % doc.rstrip()) + ui.write("\n%s\n" % minirst.format(doc, textwidth)) if not ui.quiet: # options @@ -1498,7 +1500,9 @@ if name != 'shortlist': exts, maxlength = extensions.enabled() - ui.write(help.listexts(_('enabled extensions:'), exts, maxlength)) + text = help.listexts(_('enabled extensions:'), exts, maxlength) + if text: + ui.write("\n%s\n" % minirst.format(text, textwidth)) if not ui.quiet: addglobalopts(True) @@ -1516,8 +1520,8 @@ if hasattr(doc, '__call__'): doc = doc() - ui.write("%s\n" % header) - ui.write("%s\n" % doc.rstrip()) + ui.write("%s\n\n" % header) + ui.write("%s\n" % minirst.format(doc, textwidth)) def helpext(name): try: @@ -1526,12 +1530,11 @@ raise error.UnknownCommand(name) doc = gettext(mod.__doc__) or _('no help text available') - doc = doc.splitlines() - ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0])) - for d in doc[1:]: - ui.write(d, '\n') - - ui.status('\n') + head, tail = doc.split('\n', 1) + ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head)) + if tail: + ui.write(minirst.format(tail, textwidth)) + ui.status('\n\n') try: ct = mod.cmdtable @@ -2329,13 +2332,13 @@ The following table details the behavior of remove for different file states (columns) and option combinations (rows). The file states are Added [A], Clean [C], Modified [M] and Missing [!] (as reported by hg status). - The actions are Warn, Remove (from branch) and Delete (from disk). - - A C M ! - none W RD W R - -f R RD RD R - -A W W W R - -Af R R R R + The actions are Warn, Remove (from branch) and Delete (from disk):: + + A C M ! + none W RD W R + -f R RD RD R + -A W W W R + -Af R R R R This command schedules the files to be removed at the next commit. To undo a remove before that, see hg revert. @@ -2410,9 +2413,10 @@ whether or not files are resolved. All files must be marked as resolved before a commit is permitted. - The codes used to show the status of files are: - U = unresolved - R = resolved + The codes used to show the status of files are:: + + U = unresolved + R = resolved """ all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark list'.split()] @@ -2675,7 +2679,7 @@ Transactions are used to encapsulate the effects of all commands that create new changesets or propagate existing changesets into a repository. For example, the following commands are transactional, and their effects - can be rolled back: + can be rolled back:: commit import @@ -2783,15 +2787,16 @@ If one revision is given, it is used as the base revision. If two revisions are given, the differences between them are shown. - The codes used to show the status of files are: - M = modified - A = added - R = removed - C = clean - ! = missing (deleted by non-hg command, but still tracked) - ? = not tracked - I = ignored - = origin of the previous file listed as A (added) + The codes used to show the status of files are:: + + M = modified + A = added + R = removed + C = clean + ! = missing (deleted by non-hg command, but still tracked) + ? = not tracked + I = ignored + = origin of the previous file listed as A (added) """ node1, node2 = cmdutil.revpair(repo, opts.get('rev')) diff -r c9c7e8cdac9c -r 9261667e9b82 mercurial/help.py --- a/mercurial/help.py Thu Jul 16 23:25:25 2009 +0200 +++ b/mercurial/help.py Thu Jul 16 23:25:26 2009 +0200 @@ -43,10 +43,11 @@ '''return a text listing of the given extensions''' if not exts: return '' - result = '\n%s\n\n' % header + # TODO: literal block is wrong, should be a field list or a simple table. + result = '\n%s\n\n ::\n\n' % header for name, desc in sorted(exts.iteritems()): - desc = util.wrap(desc, maxlength + 4) - result += ' %s %s\n' % (name.ljust(maxlength), desc) + desc = util.wrap(desc, maxlength + 5) + result += ' %s %s\n' % (name.ljust(maxlength), desc) return result def extshelp(): @@ -63,18 +64,18 @@ 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 hgrc, like this: + Python search path, create an entry for it in your hgrc, like this:: [extensions] foo = - You may also specify the full path to an extension: + You may also specify the full path to an extension:: [extensions] myfeature = ~/.hgext/myfeature.py To explicitly disable an extension enabled in an hgrc of broader scope, - prepend its path with !: + prepend its path with !:: [extensions] # disabling extension bar residing in /path/to/extension/bar.py @@ -95,24 +96,25 @@ (["dates"], _("Date Formats"), _(r''' Some commands allow the user to specify a date, e.g.: - * backout, commit, import, tag: Specify the commit date. - * log, revert, update: Select revision(s) by date. - Many date formats are valid. Here are some examples: + - backout, commit, import, tag: Specify the commit date. + - log, revert, update: Select revision(s) by date. + + Many date formats are valid. Here are some examples:: - "Wed Dec 6 13:18:29 2006" (local timezone assumed) - "Dec 6 13:18 -0600" (year assumed, time offset provided) - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) - "Dec 6" (midnight) - "13:18" (today assumed) - "3:39" (3:39AM assumed) - "3:39pm" (15:39) - "2006-12-06 13:18:29" (ISO 8601 format) - "2006-12-6 13:18" - "2006-12-6" - "12-6" - "12/6" - "12/6/6" (Dec 6 2006) + "Wed Dec 6 13:18:29 2006" (local timezone assumed) + "Dec 6 13:18 -0600" (year assumed, time offset provided) + "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) + "Dec 6" (midnight) + "13:18" (today assumed) + "3:39" (3:39AM assumed) + "3:39pm" (15:39) + "2006-12-06 13:18:29" (ISO 8601 format) + "2006-12-6 13:18" + "2006-12-6" + "12-6" + "12/6" + "12/6/6" (Dec 6 2006) Lastly, there is Mercurial's internal format: @@ -123,12 +125,12 @@ offset of the local timezone, in seconds west of UTC (negative if the timezone is east of UTC). - The log command also accepts date ranges: + The log command also accepts date ranges:: - "<{datetime}" - at or before a given date/time - ">{datetime}" - on or after a given date/time - "{datetime} to {datetime}" - a date range, inclusive - "-{days}" - within a given number of days of today + "<{datetime}" - at or before a given date/time + ">{datetime}" - on or after a given date/time + "{datetime} to {datetime}" - a date range, inclusive + "-{days}" - within a given number of days of today ''')), (["patterns"], _("File Name Patterns"), @@ -155,100 +157,101 @@ To use a Perl/Python regular expression, start a name with "re:". Regexp pattern matching is anchored at the root of the repository. - Plain examples: + Plain examples:: - path:foo/bar a name bar in a directory named foo in the root of - the repository - path:path:name a file or directory named "path:name" + path:foo/bar a name bar in a directory named foo in the root of + the repository + path:path:name a file or directory named "path:name" - Glob examples: + Glob examples:: - glob:*.c any name ending in ".c" in the current directory - *.c any name ending in ".c" in the current directory - **.c any name ending in ".c" in any subdirectory of the current - directory including itself. - foo/*.c any name ending in ".c" in the directory foo - foo/**.c any name ending in ".c" in any subdirectory of foo - including itself. + glob:*.c any name ending in ".c" in the current directory + *.c any name ending in ".c" in the current directory + **.c any name ending in ".c" in any subdirectory of the + current directory including itself. + foo/*.c any name ending in ".c" in the directory foo + foo/**.c any name ending in ".c" in any subdirectory of foo + including itself. - Regexp examples: + Regexp examples:: - re:.*\.c$ any name ending in ".c", anywhere in the repository + re:.*\.c$ any name ending in ".c", anywhere in the repository ''')), (['environment', 'env'], _('Environment Variables'), _(r''' -HG:: +HG Path to the 'hg' executable, automatically passed when running hooks, extensions or external tools. If unset or empty, this is the hg executable's name if it's frozen, or an executable named 'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on Windows) is searched. -HGEDITOR:: +HGEDITOR This is the name of the editor to run when committing. See EDITOR. (deprecated, use .hgrc) -HGENCODING:: +HGENCODING This overrides the default locale setting detected by Mercurial. This setting is used to convert data including usernames, changeset descriptions, tag names, and branches. This setting can be overridden with the --encoding command-line option. -HGENCODINGMODE:: +HGENCODINGMODE This sets Mercurial's behavior for handling unknown characters while transcoding user input. The default is "strict", which causes Mercurial to abort if it can't map a character. Other settings include "replace", which replaces unknown characters, and "ignore", which drops them. This setting can be overridden with the --encodingmode command-line option. -HGMERGE:: +HGMERGE An executable to use for resolving merge conflicts. The program will be executed with three arguments: local file, remote file, ancestor file. (deprecated, use .hgrc) -HGRCPATH:: +HGRCPATH A list of files or directories to search for hgrc files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, platform default search path is used. If empty, only the .hg/hgrc from the current repository is read. For each element in HGRCPATH: - * if it's a directory, all files ending with .rc are added - * otherwise, the file itself will be added -HGUSER:: + - if it's a directory, all files ending with .rc are added + - otherwise, the file itself will be added + +HGUSER This is the string used as the author of a commit. If not set, available values will be considered in this order: - * HGUSER (deprecated) - * hgrc files from the HGRCPATH - * EMAIL - * interactive prompt - * LOGNAME (with '@hostname' appended) + - HGUSER (deprecated) + - hgrc files from the HGRCPATH + - EMAIL + - interactive prompt + - LOGNAME (with '@hostname' appended) (deprecated, use .hgrc) -EMAIL:: +EMAIL May be used as the author of a commit; see HGUSER. -LOGNAME:: +LOGNAME May be used as the author of a commit; see HGUSER. -VISUAL:: +VISUAL This is the name of the editor to use when committing. See EDITOR. -EDITOR:: +EDITOR Sometimes Mercurial needs to open a text file in an editor for a user to modify, for example when writing commit messages. The editor it uses is determined by looking at the environment variables HGEDITOR, VISUAL and EDITOR, in that order. The first non-empty one is chosen. If all of them are empty, the editor defaults to 'vi'. -PYTHONPATH:: +PYTHONPATH This is used by Python to find imported modules and may need to be set appropriately if this Mercurial is not installed system-wide. ''')), @@ -431,7 +434,7 @@ (['urls'], _('URL Paths'), _(r''' - Valid URLs are of the form: + Valid URLs are of the form:: local/filesystem/path[#revision] file://local/filesystem/path[#revision] @@ -450,26 +453,32 @@ server. Some notes about using SSH with Mercurial: + - SSH requires an accessible shell account on the destination machine and a copy of hg in the remote path or specified with as remotecmd. - path is relative to the remote user's home directory by default. Use an - extra slash at the start of a path to specify an absolute path: + extra slash at the start of a path to specify an absolute path:: + ssh://example.com//tmp/repository + - Mercurial doesn't use its own compression via SSH; the right thing to do - is to configure it in your ~/.ssh/config, e.g.: + is to configure it in your ~/.ssh/config, e.g.:: + Host *.mylocalnetwork.example.com Compression no Host * Compression yes + Alternatively specify "ssh -C" as your ssh command in your hgrc or with the --ssh command line option. These URLs can all be stored in your hgrc with path aliases under the - [paths] section like so: - [paths] - alias1 = URL1 - alias2 = URL2 - ... + [paths] section like so:: + + [paths] + alias1 = URL1 + alias2 = URL2 + ... You can then use the alias for any command that uses a URL (for example 'hg pull alias1' would pull from the 'alias1' path). diff -r c9c7e8cdac9c -r 9261667e9b82 tests/test-convert.out --- a/tests/test-convert.out Thu Jul 16 23:25:25 2009 +0200 +++ b/tests/test-convert.out Thu Jul 16 23:25:26 2009 +0200 @@ -3,6 +3,7 @@ convert a foreign SCM repository to a Mercurial one. Accepted source formats [identifiers]: + - Mercurial [hg] - CVS [cvs] - Darcs [darcs] @@ -14,6 +15,7 @@ - Perforce [p4] Accepted destination formats [identifiers]: + - Mercurial [hg] - Subversion [svn] (history on branches is not preserved) @@ -29,14 +31,14 @@ uses --sourcesort to preserve original revision numbers order. Sort modes have the following effects: - --branchsort: convert from parent to child revision when possible, which - means branches are usually converted one after the other. It generates - more compact repositories. - --datesort: sort revisions by date. Converted repositories have - good-looking changelogs but are often an order of magnitude larger than - the same ones generated by --branchsort. - --sourcesort: try to preserve source revisions order, only supported by - Mercurial sources. + --branchsort convert from parent to child revision when possible, which + means branches are usually converted one after the other. It + generates more compact repositories. + --datesort sort revisions by date. Converted repositories have good- + looking changelogs but are often an order of magnitude + larger than the same ones generated by --branchsort. + --sourcesort try to preserve source revisions order, only supported by + Mercurial sources. If isn't given, it will be put in a default location (/.hg/shamap by default). The is a simple text file that @@ -58,11 +60,11 @@ directories. Comment lines start with '#'. Each line can contain one of the following directives: - include path/to/file + include path/to/file - exclude path/to/file + exclude path/to/file - rename from/file to/file + rename from/file to/file The 'include' directive causes a file, or all files under a directory, to be included in the destination repository, and the exclusion of all other diff -r c9c7e8cdac9c -r 9261667e9b82 tests/test-help.out --- a/tests/test-help.out Thu Jul 16 23:25:25 2009 +0200 +++ b/tests/test-help.out Thu Jul 16 23:25:26 2009 +0200 @@ -267,6 +267,7 @@ revisions are given, the differences between them are shown. The codes used to show the status of files are: + M = modified A = added R = removed diff -r c9c7e8cdac9c -r 9261667e9b82 tests/test-keyword.out --- a/tests/test-keyword.out Thu Jul 16 23:25:25 2009 +0200 +++ b/tests/test-keyword.out Thu Jul 16 23:25:26 2009 +0200 @@ -13,10 +13,10 @@ Example: - [keyword] - # expand keywords in every python file except those matching "x*" - **.py = - x* = ignore +[keyword] +# expand keywords in every python file except those matching "x*" +**.py = +x* = ignore NOTE: the more specific you are in your filename patterns the less you lose speed in huge repositories. diff -r c9c7e8cdac9c -r 9261667e9b82 tests/test-notify.out --- a/tests/test-notify.out Thu Jul 16 23:25:25 2009 +0200 +++ b/tests/test-notify.out Thu Jul 16 23:25:26 2009 +0200 @@ -5,51 +5,51 @@ To use, configure the notify extension and enable it in hgrc like this: - [extensions] - hgext.notify = +[extensions] +hgext.notify = - [hooks] - # one email for each incoming changeset - incoming.notify = python:hgext.notify.hook - # batch emails when many changesets incoming at one time - changegroup.notify = python:hgext.notify.hook +[hooks] +# one email for each incoming changeset +incoming.notify = python:hgext.notify.hook +# batch emails when many changesets incoming at one time +changegroup.notify = python:hgext.notify.hook - [notify] - # config items go here +[notify] +# config items go here Required configuration items: - config = /path/to/file # file containing subscriptions +config = /path/to/file # file containing subscriptions Optional configuration items: - test = True # print messages to stdout for testing - strip = 3 # number of slashes to strip for url paths - domain = example.com # domain to use if committer missing domain - style = ... # style file to use when formatting email - template = ... # template to use when formatting email - incoming = ... # template to use when run as incoming hook - changegroup = ... # template when run as changegroup hook - maxdiff = 300 # max lines of diffs to include (0=none, -1=all) - maxsubject = 67 # truncate subject line longer than this - diffstat = True # add a diffstat before the diff content - sources = serve # notify if source of incoming changes in this list - # (serve == ssh or http, push, pull, bundle) - [email] - from = user@host.com # email address to send as if none given - [web] - baseurl = http://hgserver/... # root of hg web site for browsing commits +test = True # print messages to stdout for testing +strip = 3 # number of slashes to strip for url paths +domain = example.com # domain to use if committer missing domain +style = ... # style file to use when formatting email +template = ... # template to use when formatting email +incoming = ... # template to use when run as incoming hook +changegroup = ... # template when run as changegroup hook +maxdiff = 300 # max lines of diffs to include (0=none, -1=all) +maxsubject = 67 # truncate subject line longer than this +diffstat = True # add a diffstat before the diff content +sources = serve # notify if source of incoming changes in this list + # (serve == ssh or http, push, pull, bundle) +[email] +from = user@host.com # email address to send as if none given +[web] +baseurl = http://hgserver/... # root of hg web site for browsing commits The notify config file has same format as a regular hgrc file. It has two sections so you can express subscriptions in whatever way is handier for you. - [usersubs] - # key is subscriber email, value is ","-separated list of glob patterns - user@host = pattern +[usersubs] +# key is subscriber email, value is ","-separated list of glob patterns +user@host = pattern - [reposubs] - # key is glob pattern, value is ","-separated list of subscriber emails - pattern = user@host +[reposubs] +# key is glob pattern, value is ","-separated list of subscriber emails +pattern = user@host Glob patterns are matched against path to repository root.