# HG changeset patch # User Martin Geisler # Date 1248568418 -7200 # Node ID ca143d86727cdf7cfc079b6fc9a1eb09eed2dc72 # Parent 3d9f77c0310580e16930a88284dc7719e246b638# Parent 6fd3f795e90846ff1a78de15fe34975537727eed Merge with crew-stable diff -r 6fd3f795e908 -r ca143d86727c Makefile diff -r 6fd3f795e908 -r ca143d86727c contrib/hgdiff --- a/contrib/hgdiff Sat Jul 25 10:08:20 2009 -0700 +++ b/contrib/hgdiff Sun Jul 26 02:33:38 2009 +0200 @@ -38,13 +38,13 @@ def diff_files(file1, file2): if file1 is None: - b = file(file2).read().splitlines(1) + b = file(file2).read().splitlines(True) l1 = "--- %s\n" % (file2) l2 = "+++ %s\n" % (file2) l3 = "@@ -0,0 +1,%d @@\n" % len(b) l = [l1, l2, l3] + ["+" + e for e in b] elif file2 is None: - a = file(file1).read().splitlines(1) + a = file(file1).read().splitlines(True) l1 = "--- %s\n" % (file1) l2 = "+++ %s\n" % (file1) l3 = "@@ -1,%d +0,0 @@\n" % len(a) @@ -52,8 +52,8 @@ else: t1 = file(file1).read() t2 = file(file2).read() - l1 = t1.splitlines(1) - l2 = t2.splitlines(1) + l1 = t1.splitlines(True) + l2 = t2.splitlines(True) if options.difflib: l = difflib.unified_diff(l1, l2, file1, file2) else: diff -r 6fd3f795e908 -r ca143d86727c contrib/perf.py --- a/contrib/perf.py Sat Jul 25 10:08:20 2009 -0700 +++ b/contrib/perf.py Sun Jul 26 02:33:38 2009 +0200 @@ -51,7 +51,7 @@ def t(): repo.changelog = mercurial.changelog.changelog(repo.sopener) repo.manifest = mercurial.manifest.manifest(repo.sopener) - repo.tagscache = None + repo._tags = None return len(repo.tags()) timer(t) diff -r 6fd3f795e908 -r ca143d86727c contrib/win32/win32-build.txt --- a/contrib/win32/win32-build.txt Sat Jul 25 10:08:20 2009 -0700 +++ b/contrib/win32/win32-build.txt Sun Jul 26 02:33:38 2009 +0200 @@ -33,8 +33,8 @@ add_path (you need only add_path.exe in the zip file) http://www.barisione.org/apps.html#add_path - Asciidoc - optional - http://www.methods.co.nz/asciidoc/ + Docutils + http://docutils.sourceforge.net/ And, of course, Mercurial itself. @@ -79,11 +79,16 @@ Microsoft.VC90.MFC.manifest) Before building the installer, you have to build Mercurial HTML documentation -(or fix mercurial.iss to not reference the doc directory). Assuming you have an -"asciidoc.bat" batch file somewhere in your PATH: +(or fix mercurial.iss to not reference the doc directory). Docutils does not +come with a ready-made script for rst2html.py, so you will have to write your +own and put it in %PATH% like: + + @python c:\pythonXX\scripts\rst2html.py %* + +Then build the documentation with: cd doc - mingw32-make ASCIIDOC=asciidoc.bat html + mingw32-make RST2HTML=rst2html.bat html cd .. If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss @@ -102,7 +107,7 @@ echo compiler=mingw32 >> setup.cfg python setup.py py2exe -b 1 cd doc - mingw32-make ASCIIDOC=asciidoc.bat html + mingw32-make RST2HTML=rst2html.bat html cd .. iscc contrib\win32\mercurial.iss diff -r 6fd3f795e908 -r ca143d86727c doc/Makefile --- a/doc/Makefile Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/Makefile Sun Jul 26 02:33:38 2009 +0200 @@ -5,7 +5,8 @@ MANDIR=$(PREFIX)/share/man INSTALL=install -c -m 644 PYTHON=python -ASCIIDOC=asciidoc +RST2HTML=rst2html +RST2MAN=rst2man all: man html @@ -16,19 +17,18 @@ hg.1.txt: hg.1.gendoc.txt touch hg.1.txt -hg.1.gendoc.txt: ../mercurial/commands.py ../mercurial/help.py +hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py ${PYTHON} gendoc.py > $@ -%: %.xml - xmlto man $*.xml && \ - sed -e 's/^\.hg/\\\&.hg/' $* > $*~ && \ - mv $*~ $* +%: %.txt common.txt + # add newline after all literal blocks and fix backslash escape + $(RST2MAN) $*.txt \ + | sed -e 's/^\.fi$$/.fi\n/' \ + | sed -e 's/\\fB\\\\fP/\\fB\\e\\fP/' \ + > $* -%.xml: %.txt - $(ASCIIDOC) -d manpage -b docbook $*.txt - -%.html: %.txt - $(ASCIIDOC) -b html4 $*.txt || $(ASCIIDOC) -b html $*.txt +%.html: %.txt common.txt + $(RST2HTML) $*.txt > $*.html MANIFEST: man html # tracked files are already in the main MANIFEST @@ -45,4 +45,4 @@ done clean: - $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST + $(RM) $(MAN) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST diff -r 6fd3f795e908 -r ca143d86727c doc/README --- a/doc/README Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/README Sun Jul 26 02:33:38 2009 +0200 @@ -1,23 +1,17 @@ -Mercurial's documentation is currently kept in ASCIIDOC format, which -is a simple plain text format that's easy to read and edit. It's also -convertible to a variety of other formats including standard UNIX man -page format and HTML. +Mercurial's documentation is kept in reStructuredText format, which is +a simple plain text format that's easy to read and edit: -To do this, you'll need to install ASCIIDOC: + http://docutils.sourceforge.net/rst.html - http://www.methods.co.nz/asciidoc/ - -To generate the man page: +It's also convertible to a variety of other formats including standard +UNIX man page format and HTML. - asciidoc -d manpage -b docbook hg.1.txt - xmlto man hg.1.xml +To do this, you'll need to install the rst2html and rst2man tools, +which are part of Docutils: -To display: + http://docutils.sourceforge.net/ - groff -mandoc -Tascii hg.1 | more - -To create the html page (without stylesheets): +The rst2man tool is still in their so-called "sandbox". The above page +has links to tarballs of both Docutils and their sandbox. - asciidoc -b html4 hg.1.txt - -(older asciidoc may want html instead of html4 above) +Use the Makefile in this directory to generate the man and HTML pages. diff -r 6fd3f795e908 -r ca143d86727c doc/common.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/common.txt Sun Jul 26 02:33:38 2009 +0200 @@ -0,0 +1,8 @@ +.. Common link and substitution definitions. + +.. |hg(1)| replace:: **hg**\ (1) +.. _hg(1): hg.1.html +.. |hgrc(5)| replace:: **hgrc**\ (5) +.. _hgrc(5): hgrc.5.html +.. |hgignore(5)| replace:: **hgignore**\ (5) +.. _hgignore(5): hgignore.5.html diff -r 6fd3f795e908 -r ca143d86727c doc/gendoc.py --- a/doc/gendoc.py Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/gendoc.py Sun Jul 26 02:33:38 2009 +0200 @@ -62,7 +62,7 @@ # print options underlined(_("OPTIONS")) for optstr, desc in get_opts(globalopts): - ui.write("%s::\n %s\n\n" % (optstr, desc)) + ui.write("%s\n %s\n\n" % (optstr, desc)) # print cmds underlined(_("COMMANDS")) @@ -78,15 +78,15 @@ if f.startswith("debug"): continue d = get_cmd(h[f]) # synopsis - ui.write("[[%s]]\n" % d['cmd']) - ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1)) + ui.write(".. _%s:\n\n" % d['cmd']) + ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1)) # description ui.write("%s\n\n" % d['desc'][1]) # options opt_output = list(d['opts']) if opt_output: opts_len = max([len(line[0]) for line in opt_output]) - ui.write(_(" options:\n")) + ui.write(_(" options:\n\n")) for optstr, desc in opt_output: if desc: s = "%-*s %s" % (opts_len, optstr, desc) diff -r 6fd3f795e908 -r ca143d86727c doc/hg.1.txt --- a/doc/hg.1.txt Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/hg.1.txt Sun Jul 26 02:33:38 2009 +0200 @@ -1,64 +1,70 @@ -HG(1) -===== -Matt Mackall -:man source: Mercurial -:man manual: Mercurial Manual +==== + hg +==== -NAME ----- -hg - Mercurial source code management system +--------------------------------------- +Mercurial source code management system +--------------------------------------- + +:Author: Matt Mackall +:Organization: Mercurial +:Manual section: 1 +:Manual group: Mercurial Manual + SYNOPSIS -------- -*hg* 'command' ['option']... ['argument']... +**hg** *command* [*option*]... [*argument*]... DESCRIPTION ----------- -The *hg* command provides a command line interface to the Mercurial +The **hg** command provides a command line interface to the Mercurial system. COMMAND ELEMENTS ---------------- -files ...:: +files... indicates one or more filename or relative path filenames; see "FILE NAME PATTERNS" for information on pattern matching -path:: +path indicates a path on the local machine -revision:: +revision indicates a changeset which can be specified as a changeset revision number, a tag, or a unique substring of the changeset hash value -repository path:: +repository path either the pathname of a local repository or the URI of a remote repository. -include::hg.1.gendoc.txt[] +.. include:: hg.1.gendoc.txt FILES ----- - `.hgignore`:: + +``.hgignore`` This file contains regular expressions (one per line) that - describe file names that should be ignored by *hg*. For details, - see *hgignore(5)*. + describe file names that should be ignored by **hg**. For details, + see |hgignore(5)|_. - `.hgtags`:: +``.hgtags`` This file contains changeset hash values and text tag names (one of each separated by spaces) that correspond to tagged versions of the repository contents. - `/etc/mercurial/hgrc`, `$HOME/.hgrc`, `.hg/hgrc`:: - This file contains defaults and configuration. Values in `.hg/hgrc` - override those in `$HOME/.hgrc`, and these override settings made in - the global `/etc/mercurial/hgrc` configuration. See *hgrc(5)* for - details of the contents and format of these files. +``/etc/mercurial/hgrc``, ``$HOME/.hgrc``, ``.hg/hgrc`` + This file contains defaults and configuration. Values in + ``.hg/hgrc`` override those in ``$HOME/.hgrc``, and these override + settings made in the global ``/etc/mercurial/hgrc`` configuration. + See |hgrc(5)|_ for details of the contents and format of these + files. -Some commands (e.g. revert) produce backup files ending in `.orig`, if -the `.orig` file already exists and is not tracked by Mercurial, it will -be overwritten. +Some commands (e.g. revert) produce backup files ending in ``.orig``, +if the ``.orig`` file already exists and is not tracked by Mercurial, +it will be overwritten. BUGS ---- @@ -67,7 +73,7 @@ SEE ALSO -------- -*hgignore(5)*, *hgrc(5)* +|hgignore(5)|_, |hgrc(5)|_ AUTHOR ------ @@ -75,14 +81,16 @@ RESOURCES --------- -http://mercurial.selenic.com/[Main Web Site] +Main Web Site: http://mercurial.selenic.com/ -http://selenic.com/hg[Source code repository] +Source code repository: http://selenic.com/hg -http://selenic.com/mailman/listinfo/mercurial[Mailing list] +Mailing list: http://selenic.com/mailman/listinfo/mercurial COPYING ------- Copyright \(C) 2005-2009 Matt Mackall. Free use of this software is granted under the terms of the GNU General Public License (GPL). + +.. include:: common.txt diff -r 6fd3f795e908 -r ca143d86727c doc/hgignore.5.txt --- a/doc/hgignore.5.txt Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/hgignore.5.txt Sun Jul 26 02:33:38 2009 +0200 @@ -1,17 +1,20 @@ -HGIGNORE(5) -=========== -Vadim Gelfer -:man source: Mercurial -:man manual: Mercurial Manual +========== + hgignore +========== -NAME ----- -hgignore - syntax for Mercurial ignore files +--------------------------------- +syntax for Mercurial ignore files +--------------------------------- + +:Author: Vadim Gelfer +:Organization: Mercurial +:Manual section: 5 +:Manual group: Mercurial Manual SYNOPSIS -------- -The Mercurial system uses a file called `.hgignore` in the root +The Mercurial system uses a file called ``.hgignore`` in the root directory of a repository to control its behavior when it searches for files that it is not currently tracking. @@ -21,61 +24,61 @@ The working directory of a Mercurial repository will often contain files that should not be tracked by Mercurial. These include backup files created by editors and build products created by compilers. -These files can be ignored by listing them in a `.hgignore` file in -the root of the working directory. The `.hgignore` file must be +These files can be ignored by listing them in a ``.hgignore`` file in +the root of the working directory. The ``.hgignore`` file must be created manually. It is typically put under version control, so that the settings will propagate to other repositories with push and pull. An untracked file is ignored if its path relative to the repository root directory, or any prefix path of that path, is matched against -any pattern in `.hgignore`. +any pattern in ``.hgignore``. -For example, say we have an an untracked file, `file.c`, at -`a/b/file.c` inside our repository. Mercurial will ignore `file.c` if -any pattern in `.hgignore` matches `a/b/file.c`, `a/b` or `a`. +For example, say we have an an untracked file, ``file.c``, at +``a/b/file.c`` inside our repository. Mercurial will ignore ``file.c`` +if any pattern in ``.hgignore`` matches ``a/b/file.c``, ``a/b`` or ``a``. In addition, a Mercurial configuration file can reference a set of -per-user or global ignore files. See the hgrc(5) man page for details +per-user or global ignore files. See the |hgrc(5)|_ man page for details of how to configure these files. Look for the "ignore" entry in the "ui" section. To control Mercurial's handling of files that it manages, see the -hg(1) man page. Look for the "-I" and "-X" options. +|hg(1)|_ man page. Look for the "``-I``" and "``-X``" options. SYNTAX ------ An ignore file is a plain text file consisting of a list of patterns, -with one pattern per line. Empty lines are skipped. The "`#`" -character is treated as a comment character, and the "`\`" character +with one pattern per line. Empty lines are skipped. The "``#``" +character is treated as a comment character, and the "``\``" character is treated as an escape character. Mercurial supports several pattern syntaxes. The default syntax used is Python/Perl-style regular expressions. -To change the syntax used, use a line of the following form: +To change the syntax used, use a line of the following form:: -syntax: NAME + syntax: NAME -where NAME is one of the following: +where ``NAME`` is one of the following: -regexp:: +``regexp`` Regular expression, Python/Perl syntax. -glob:: +``glob`` Shell-style glob. The chosen syntax stays in effect when parsing all patterns that follow, until another syntax is selected. Neither glob nor regexp patterns are rooted. A glob-syntax pattern of -the form "`*.c`" will match a file ending in "`.c`" in any directory, -and a regexp pattern of the form "`\.c$`" will do the same. To root a -regexp pattern, start it with "`^`". +the form "``*.c``" will match a file ending in "``.c``" in any directory, +and a regexp pattern of the form "``\.c$``" will do the same. To root a +regexp pattern, start it with "``^``". EXAMPLE ------- -Here is an example ignore file. +Here is an example ignore file. :: # use glob syntax. syntax: glob @@ -96,7 +99,7 @@ SEE ALSO -------- -hg(1), hgrc(5) +|hg(1)|_, |hgrc(5)|_ COPYING ------- @@ -104,3 +107,5 @@ Mercurial is copyright 2005-2009 Matt Mackall. Free use of this software is granted under the terms of the GNU General Public License (GPL). + +.. include:: common.txt diff -r 6fd3f795e908 -r ca143d86727c doc/hgrc.5.txt --- a/doc/hgrc.5.txt Sat Jul 25 10:08:20 2009 -0700 +++ b/doc/hgrc.5.txt Sun Jul 26 02:33:38 2009 +0200 @@ -1,12 +1,16 @@ -HGRC(5) -======= -Bryan O'Sullivan -:man source: Mercurial -:man manual: Mercurial Manual +====== + hgrc +====== -NAME ----- -hgrc - configuration files for Mercurial +--------------------------------- +configuration files for Mercurial +--------------------------------- + +:Author: Bryan O'Sullivan +:Organization: Mercurial +:Manual section: 5 +:Manual group: Mercurial Manual + SYNOPSIS -------- @@ -19,51 +23,54 @@ Mercurial reads configuration data from several files, if they exist. The names of these files depend on the system on which Mercurial is -installed. `*.rc` files from a single directory are read in +installed. ``*.rc`` files from a single directory are read in alphabetical order, later ones overriding earlier ones. Where multiple paths are given below, settings from later paths override earlier ones. -(Unix) `/etc/mercurial/hgrc.d/*.rc`:: -(Unix) `/etc/mercurial/hgrc`:: +| (Unix) ``/etc/mercurial/hgrc.d/*.rc`` +| (Unix) ``/etc/mercurial/hgrc`` + Per-installation configuration files, searched for in the - directory where Mercurial is installed. `` is the - parent directory of the hg executable (or symlink) being run. For - example, if installed in `/shared/tools/bin/hg`, Mercurial will look - in `/shared/tools/etc/mercurial/hgrc`. Options in these files apply + directory where Mercurial is installed. ```` is the + parent directory of the **hg** executable (or symlink) being run. For + example, if installed in ``/shared/tools/bin/hg``, Mercurial will look + in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply to all Mercurial commands executed by any user in any directory. -(Unix) `/etc/mercurial/hgrc.d/*.rc`:: -(Unix) `/etc/mercurial/hgrc`:: +| (Unix) ``/etc/mercurial/hgrc.d/*.rc`` +| (Unix) ``/etc/mercurial/hgrc`` + Per-system configuration files, for the system on which Mercurial is running. Options in these files apply to all Mercurial commands executed by any user in any directory. Options in these files override per-installation options. -(Windows) `\Mercurial.ini`:: - or else:: -(Windows) `HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`:: - or else:: -(Windows) `C:\Mercurial\Mercurial.ini`:: +| (Windows) ``\Mercurial.ini`` or else +| (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` or else +| (Windows) ``C:\Mercurial\Mercurial.ini`` + Per-installation/system configuration files, for the system on which Mercurial is running. Options in these files apply to all Mercurial commands executed by any user in any directory. Registry keys contain PATH-like strings, every part of which must reference - a `Mercurial.ini` file or be a directory where `*.rc` files will + a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will be read. -(Unix) `$HOME/.hgrc`:: -(Windows) `%HOME%\Mercurial.ini`:: -(Windows) `%HOME%\.hgrc`:: -(Windows) `%USERPROFILE%\Mercurial.ini`:: -(Windows) `%USERPROFILE%\.hgrc`:: +| (Unix) ``$HOME/.hgrc`` +| (Windows) ``%HOME%\Mercurial.ini`` +| (Windows) ``%HOME%\.hgrc`` +| (Windows) ``%USERPROFILE%\Mercurial.ini`` +| (Windows) ``%USERPROFILE%\.hgrc`` + Per-user configuration file(s), for the user running Mercurial. On - Windows 9x, `%HOME%` is replaced by `%APPDATA%`. Options in these + Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these files apply to all Mercurial commands executed by this user in any directory. Options in these files override per-installation and per-system options. -(Unix, Windows) `/.hg/hgrc`:: +| (Unix, Windows) ``/.hg/hgrc`` + Per-repository configuration options that only apply in a particular repository. This file is not version-controlled, and will not get transferred during a "clone" operation. Options in @@ -75,8 +82,10 @@ SYNTAX ------ -A configuration file consists of sections, led by a "`[section]`" header -and followed by "`name: value`" entries; "`name=value`" is also accepted. +A configuration file consists of sections, led by a "``[section]``" header +and followed by "``name: value``" entries; "``name=value``" is also accepted. + +:: [spam] eggs=ham @@ -88,7 +97,7 @@ Leading whitespace is removed from values. Empty lines are skipped. -Lines beginning with "`#`" or "`;`" are ignored and may be used to provide +Lines beginning with "``#``" or "``;``" are ignored and may be used to provide comments. SECTIONS @@ -98,41 +107,39 @@ Mercurial "hgrc" file, the purpose of each section, its possible keys, and their possible values. -[[alias]] -alias:: - Defines command aliases. - Aliases allow you to define your own commands in terms of other - commands (or aliases), optionally including arguments. -+ --- -Alias definitions consist of lines of the form: +``alias`` +""""""""" +Defines command aliases. +Aliases allow you to define your own commands in terms of other +commands (or aliases), optionally including arguments. + +Alias definitions consist of lines of the form:: = [. = -+ --- + where is used to group arguments into authentication entries. -Example: +Example:: foo.prefix = hg.intevation.org/mercurial foo.username = foo @@ -146,26 +153,26 @@ Supported arguments: - prefix;; - Either "\*" or a URI prefix with or without the scheme part. +``prefix`` + Either "``*``" or a URI prefix with or without the scheme part. The authentication entry with the longest matching prefix is used - (where "*" matches everything and counts as a match of length + (where "``*``" matches everything and counts as a match of length 1). If the prefix doesn't include a scheme, the match is performed against the URI with its scheme stripped as well, and the schemes argument, q.v., is then subsequently consulted. - username;; +``username`` Optional. Username to authenticate with. If not given, and the remote site requires basic or digest authentication, the user will be prompted for it. - password;; +``password`` Optional. Password to authenticate with. If not given, and the remote site requires basic or digest authentication, the user will be prompted for it. - key;; +``key`` Optional. PEM encoded client certificate key file. - cert;; +``cert`` Optional. PEM encoded client certificate chain file. - schemes;; +``schemes`` Optional. Space separated list of URI schemes to use this authentication entry with. Only used if the prefix doesn't include a scheme. Supported schemes are http and https. They will match @@ -174,20 +181,19 @@ If no suitable authentication entry is found, the user is prompted for credentials as usual if required by the remote. --- + -[[decode]] -decode/encode:: - Filters for transforming files on checkout/checkin. This would - typically be used for newline processing or other - localization/canonicalization of files. -+ --- +``decode/encode`` +""""""""""""""""" +Filters for transforming files on checkout/checkin. This would +typically be used for newline processing or other +localization/canonicalization of files. + Filters consist of a filter pattern followed by a filter command. Filter patterns are globs by default, rooted at the repository root. -For example, to match any file ending in "`.txt`" in the root -directory only, use the pattern "\*.txt". To match any file ending -in "`.c`" anywhere in the repository, use the pattern "**`.c`". +For example, to match any file ending in "``.txt``" in the root +directory only, use the pattern "``*.txt``". To match any file ending +in "``.c``" anywhere in the repository, use the pattern "``**.c``". The filter command can start with a specifier, either "pipe:" or "tempfile:". If no specifier is given, "pipe:" is used by default. @@ -195,7 +201,7 @@ A "pipe:" command must accept data on stdin and return the transformed data on stdout. -Pipe example: +Pipe example:: [encode] # uncompress gzip files on checkin to improve delta compression @@ -218,7 +224,7 @@ effects and may corrupt the contents of your files. The most common usage is for LF <-> CRLF translation on Windows. For -this, use the "smart" converters which check for binary files: +this, use the "smart" converters which check for binary files:: [extensions] hgext.win32text = @@ -227,7 +233,7 @@ [decode] ** = cleverdecode: -or if you only want to translate certain files: +or if you only want to translate certain files:: [extensions] hgext.win32text = @@ -235,16 +241,16 @@ **.txt = dumbencode: [decode] **.txt = dumbdecode: --- + + +``defaults`` +"""""""""""" -[[defaults]] -defaults:: - Use the [defaults] section to define command defaults, i.e. the - default options/arguments to pass to the specified commands. -+ --- +Use the [defaults] section to define command defaults, i.e. the +default options/arguments to pass to the specified commands. + The following example makes 'hg log' run in verbose mode, and 'hg -status' show only the modified files, by default. +status' show only the modified files, by default:: [defaults] log = -v @@ -253,57 +259,59 @@ The actual commands, instead of their aliases, must be used when defining command defaults. The command defaults will also be applied to the aliases of the commands defined. --- + + +``diff`` +"""""""" -[[diff]] -diff:: - Settings used when displaying diffs. They are all Boolean and - defaults to False. - git;; +Settings used when displaying diffs. They are all Boolean and +defaults to False. + +``git`` Use git extended diff format. - nodates;; +``nodates`` Don't include dates in diff headers. - showfunc;; +``showfunc`` Show which function each change is in. - ignorews;; +``ignorews`` Ignore white space when comparing lines. - ignorewsamount;; +``ignorewsamount`` Ignore changes in the amount of white space. - ignoreblanklines;; +``ignoreblanklines`` Ignore changes whose lines are all blank. -[[email]] -email:: - Settings for extensions that send email messages. - from;; +``email`` +""""""""" +Settings for extensions that send email messages. + +``from`` Optional. Email address to use in "From" header and SMTP envelope of outgoing messages. - to;; +``to`` Optional. Comma-separated list of recipients' email addresses. - cc;; +``cc`` Optional. Comma-separated list of carbon copy recipients' email addresses. - bcc;; +``bcc`` Optional. Comma-separated list of blind carbon copy recipients' email addresses. Cannot be set interactively. - method;; +``method`` Optional. Method to use to send email messages. If value is "smtp" (default), use SMTP (see section "[smtp]" for configuration). Otherwise, use as name of program to run that acts like sendmail (takes "-f" option for sender, list of recipients on command line, message on stdin). Normally, setting this to "sendmail" or "/usr/sbin/sendmail" is enough to use sendmail to send messages. - charsets;; +``charsets`` Optional. Comma-separated list of character sets considered convenient for recipients. Addresses, headers, and parts not containing patches of outgoing messages will be encoded in the first character set to which conversion from local encoding - (`$HGENCODING`, `ui.fallbackencoding`) succeeds. If correct + (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct conversion fails, the text in question is sent as is. Defaults to empty (explicit) list. -+ --- -Order of outgoing email character sets: + +Order of outgoing email character sets:: us-ascii always first, regardless of settings email.charsets in order given by user @@ -311,7 +319,7 @@ $HGENCODING if not in email.charsets utf-8 always last, regardless of settings -Email example: +Email example:: [email] from = Joseph User @@ -319,40 +327,40 @@ # charsets for western Europeans # us-ascii, utf-8 omitted, as they are tried first and last charsets = iso-8859-1, iso-8859-15, windows-1252 --- + + +``extensions`` +"""""""""""""" -[[extensions]] -extensions:: - Mercurial has an extension mechanism for adding new features. To - enable an extension, create an entry for it in this section. -+ --- +Mercurial has an extension mechanism for adding new features. To +enable an extension, create an entry for it in this section. + If you know that the extension is already in Python's search path, -you can give the name of the module, followed by "`=`", with nothing -after the "`=`". +you can give the name of the module, followed by "``=``", with nothing +after the "``=``". -Otherwise, give a name that you choose, followed by "`=`", followed by -the path to the "`.py`" file (including the file name extension) that +Otherwise, give a name that you choose, followed by "``=``", followed by +the path to the "``.py``" file (including the file name extension) that defines the extension. To explicitly disable an extension that is enabled in an hgrc of -broader scope, prepend its path with "`!`", as in -"`hgext.foo = !/ext/path`" or "`hgext.foo = !`" when path is not +broader scope, prepend its path with "``!``", as in +"``hgext.foo = !/ext/path``" or "``hgext.foo = !``" when path is not supplied. -Example for `~/.hgrc`: +Example for ``~/.hgrc``:: [extensions] # (the mq extension will get loaded from Mercurial's path) hgext.mq = # (this extension will get loaded from the file specified) myfeature = ~/.hgext/myfeature.py --- + -[[format]] -format:: +``format`` +"""""""""" - usestore;; +``usestore`` Enable or disable the "store" repository format which improves compatibility with systems that fold case or otherwise mangle filenames. Enabled by default. Disabling this option will allow @@ -360,7 +368,7 @@ compatibility and ensures that the on-disk format of newly created repositories will be compatible with Mercurial before version 0.9.4. - usefncache;; +``usefncache`` Enable or disable the "fncache" repository format which enhances the "store" repository format (which has to be enabled to use fncache) to allow longer filenames and avoids using Windows @@ -368,26 +376,27 @@ option ensures that the on-disk format of newly created repositories will be compatible with Mercurial before version 1.1. -[[merge-patterns]] -merge-patterns:: - This section specifies merge tools to associate with particular file - patterns. Tools matched here will take precedence over the default - merge tool. Patterns are globs by default, rooted at the repository - root. -+ -Example: -+ +``merge-patterns`` +"""""""""""""""""" + +This section specifies merge tools to associate with particular file +patterns. Tools matched here will take precedence over the default +merge tool. Patterns are globs by default, rooted at the repository +root. + +Example:: + [merge-patterns] **.c = kdiff3 **.jpg = myimgmerge -[[merge-tools]] -merge-tools:: - This section configures external merge tools to use for file-level - merges. -+ --- -Example `~/.hgrc`: +``merge-tools`` +""""""""""""""" + +This section configures external merge tools to use for file-level +merges. + +Example ``~/.hgrc``:: [merge-tools] # Override stock tool location @@ -404,64 +413,63 @@ Supported arguments: -priority;; +``priority`` The priority in which to evaluate this tool. Default: 0. -executable;; +``executable`` Either just the name of the executable or its pathname. Default: the tool name. -args;; +``args`` The arguments to pass to the tool executable. You can refer to the files being merged as well as the output file through these - variables: `$base`, `$local`, `$other`, `$output`. - Default: `$local $base $other` -premerge;; + variables: ``$base``, ``$local``, ``$other``, ``$output``. + Default: ``$local $base $other`` +``premerge`` Attempt to run internal non-interactive 3-way merge tool before launching external tool. Default: True -binary;; +``binary`` This tool can merge binary files. Defaults to False, unless tool was selected by file pattern match. -symlink;; +``symlink`` This tool can merge symlinks. Defaults to False, even if tool was selected by file pattern match. -checkconflicts;; +``checkconflicts`` Check whether there are conflicts even though the tool reported success. Default: False -checkchanged;; +``checkchanged`` Check whether outputs were written even though the tool reported success. Default: False -fixeol;; +``fixeol`` Attempt to fix up EOL changes caused by the merge tool. Default: False -gui;; +``gui`` This tool requires a graphical interface to run. Default: False -regkey;; +``regkey`` Windows registry key which describes install location of this tool. Mercurial will search for this key first under - `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`. + ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. Default: None -regname;; +``regname`` Name of value to read from specified registry key. Defaults to the unnamed (default) value. -regappend;; +``regappend`` String to append to the value read from the registry, typically the executable name of the tool. Default: None --- + -[[hooks]] -hooks:: - Commands or Python functions that get automatically executed by - various actions such as starting or finishing a commit. Multiple - hooks can be run for the same action by appending a suffix to the - action. Overriding a site-wide hook can be done by changing its - value or setting it to an empty string. -+ --- -Example `.hg/hgrc`: +``hooks`` +""""""""" +Commands or Python functions that get automatically executed by +various actions such as starting or finishing a commit. Multiple +hooks can be run for the same action by appending a suffix to the +action. Overriding a site-wide hook can be done by changing its +value or setting it to an empty string. + +Example ``.hg/hgrc``:: [hooks] # do not use the site-wide hook @@ -473,84 +481,84 @@ additional information. For each hook below, the environment variables it is passed are listed with names of the form "$HG_foo". -changegroup;; +``changegroup`` Run after a changegroup has been added via push, pull or unbundle. - ID of the first new changeset is in `$HG_NODE`. URL from which - changes came is in `$HG_URL`. -commit;; + ID of the first new changeset is in ``$HG_NODE``. URL from which + changes came is in ``$HG_URL``. +``commit`` Run after a changeset has been created in the local repository. ID - of the newly created changeset is in `$HG_NODE`. Parent changeset - IDs are in `$HG_PARENT1` and `$HG_PARENT2`. -incoming;; + of the newly created changeset is in ``$HG_NODE``. Parent changeset + IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. +``incoming`` Run after a changeset has been pulled, pushed, or unbundled into the local repository. The ID of the newly arrived changeset is in - `$HG_NODE`. URL that was source of changes came is in `$HG_URL`. -outgoing;; + ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. +``outgoing`` Run after sending changes from local repository to another. ID of - first changeset sent is in `$HG_NODE`. Source of operation is in - `$HG_SOURCE`; see "preoutgoing" hook for description. -post-;; + first changeset sent is in ``$HG_NODE``. Source of operation is in + ``$HG_SOURCE``; see "preoutgoing" hook for description. +``post-`` Run after successful invocations of the associated command. The - contents of the command line are passed as `$HG_ARGS` and the result - code in `$HG_RESULT`. Hook failure is ignored. -pre-;; + contents of the command line are passed as ``$HG_ARGS`` and the result + code in ``$HG_RESULT``. Hook failure is ignored. +``pre-`` Run before executing the associated command. The contents of the - command line are passed as `$HG_ARGS`. If the hook returns failure, + command line are passed as ``$HG_ARGS``. If the hook returns failure, the command doesn't execute and Mercurial returns the failure code. -prechangegroup;; +``prechangegroup`` Run before a changegroup is added via push, pull or unbundle. Exit status 0 allows the changegroup to proceed. Non-zero status will cause the push, pull or unbundle to fail. URL from which changes - will come is in `$HG_URL`. -precommit;; + will come is in ``$HG_URL``. +``precommit`` Run before starting a local commit. Exit status 0 allows the commit to proceed. Non-zero status will cause the commit to fail. - Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`. -preoutgoing;; + Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. +``preoutgoing`` Run before collecting changes to send from the local repository to another. Non-zero status will cause failure. This lets you prevent pull over HTTP or SSH. Also prevents against local pull, push (outbound) or bundle commands, but not effective, since you can just copy files instead then. Source of operation is in - `$HG_SOURCE`. If "serve", operation is happening on behalf of remote + ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote SSH or HTTP repository. If "push", "pull" or "bundle", operation is happening on behalf of repository on same system. -pretag;; +``pretag`` Run before creating a tag. Exit status 0 allows the tag to be created. Non-zero status will cause the tag to fail. ID of - changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is - local if `$HG_LOCAL=1`, in repository if `$HG_LOCAL=0`. -pretxnchangegroup;; + changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is + local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. +``pretxnchangegroup`` Run after a changegroup has been added via push, pull or unbundle, but before the transaction has been committed. Changegroup is visible to hook program. This lets you validate incoming changes before accepting them. Passed the ID of the first new changeset in - `$HG_NODE`. Exit status 0 allows the transaction to commit. Non-zero + ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero status will cause the transaction to be rolled back and the push, pull or unbundle will fail. URL that was source of changes is in - `$HG_URL`. -pretxncommit;; + ``$HG_URL``. +``pretxncommit`` Run after a changeset has been created but the transaction not yet committed. Changeset is visible to hook program. This lets you validate commit message and changes. Exit status 0 allows the commit to proceed. Non-zero status will cause the transaction to - be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset - IDs are in `$HG_PARENT1` and `$HG_PARENT2`. -preupdate;; + be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset + IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. +``preupdate`` Run before updating the working directory. Exit status 0 allows the update to proceed. Non-zero status will prevent the update. - Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID - of second new parent is in `$HG_PARENT2`. -tag;; - Run after a tag is created. ID of tagged changeset is in `$HG_NODE`. - Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in - repository if `$HG_LOCAL=0`. -update;; + Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID + of second new parent is in ``$HG_PARENT2``. +``tag`` + Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. + Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in + repository if ``$HG_LOCAL=0``. +``update`` Run after updating the working directory. Changeset ID of first - new parent is in `$HG_PARENT1`. If merge, ID of second new parent is - in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the - update failed (e.g. because conflicts not resolved), `$HG_ERROR=1`. + new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is + in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the + update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. NOTE: it is generally better to use standard hooks rather than the generic pre- and post- command hooks as they are guaranteed to be @@ -559,11 +567,11 @@ generate a commit (e.g. tag) and not just the commit command. NOTE: Environment variables with empty values may not be passed to -hooks on platforms such as Windows. As an example, `$HG_PARENT2` will +hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` will have an empty value under Unix-like platforms for non-merge changesets, while it will not be available at all under Windows. -The syntax for Python hooks is as follows: +The syntax for Python hooks is as follows:: hookname = python:modulename.submodule.callable hookname = python:/path/to/python/module.py:callable @@ -573,101 +581,111 @@ "ui"), a repository object (keyword "repo"), and a "hooktype" keyword that tells what kind of hook is used. Arguments listed as environment variables above are passed as keyword arguments, with no -"HG_" prefix, and names in lower case. +"``HG_``" prefix, and names in lower case. If a Python hook returns a "true" value or raises an exception, this is treated as a failure. --- + -[[http_proxy]] -http_proxy:: - Used to access web-based Mercurial repositories through a HTTP - proxy. - host;; +``http_proxy`` +"""""""""""""" +Used to access web-based Mercurial repositories through a HTTP +proxy. + +``host`` Host name and (optional) port of the proxy server, for example "myproxy:8000". - no;; +``no`` Optional. Comma-separated list of host names that should bypass the proxy. - passwd;; +``passwd`` Optional. Password to authenticate with at the proxy server. - user;; +``user`` Optional. User name to authenticate with at the proxy server. -[[smtp]] -smtp:: - Configuration for extensions that need to send email messages. - host;; +``smtp`` +"""""""" +Configuration for extensions that need to send email messages. + +``host`` Host name of mail server, e.g. "mail.example.com". - port;; +``port`` Optional. Port to connect to on mail server. Default: 25. - tls;; +``tls`` Optional. Whether to connect to mail server using TLS. True or False. Default: False. - username;; +``username`` Optional. User name to authenticate to SMTP server with. If username is specified, password must also be specified. Default: none. - password;; +``password`` Optional. Password to authenticate to SMTP server with. If username is specified, password must also be specified. Default: none. - local_hostname;; +``local_hostname`` Optional. It's the hostname that the sender can use to identify itself to the MTA. -[[patch]] -patch:: - Settings used when applying patches, for instance through the 'import' - command or with Mercurial Queues extension. - eol;; + +``patch`` +""""""""" +Settings used when applying patches, for instance through the 'import' +command or with Mercurial Queues extension. + +``eol`` When set to 'strict' patch content and patched files end of lines are preserved. When set to 'lf' or 'crlf', both files end of lines are ignored when patching and the result line endings are normalized to either LF (Unix) or CRLF (Windows). Default: strict. -[[paths]] -paths:: - Assigns symbolic names to repositories. The left side is the - symbolic name, and the right gives the directory or URL that is the - location of the repository. Default paths can be declared by setting - the following entries. - default;; + +``paths`` +""""""""" +Assigns symbolic names to repositories. The left side is the +symbolic name, and the right gives the directory or URL that is the +location of the repository. Default paths can be declared by setting +the following entries. + +``default`` Directory or URL to use when pulling if no source is specified. Default is set to repository from which the current repository was cloned. - default-push;; +``default-push`` Optional. Directory or URL to use when pushing if no destination is specified. -[[profiling]] -profiling:: - Specifies profiling format and file output. In this section - description, 'profiling data' stands for the raw data collected - during profiling, while 'profiling report' stands for a statistical - text report generated from the profiling data. The profiling is done - using lsprof. - format;; + +``profiling`` +""""""""""""" +Specifies profiling format and file output. In this section +description, 'profiling data' stands for the raw data collected +during profiling, while 'profiling report' stands for a statistical +text report generated from the profiling data. The profiling is done +using lsprof. + +``format`` Profiling format. Default: text. - text;; + + ``text`` Generate a profiling report. When saving to a file, it should be noted that only the report is saved, and the profiling data is not kept. - kcachegrind;; + ``kcachegrind`` Format profiling data for kcachegrind use: when saving to a file, the generated file can directly be loaded into kcachegrind. - output;; +``output`` File path where profiling data or report should be saved. If the file exists, it is replaced. Default: None, data is printed on stderr -[[server]] -server:: - Controls generic server settings. - uncompressed;; +``server`` +"""""""""" +Controls generic server settings. + +``uncompressed`` Whether to allow clients to clone a repository using the uncompressed streaming protocol. This transfers about 40% more data than a regular clone, but uses less memory and CPU on both @@ -677,174 +695,175 @@ about 6 Mbps), uncompressed streaming is slower, because of the extra data transfer overhead. Default is False. -[[trusted]] -trusted:: - For security reasons, Mercurial will not use the settings in the - `.hg/hgrc` file from a repository if it doesn't belong to a trusted - user or to a trusted group. The main exception is the web interface, - which automatically uses some safe settings, since it's common to - serve repositories from different users. -+ --- + +``trusted`` +""""""""""" +For security reasons, Mercurial will not use the settings in the +``.hg/hgrc`` file from a repository if it doesn't belong to a trusted +user or to a trusted group. The main exception is the web interface, +which automatically uses some safe settings, since it's common to +serve repositories from different users. + This section specifies what users and groups are trusted. The current user is always trusted. To trust everybody, list a user or a -group with name "`*`". +group with name "``*``". -users;; +``users`` Comma-separated list of trusted users. -groups;; +``groups`` Comma-separated list of trusted groups. --- + -[[ui]] -ui:: - User interface controls. -+ --- - archivemeta;; +``ui`` +"""""" + +User interface controls. + +``archivemeta`` Whether to include the .hg_archival.txt file containing meta data (hashes for the repository base and for tip) in archives created by the hg archive command or downloaded via hgweb. Default is true. - askusername;; +``askusername`` Whether to prompt for a username when committing. If True, and - neither `$HGUSER` nor `$EMAIL` has been specified, then the user will + neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will be prompted to enter a username. If no username is entered, the default USER@HOST is used instead. Default is False. - debug;; +``debug`` Print debugging information. True or False. Default is False. - editor;; - The editor to use during a commit. Default is `$EDITOR` or "vi". - fallbackencoding;; +``editor`` + The editor to use during a commit. Default is ``$EDITOR`` or "vi". +``fallbackencoding`` Encoding to try if it's not possible to decode the changelog using UTF-8. Default is ISO-8859-1. - ignore;; +``ignore`` A file to read per-user ignore patterns from. This file should be in the same format as a repository-wide .hgignore file. This option supports hook syntax, so if you want to specify multiple ignore files, you can do so by setting something like - "ignore.other = ~/.hgignore2". For details of the ignore file - format, see the hgignore(5) man page. - interactive;; + "``ignore.other = ~/.hgignore2``". For details of the ignore file + format, see the |hgignore(5)|_ man page. +``interactive`` Allow to prompt the user. True or False. Default is True. - logtemplate;; +``logtemplate`` Template string for commands that print changesets. - merge;; +``merge`` The conflict resolution program to use during a manual merge. There are some internal tools available: -+ - internal:local;; + + ``internal:local`` keep the local version - internal:other;; + ``internal:other`` use the other version - internal:merge;; + ``internal:merge`` use the internal non-interactive merge tool - internal:fail;; + ``internal:fail`` fail to merge -+ + For more information on configuring merge tools see the merge-tools section. - patch;; +``patch`` command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if unset. - quiet;; +``quiet`` Reduce the amount of output printed. True or False. Default is False. - remotecmd;; +``remotecmd`` remote command to use for clone/push/pull operations. Default is 'hg'. - report_untrusted;; - Warn if a `.hg/hgrc` file is ignored due to not being owned by a +``report_untrusted`` + Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a trusted user or group. True or False. Default is True. - slash;; - Display paths using a slash ("`/`") as the path separator. This +``slash`` + Display paths using a slash ("``/``") as the path separator. This only makes a difference on systems where the default path separator is not the slash character (e.g. Windows uses the - backslash character ("`\`")). + backslash character ("``\``")). Default is False. - ssh;; +``ssh`` command to use for SSH connections. Default is 'ssh'. - strict;; +``strict`` Require exact command names, instead of allowing unambiguous abbreviations. True or False. Default is False. - style;; +``style`` Name of style to use for command output. - timeout;; +``timeout`` The timeout used when a lock is held (in seconds), a negative value means no timeout. Default is 600. - username;; +``username`` The committer of a changeset created when running "commit". Typically a person's name and email address, e.g. "Fred Widget - ". Default is `$EMAIL` or username@hostname. If + ". Default is ``$EMAIL`` or username@hostname. If the username in hgrc is empty, it has to be specified manually or - in a different hgrc file (e.g. `$HOME/.hgrc`, if the admin set + in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set "username =" in the system hgrc). - verbose;; +``verbose`` Increase the amount of output printed. True or False. Default is False. --- + -[[web]] -web:: - Web interface configuration. - accesslog;; +``web`` +""""""" +Web interface configuration. + +``accesslog`` Where to output the access log. Default is stdout. - address;; +``address`` Interface address to bind to. Default is all. - allow_archive;; +``allow_archive`` List of archive format (bz2, gz, zip) allowed for downloading. Default is empty. - allowbz2;; +``allowbz2`` (DEPRECATED) Whether to allow .tar.bz2 downloading of repository revisions. Default is false. - allowgz;; +``allowgz`` (DEPRECATED) Whether to allow .tar.gz downloading of repository revisions. Default is false. - allowpull;; +``allowpull`` Whether to allow pulling from the repository. Default is true. - allow_push;; +``allow_push`` Whether to allow pushing to the repository. If empty or not set, - push is not allowed. If the special value "`*`", any remote user can + push is not allowed. If the special value "``*``", any remote user can push, including unauthenticated users. Otherwise, the remote user must have been authenticated, and the authenticated user name must be present in this list (separated by whitespace or ","). The contents of the allow_push list are examined after the deny_push list. - allow_read;; +``allow_read`` If the user has not already been denied repository access due to the contents of deny_read, this list determines whether to grant repository access to the user. If this list is not empty, and the user is unauthenticated or not present in the list (separated by whitespace or ","), then access is denied for the user. If the list is empty or not set, then access is permitted to all users by - default. Setting allow_read to the special value "`*`" is equivalent + default. Setting allow_read to the special value "``*``" is equivalent to it not being set (i.e. access is permitted to all users). The contents of the allow_read list are examined after the deny_read list. - allowzip;; +``allowzip`` (DEPRECATED) Whether to allow .zip downloading of repository revisions. Default is false. This feature creates temporary files. - baseurl;; +``baseurl`` Base URL to use when publishing URLs in other locations, so third-party tools like email notification hooks can construct URLs. Example: "http://hgserver/repos/" - contact;; +``contact`` Name or email address of the person in charge of the repository. - Defaults to ui.username or `$EMAIL` or "unknown" if unset or empty. - deny_push;; + Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty. +``deny_push`` Whether to deny pushing to the repository. If empty or not set, - push is not denied. If the special value "`*`", all remote users are + push is not denied. If the special value "``*``", all remote users are denied push. Otherwise, unauthenticated users are all denied, and any authenticated user name present in this list (separated by whitespace or ",") is also denied. The contents of the deny_push list are examined before the allow_push list. - deny_read;; +``deny_read`` Whether to deny reading/viewing of the repository. If this list is not empty, unauthenticated users are all denied, and any authenticated user name present in this list (separated by whitespace or ",") is also denied access to the repository. If set - to the special value "`*`", all remote users are denied access + to the special value "``*``", all remote users are denied access (rarely needed ;). If deny_read is empty or not set, the determination of repository access depends on the presence and content of the allow_read list (see description). If both @@ -854,44 +873,44 @@ the list of repositories. The contents of the deny_read list have priority over (are examined before) the contents of the allow_read list. - description;; +``description`` Textual description of the repository's purpose or contents. Default is "unknown". - encoding;; +``encoding`` Character encoding name. Example: "UTF-8" - errorlog;; +``errorlog`` Where to output the error log. Default is stderr. - hidden;; +``hidden`` Whether to hide the repository in the hgwebdir index. Default is false. - ipv6;; +``ipv6`` Whether to use IPv6. Default is false. - name;; +``name`` Repository name to use in the web interface. Default is current working directory. - maxchanges;; +``maxchanges`` Maximum number of changes to list on the changelog. Default is 10. - maxfiles;; +``maxfiles`` Maximum number of files to list per changeset. Default is 10. - port;; +``port`` Port to listen on. Default is 8000. - prefix;; +``prefix`` Prefix path to serve from. Default is '' (server root). - push_ssl;; +``push_ssl`` Whether to require that inbound pushes be transported over SSL to prevent password sniffing. Default is true. - staticurl;; +``staticurl`` Base URL to use for static files. If unset, static files (e.g. the hgicon.png favicon) will be served by the CGI script itself. Use this setting to serve them directly with the HTTP server. Example: "http://hgserver/static/" - stripes;; +``stripes`` How many lines a "zebra stripe" should span in multiline output. Default is 1; set to 0 to disable. - style;; +``style`` Which template map style to use. - templates;; +``templates`` Where to find the HTML templates. Default is install path. @@ -903,7 +922,7 @@ SEE ALSO -------- -hg(1), hgignore(5) +|hg(1)|_, |hgignore(5)|_ COPYING ------- @@ -911,3 +930,5 @@ Mercurial is copyright 2005-2009 Matt Mackall. Free use of this software is granted under the terms of the GNU General Public License (GPL). + +.. include:: common.txt diff -r 6fd3f795e908 -r ca143d86727c hgext/acl.py --- a/hgext/acl.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/acl.py Sun Jul 26 02:33:38 2009 +0200 @@ -22,7 +22,7 @@ Nor is it safe if remote users share an account, because then there is no way to distinguish them. -To use this hook, configure the acl extension in your hgrc like this: +To use this hook, configure the acl extension in your hgrc like this:: [extensions] hgext.acl = @@ -35,10 +35,10 @@ # ("serve" == ssh or http, "push", "pull", "bundle") sources = serve -The allow and deny sections take a subtree pattern as key (with a -glob syntax by default), and a comma separated list of users as -the corresponding value. The deny list is checked before the allow -list is. +The allow and deny sections take a subtree pattern as key (with a glob +syntax by default), and a comma separated list of users as the +corresponding value. The deny list is checked before the allow list +is. :: [acl.allow] # If acl.allow is not present, all users are allowed by default. diff -r 6fd3f795e908 -r ca143d86727c hgext/bookmarks.py --- a/hgext/bookmarks.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/bookmarks.py Sun Jul 26 02:33:38 2009 +0200 @@ -9,16 +9,16 @@ Bookmarks are local movable markers to changesets. Every bookmark points to a changeset identified by its hash. If you commit a -changeset that is based on a changeset that has a bookmark on it, -the bookmark shifts to the new changeset. +changeset that is based on a changeset that has a bookmark on it, the +bookmark shifts to the new changeset. -It is possible to use bookmark names in every revision lookup -(e.g. hg merge, hg update). +It is possible to use bookmark names in every revision lookup (e.g. hg +merge, hg update). By default, when several bookmarks point to the same changeset, they will all move forward together. It is possible to obtain a more git-like experience by adding the following configuration option to -your .hgrc: +your .hgrc:: [bookmarks] track.current = True @@ -296,14 +296,11 @@ write(self, marks) return result - def tags(self): + def _findtags(self): """Merge bookmarks with normal tags""" - if self.tagscache: - return self.tagscache - - tagscache = super(bookmark_repo, self).tags() - tagscache.update(parse(self)) - return tagscache + (tags, tagtypes) = super(bookmark_repo, self)._findtags() + tags.update(parse(self)) + return (tags, tagtypes) repo.__class__ = bookmark_repo diff -r 6fd3f795e908 -r ca143d86727c hgext/bugzilla.py --- a/hgext/bugzilla.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/bugzilla.py Sun Jul 26 02:33:38 2009 +0200 @@ -21,65 +21,86 @@ be run by Mercurial as the user pushing the change; you will need to ensure the Bugzilla install file permissions are set appropriately. -Configuring the extension: +The extension is configured through three different configuration +sections. These keys are recognized in the [bugzilla] section: + +host + Hostname of the MySQL server holding the Bugzilla database. + +db + Name of the Bugzilla database in MySQL. Default 'bugs'. + +user + Username to use to access MySQL server. Default 'bugs'. + +password + Password to use to access MySQL server. + +timeout + Database connection timeout (seconds). Default 5. - [bugzilla] +version + Bugzilla version. Specify '3.0' for Bugzilla versions 3.0 and later, + '2.18' for Bugzilla versions from 2.18 and '2.16' for versions prior + to 2.18. + +bzuser + Fallback Bugzilla user name to record comments with, if changeset + committer cannot be found as a Bugzilla user. + +bzdir + Bugzilla install directory. Used by default notify. Default + '/var/www/html/bugzilla'. + +notify + The command to run to get Bugzilla to send bug change notification + emails. Substitutes from a map with 3 keys, 'bzdir', 'id' (bug id) + and 'user' (committer bugzilla email). Default depends on version; + from 2.18 it is "cd %(bzdir)s && perl -T contrib/sendbugmail.pl + %(id)s %(user)s". - host Hostname of the MySQL server holding the Bugzilla - database. - db Name of the Bugzilla database in MySQL. Default 'bugs'. - user Username to use to access MySQL server. Default 'bugs'. - password Password to use to access MySQL server. - timeout Database connection timeout (seconds). Default 5. - version Bugzilla version. Specify '3.0' for Bugzilla versions - 3.0 and later, '2.18' for Bugzilla versions from 2.18 - and '2.16' for versions prior to 2.18. - bzuser Fallback Bugzilla user name to record comments with, if - changeset committer cannot be found as a Bugzilla user. - bzdir Bugzilla install directory. Used by default notify. - Default '/var/www/html/bugzilla'. - notify The command to run to get Bugzilla to send bug change - notification emails. Substitutes from a map with 3 - keys, 'bzdir', 'id' (bug id) and 'user' (committer - bugzilla email). Default depends on version; from 2.18 - it is "cd %(bzdir)s && perl -T contrib/sendbugmail.pl - %(id)s %(user)s". - regexp Regular expression to match bug IDs in changeset commit - message. Must contain one "()" group. The default - expression matches 'Bug 1234', 'Bug no. 1234', 'Bug - number 1234', 'Bugs 1234,5678', 'Bug 1234 and 5678' and - variations thereof. Matching is case insensitive. - style The style file to use when formatting comments. - template Template to use when formatting comments. Overrides - style if specified. In addition to the usual Mercurial - keywords, the extension specifies: - {bug} The Bugzilla bug ID. - {root} The full pathname of the Mercurial - repository. - {webroot} Stripped pathname of the Mercurial - repository. - {hgweb} Base URL for browsing Mercurial - repositories. - Default 'changeset {node|short} in repo {root} refers ' - 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' - strip The number of slashes to strip from the front of {root} - to produce {webroot}. Default 0. - usermap Path of file containing Mercurial committer ID to - Bugzilla user ID mappings. If specified, the file - should contain one mapping per line, - "committer"="Bugzilla user". See also the [usermap] - section. +regexp + Regular expression to match bug IDs in changeset commit message. + Must contain one "()" group. The default expression matches 'Bug + 1234', 'Bug no. 1234', 'Bug number 1234', 'Bugs 1234,5678', 'Bug + 1234 and 5678' and variations thereof. Matching is case insensitive. + +style + The style file to use when formatting comments. + +template + Template to use when formatting comments. Overrides style if + specified. In addition to the usual Mercurial keywords, the + extension specifies:: + + {bug} The Bugzilla bug ID. + {root} The full pathname of the Mercurial repository. + {webroot} Stripped pathname of the Mercurial repository. + {hgweb} Base URL for browsing Mercurial repositories. - [usermap] - Any entries in this section specify mappings of Mercurial - committer ID to Bugzilla user ID. See also [bugzilla].usermap. - "committer"="Bugzilla user" + Default 'changeset {node|short} in repo {root} refers ' + 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' + +strip + The number of slashes to strip from the front of {root} to produce + {webroot}. Default 0. + +usermap + Path of file containing Mercurial committer ID to Bugzilla user ID + mappings. If specified, the file should contain one mapping per + line, "committer"="Bugzilla user". See also the [usermap] section. - [web] - baseurl Base URL for browsing Mercurial repositories. Reference - from templates as {hgweb}. +The [usermap] section is used to specify mappings of Mercurial +committer ID to Bugzilla user ID. See also [bugzilla].usermap. +"committer"="Bugzilla user" + +Finally, the [web] section supports one entry: -Activating the extension: +baseurl + Base URL for browsing Mercurial repositories. Reference from + templates as {hgweb}. + +Activating the extension:: [extensions] hgext.bugzilla = @@ -92,7 +113,7 @@ This example configuration is for a collection of Mercurial repositories in /var/local/hg/repos/ used with a local Bugzilla 3.2 -installation in /opt/bugzilla-3.2. +installation in /opt/bugzilla-3.2. :: [bugzilla] host=localhost @@ -100,7 +121,9 @@ version=3.0 bzuser=unknown@domain.com bzdir=/opt/bugzilla-3.2 - template=Changeset {node|short} in {root|basename}.\\n{hgweb}/{webroot}/rev/{node|short}\\n\\n{desc}\\n + template=Changeset {node|short} in {root|basename}. + {hgweb}/{webroot}/rev/{node|short}\\n + {desc}\\n strip=5 [web] @@ -109,7 +132,7 @@ [usermap] user@emaildomain.com=user.name@bugzilladomain.com -Commits add a comment to the Bugzilla bug record of the form: +Commits add a comment to the Bugzilla bug record of the form:: Changeset 3b16791d6642 in repository-name. http://dev.domain.com/hg/repository-name/rev/3b16791d6642 diff -r 6fd3f795e908 -r ca143d86727c hgext/children.py diff -r 6fd3f795e908 -r ca143d86727c hgext/churn.py --- a/hgext/churn.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/churn.py Sun Jul 26 02:33:38 2009 +0200 @@ -104,7 +104,7 @@ alternatively the number of matching revisions if the --changesets option is specified. - Examples: + Examples:: # display count of changed lines for every committer hg churn -t '{author|email}' @@ -119,12 +119,12 @@ hg churn -f '%Y' -s It is possible to map alternate email addresses to a main address - by providing a file using the following format: + by providing a file using the following format:: - + - Such a file may be specified with the --aliases option, otherwise a - .hgchurn file will be looked for in the working directory root. + Such a file may be specified with the --aliases option, otherwise + a .hgchurn file will be looked for in the working directory root. ''' def pad(s, l): return (s + " " * l)[:l] @@ -143,8 +143,8 @@ if not rate: return - sortfn = ((not opts.get('sort')) and (lambda a, b: cmp(b[1], a[1])) or None) - rate.sort(sortfn) + sortkey = ((not opts.get('sort')) and (lambda x: -x[1]) or None) + rate.sort(key=sortkey) maxcount = float(max([v for k, v in rate])) maxname = max([len(k) for k, v in rate]) diff -r 6fd3f795e908 -r ca143d86727c hgext/color.py --- a/hgext/color.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/color.py Sun Jul 26 02:33:38 2009 +0200 @@ -29,33 +29,33 @@ function (aka ANSI escape codes). This module also provides the render_text function, which can be used to add effects to any text. -Default effects may be overridden from the .hgrc file: +Default effects may be overridden from the .hgrc file:: -[color] -status.modified = blue bold underline red_background -status.added = green bold -status.removed = red bold blue_background -status.deleted = cyan bold underline -status.unknown = magenta bold underline -status.ignored = black bold + [color] + status.modified = blue bold underline red_background + status.added = green bold + status.removed = red bold blue_background + status.deleted = cyan bold underline + status.unknown = magenta bold underline + status.ignored = black bold -# 'none' turns off all effects -status.clean = none -status.copied = none + # 'none' turns off all effects + status.clean = none + status.copied = none -qseries.applied = blue bold underline -qseries.unapplied = black bold -qseries.missing = red bold + qseries.applied = blue bold underline + qseries.unapplied = black bold + qseries.missing = red bold -diff.diffline = bold -diff.extended = cyan bold -diff.file_a = red bold -diff.file_b = green bold -diff.hunk = magenta -diff.deleted = red -diff.inserted = green -diff.changed = white -diff.trailingwhitespace = bold red_background + diff.diffline = bold + diff.extended = cyan bold + diff.file_a = red bold + diff.file_b = green bold + diff.hunk = magenta + diff.deleted = red + diff.inserted = green + diff.changed = white + diff.trailingwhitespace = bold red_background ''' import os, sys @@ -146,9 +146,9 @@ for patch in patches: patchname = patch if opts['summary']: - patchname = patchname.split(': ')[0] + patchname = patchname.split(': ', 1)[0] if ui.verbose: - patchname = patchname.split(' ', 2)[-1] + patchname = patchname.lstrip().split(' ', 2)[-1] if opts['missing']: effects = _patch_effects['missing'] @@ -158,7 +158,9 @@ effects = _patch_effects['applied'] else: effects = _patch_effects['unapplied'] - ui.write(render_effects(patch, effects) + '\n') + + patch = patch.replace(patchname, render_effects(patchname, effects), 1) + ui.write(patch + '\n') return retval _patch_effects = { 'applied': ['blue', 'bold', 'underline'], diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/__init__.py --- a/hgext/convert/__init__.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/__init__.py Sun Jul 26 02:33:38 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) @@ -41,23 +43,28 @@ basename of the source with '-hg' appended. If the destination repository doesn't exist, it will be created. - By default, all sources except Mercurial will use - --branchsort. Mercurial 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. + By default, all sources except Mercurial will use --branchsort. + Mercurial 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. 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: - + revision, like so:: + + If the file doesn't exist, it's automatically created. It's updated on each commit copied, so convert-repo can be interrupted @@ -71,7 +78,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: + contain one of the following directives:: include path/to/file @@ -81,11 +88,11 @@ 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 files and directories not explicitly included. - The 'exclude' directive causes files or directories to be omitted. - The 'rename' directive renames a file or directory. To rename from - a subdirectory into the root of the repository, use '.' as the - path to rename to. + exclusion of all other files and directories not explicitly + included. The 'exclude' directive causes files or directories to + be omitted. The 'rename' directive renames a file or directory. To + rename from a subdirectory into the root of the repository, use + '.' as the path to rename to. The splicemap is a file that allows insertion of synthetic history, letting you specify the parents of a revision. This is @@ -110,7 +117,7 @@ in one repository from "default" to a named branch. Mercurial Source - ----------------- + ---------------- --config convert.hg.ignoreerrors=False (boolean) ignore integrity errors when reading. Use it to fix Mercurial @@ -138,36 +145,38 @@ 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: - --config convert.cvsps='cvsps -A -u --cvs-direct -q' + be configured to call the external 'cvsps' program by setting:: + + --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 - --config convert.cvsps=builtin + Internal cvsps is selected by setting :: + + --config convert.cvsps=builtin + and has a few more configurable options: - --config convert.cvsps.cache=True (boolean) - Set to False to disable remote log caching, for testing and - debugging purposes. - --config convert.cvsps.fuzz=60 (integer) - Specify the maximum time (in seconds) that is allowed - between commits with identical user and log message in a - single changeset. When very large files were checked in as - part of a changeset then the default may not be long - enough. - --config convert.cvsps.mergeto='{{mergetobranch ([-\\w]+)}}' - Specify a regular expression to which commit log messages - are matched. If a match occurs, then the conversion - process will insert a dummy revision merging the branch on - which this log message occurs to the branch indicated in - the regex. - --config convert.cvsps.mergefrom='{{mergefrombranch ([-\\w]+)}}' - Specify a regular expression to which commit log messages - are matched. If a match occurs, then the conversion - process will add the most recent revision on the branch - indicated in the regex as the second parent of the - changeset. + + --config convert.cvsps.cache=True (boolean) + Set to False to disable remote log caching, for testing and + debugging purposes. + --config convert.cvsps.fuzz=60 (integer) + Specify the maximum time (in seconds) that is allowed between + commits with identical user and log message in a single + changeset. When very large files were checked in as part of a + changeset then the default may not be long enough. + --config convert.cvsps.mergeto='{{mergetobranch ([-\\w]+)}}' + Specify a regular expression to which commit log messages are + matched. If a match occurs, then the conversion process will + insert a dummy revision merging the branch on which this log + message occurs to the branch indicated in the regex. + --config convert.cvsps.mergefrom='{{mergefrombranch ([-\\w]+)}}' + Specify a regular expression to which commit log messages are + matched. If a match occurs, then the conversion process will + add the most recent revision on the branch indicated in the + regex as the second parent of the changeset. The hgext/convert/cvsps wrapper script allows the builtin changeset merging code to be run without doing a conversion. Its @@ -217,7 +226,6 @@ --config convert.p4.startrev=0 (perforce changelist number) specify initial Perforce revision. - Mercurial Destination --------------------- diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/cvs.py --- a/hgext/convert/cvs.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/cvs.py Sun Jul 26 02:33:38 2009 +0200 @@ -38,8 +38,8 @@ self.lastbranch = {} self.parent = {} self.socket = None - self.cvsroot = file(os.path.join(cvs, "Root")).read()[:-1] - self.cvsrepo = file(os.path.join(cvs, "Repository")).read()[:-1] + self.cvsroot = open(os.path.join(cvs, "Root")).read()[:-1] + self.cvsrepo = open(os.path.join(cvs, "Repository")).read()[:-1] self.encoding = locale.getpreferredencoding() self._connect() diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/cvsps.py --- a/hgext/convert/cvsps.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/cvsps.py Sun Jul 26 02:33:38 2009 +0200 @@ -12,13 +12,6 @@ from mercurial import util from mercurial.i18n import _ -def listsort(list, key): - "helper to sort by key in Python 2.3" - try: - list.sort(key=key) - except TypeError: - list.sort(lambda l, r: cmp(key(l), key(r))) - class logentry(object): '''Class logentry has the following attributes: .author - author name as CVS knows it @@ -130,7 +123,7 @@ # Get the real directory in the repository try: - prefix = file(os.path.join('CVS','Repository')).read().strip() + prefix = open(os.path.join('CVS','Repository')).read().strip() if prefix == ".": prefix = "" directory = prefix @@ -142,7 +135,7 @@ # Use the Root file in the sandbox, if it exists try: - root = file(os.path.join('CVS','Root')).read().strip() + root = open(os.path.join('CVS','Root')).read().strip() except IOError: pass @@ -175,7 +168,7 @@ if cache == 'update': try: ui.note(_('reading cvs log cache %s\n') % cachefile) - oldlog = pickle.load(file(cachefile)) + oldlog = pickle.load(open(cachefile)) ui.note(_('cache has %d log entries\n') % len(oldlog)) except Exception, e: ui.note(_('error reading cache: %r\n') % e) @@ -419,7 +412,7 @@ if len(log) % 100 == 0: ui.status(util.ellipsis('%d %s' % (len(log), e.file), 80)+'\n') - listsort(log, key=lambda x:(x.rcs, x.revision)) + log.sort(key=lambda x: (x.rcs, x.revision)) # find parent revisions of individual files versions = {} @@ -435,7 +428,7 @@ if cache: if log: # join up the old and new logs - listsort(log, key=lambda x:x.date) + log.sort(key=lambda x: x.date) if oldlog and oldlog[-1].date >= log[0].date: raise logerror('Log cache overlaps with new log entries,' @@ -445,7 +438,7 @@ # write the new cachefile ui.note(_('writing cvs log cache %s\n') % cachefile) - pickle.dump(log, file(cachefile, 'w')) + pickle.dump(log, open(cachefile, 'w')) else: log = oldlog @@ -484,7 +477,7 @@ # Merge changesets - listsort(log, key=lambda x:(x.comment, x.author, x.branch, x.date)) + log.sort(key=lambda x: (x.comment, x.author, x.branch, x.date)) changesets = [] files = set() diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/hg.py --- a/hgext/convert/hg.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/hg.py Sun Jul 26 02:33:38 2009 +0200 @@ -183,7 +183,7 @@ tagparent = nullid try: - oldlines = sorted(parentctx['.hgtags'].data().splitlines(1)) + oldlines = sorted(parentctx['.hgtags'].data().splitlines(True)) except: oldlines = [] diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/p4.py --- a/hgext/convert/p4.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/p4.py Sun Jul 26 02:33:38 2009 +0200 @@ -92,7 +92,7 @@ # list with depot pathnames, longest first vieworder = views.keys() - vieworder.sort(key=lambda x: -len(x)) + vieworder.sort(key=len, reverse=True) # handle revision limiting startrev = self.ui.config('convert', 'p4.startrev', default=0) diff -r 6fd3f795e908 -r ca143d86727c hgext/convert/subversion.py --- a/hgext/convert/subversion.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/convert/subversion.py Sun Jul 26 02:33:38 2009 +0200 @@ -2,7 +2,6 @@ # # Copyright(C) 2007 Daniel Holth et al -import locale import os import re import sys diff -r 6fd3f795e908 -r ca143d86727c hgext/extdiff.py --- a/hgext/extdiff.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/extdiff.py Sun Jul 26 02:33:38 2009 +0200 @@ -8,13 +8,13 @@ '''command to allow external programs to compare revisions The `extdiff' Mercurial extension allows you to use external programs -to compare revisions, or revision with working directory. The external diff -programs are called with a configurable set of options and two +to compare revisions, or revision with working directory. The external +diff programs are called with a configurable set of options and two non-option arguments: paths to directories containing snapshots of files to compare. The `extdiff' extension also allows to configure new diff commands, so -you do not need to type "hg extdiff -p kdiff3" always. +you do not need to type "hg extdiff -p kdiff3" always. :: [extdiff] # add new command that runs GNU diff(1) in 'context diff' mode @@ -30,8 +30,8 @@ meld = # add new command called vimdiff, runs gvimdiff with DirDiff plugin - # (see http://www.vim.org/scripts/script.php?script_id=102) - # Non English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in + # (see http://www.vim.org/scripts/script.php?script_id=102) Non + # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in # your .vimrc vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' @@ -211,18 +211,17 @@ '''use closure to save diff command to use''' def mydiff(ui, repo, *pats, **opts): return dodiff(ui, repo, path, diffopts, pats, opts) - mydiff.__doc__ = '''use %(path)s to diff repository (or selected files) + mydiff.__doc__ = _('''\ +use %(path)s to diff repository (or selected files) - Show differences between revisions for the specified - files, using the %(path)s program. + Show differences between revisions for the specified files, using the + %(path)s program. - When two revision arguments are given, then changes are - shown between those revisions. If only one revision is - specified then that revision is compared to the working - directory, and, when no revisions are specified, the - working directory files are compared to its parent.''' % { - 'path': util.uirepr(path), - } + When two revision arguments are given, then changes are shown between + those revisions. If only one revision is specified then that revision is + compared to the working directory, and, when no revisions are specified, + the working directory files are compared to its parent.\ +''') % dict(path=util.uirepr(path)) return mydiff cmdtable[cmd] = (save(cmd, path, diffopts), cmdtable['extdiff'][1][1:], diff -r 6fd3f795e908 -r ca143d86727c hgext/fetch.py diff -r 6fd3f795e908 -r ca143d86727c hgext/graphlog.py --- a/hgext/graphlog.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/graphlog.py Sun Jul 26 02:33:38 2009 +0200 @@ -95,7 +95,7 @@ else: nodeline[2 * end] = "+" if start > end: - (start, end) = (end,start) + (start, end) = (end, start) for i in range(2 * start + 1, 2 * end): if nodeline[i] != "+": nodeline[i] = "-" diff -r 6fd3f795e908 -r ca143d86727c hgext/hgcia.py --- a/hgext/hgcia.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/hgcia.py Sun Jul 26 02:33:38 2009 +0200 @@ -3,38 +3,38 @@ """hooks for integrating with the CIA.vc notification service -This is meant to be run as a changegroup or incoming hook. -To configure it, set the following options in your hgrc: +This is meant to be run as a changegroup or incoming hook. To +configure it, set the following options in your hgrc:: -[cia] -# your registered CIA user name -user = foo -# the name of the project in CIA -project = foo -# the module (subproject) (optional) -#module = foo -# Append a diffstat to the log message (optional) -#diffstat = False -# Template to use for log messages (optional) -#template = {desc}\\n{baseurl}/rev/{node}-- {diffstat} -# Style to use (optional) -#style = foo -# The URL of the CIA notification service (optional) -# You can use mailto: URLs to send by email, eg -# mailto:cia@cia.vc -# Make sure to set email.from if you do this. -#url = http://cia.vc/ -# print message instead of sending it (optional) -#test = False + [cia] + # your registered CIA user name + user = foo + # the name of the project in CIA + project = foo + # the module (subproject) (optional) + #module = foo + # Append a diffstat to the log message (optional) + #diffstat = False + # Template to use for log messages (optional) + #template = {desc}\\n{baseurl}/rev/{node}-- {diffstat} + # Style to use (optional) + #style = foo + # The URL of the CIA notification service (optional) + # You can use mailto: URLs to send by email, eg + # mailto:cia@cia.vc + # Make sure to set email.from if you do this. + #url = http://cia.vc/ + # print message instead of sending it (optional) + #test = False -[hooks] -# one of these: -changegroup.cia = python:hgcia.hook -#incoming.cia = python:hgcia.hook + [hooks] + # one of these: + changegroup.cia = python:hgcia.hook + #incoming.cia = python:hgcia.hook -[web] -# If you want hyperlinks (optional) -baseurl = http://server/path/to/repo + [web] + # If you want hyperlinks (optional) + baseurl = http://server/path/to/repo """ from mercurial.i18n import _ @@ -205,7 +205,7 @@ msg['From'] = self.emailfrom msg['Subject'] = 'DeliverXML' msg['Content-type'] = 'text/xml' - msgtext = msg.as_string(0) + msgtext = msg.as_string() self.ui.status(_('hgcia: sending update to %s\n') % address) mail.sendmail(self.ui, util.email(self.emailfrom), diff -r 6fd3f795e908 -r ca143d86727c hgext/hgk.py --- a/hgext/hgk.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/hgk.py Sun Jul 26 02:33:38 2009 +0200 @@ -19,19 +19,20 @@ The hg view command will launch the hgk Tcl script. For this command to work, hgk must be in your search path. Alternately, you can specify -the path to hgk in your .hgrc file: +the path to hgk in your .hgrc file:: [hgk] path=/location/of/hgk hgk can make use of the extdiff extension to visualize revisions. -Assuming you had already configured extdiff vdiff command, just add: +Assuming you had already configured extdiff vdiff command, just add:: [hgk] vdiff=vdiff Revisions context menu will now display additional entries to fire -vdiff on hovered and selected revisions.''' +vdiff on hovered and selected revisions. +''' import os from mercurial import commands, util, patch, revlog, cmdutil diff -r 6fd3f795e908 -r ca143d86727c hgext/highlight/__init__.py --- a/hgext/highlight/__init__.py Sat Jul 25 10:08:20 2009 -0700 +++ b/hgext/highlight/__init__.py Sun Jul 26 02:33:38 2009 +0200 @@ -13,10 +13,10 @@ It depends on the Pygments syntax highlighting library: http://pygments.org/ -There is a single configuration option: +There is a single configuration option:: -[web] -pygments_style =