summaryrefslogtreecommitdiff
path: root/sys/src/cmd/hg/doc
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/hg/doc
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/hg/doc')
-rw-r--r--sys/src/cmd/hg/doc/Makefile48
-rw-r--r--sys/src/cmd/hg/doc/README17
-rw-r--r--sys/src/cmd/hg/doc/common.txt8
-rw-r--r--sys/src/cmd/hg/doc/gendoc.py115
-rw-r--r--sys/src/cmd/hg/doc/hg.1.txt96
-rw-r--r--sys/src/cmd/hg/doc/hgignore.5.txt111
-rw-r--r--sys/src/cmd/hg/doc/hgrc.5.txt934
-rw-r--r--sys/src/cmd/hg/doc/ja/Makefile21
-rw-r--r--sys/src/cmd/hg/doc/ja/docbook.ja.conf583
-rw-r--r--sys/src/cmd/hg/doc/ja/docbook.ja.xsl23
-rw-r--r--sys/src/cmd/hg/doc/ja/hg.1.ja.txt867
-rw-r--r--sys/src/cmd/hg/doc/ja/hgrc.5.ja.txt204
12 files changed, 3027 insertions, 0 deletions
diff --git a/sys/src/cmd/hg/doc/Makefile b/sys/src/cmd/hg/doc/Makefile
new file mode 100644
index 000000000..02f5fef36
--- /dev/null
+++ b/sys/src/cmd/hg/doc/Makefile
@@ -0,0 +1,48 @@
+SOURCES=$(wildcard *.[0-9].txt)
+MAN=$(SOURCES:%.txt=%)
+HTML=$(SOURCES:%.txt=%.html)
+PREFIX=/usr/local
+MANDIR=$(PREFIX)/share/man
+INSTALL=install -c -m 644
+PYTHON=python
+RST2HTML=rst2html
+RST2MAN=rst2man
+
+all: man html
+
+man: $(MAN)
+
+html: $(HTML)
+
+hg.1.txt: hg.1.gendoc.txt
+ touch hg.1.txt
+
+hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py
+ ${PYTHON} gendoc.py > $@
+
+%: %.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/' \
+ > $*
+
+%.html: %.txt common.txt
+ $(RST2HTML) $*.txt > $*.html
+
+MANIFEST: man html
+ # tracked files are already in the main MANIFEST
+ $(RM) $@
+ for i in $(MAN) $(HTML) hg.1.gendoc.txt; do \
+ echo "doc/$$i" >> $@ ; \
+ done
+
+install: man
+ for i in $(MAN) ; do \
+ subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \
+ mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \
+ $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
+ done
+
+clean:
+ $(RM) $(MAN) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST
diff --git a/sys/src/cmd/hg/doc/README b/sys/src/cmd/hg/doc/README
new file mode 100644
index 000000000..d28170dac
--- /dev/null
+++ b/sys/src/cmd/hg/doc/README
@@ -0,0 +1,17 @@
+Mercurial's documentation is kept in reStructuredText format, which is
+a simple plain text format that's easy to read and edit:
+
+ http://docutils.sourceforge.net/rst.html
+
+It's also convertible to a variety of other formats including standard
+UNIX man page format and HTML.
+
+To do this, you'll need to install the rst2html and rst2man tools,
+which are part of Docutils:
+
+ http://docutils.sourceforge.net/
+
+The rst2man tool is still in their so-called "sandbox". The above page
+has links to tarballs of both Docutils and their sandbox.
+
+Use the Makefile in this directory to generate the man and HTML pages.
diff --git a/sys/src/cmd/hg/doc/common.txt b/sys/src/cmd/hg/doc/common.txt
new file mode 100644
index 000000000..936fc203b
--- /dev/null
+++ b/sys/src/cmd/hg/doc/common.txt
@@ -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 --git a/sys/src/cmd/hg/doc/gendoc.py b/sys/src/cmd/hg/doc/gendoc.py
new file mode 100644
index 000000000..c0b0ec452
--- /dev/null
+++ b/sys/src/cmd/hg/doc/gendoc.py
@@ -0,0 +1,115 @@
+import os, sys, textwrap
+# import from the live mercurial repo
+sys.path.insert(0, "..")
+# fall back to pure modules if required C extensions are not available
+sys.path.append(os.path.join('..', 'mercurial', 'pure'))
+from mercurial import demandimport; demandimport.enable()
+from mercurial.commands import table, globalopts
+from mercurial.i18n import _
+from mercurial.help import helptable
+
+def get_desc(docstr):
+ if not docstr:
+ return "", ""
+ # sanitize
+ docstr = docstr.strip("\n")
+ docstr = docstr.rstrip()
+ shortdesc = docstr.splitlines()[0].strip()
+
+ i = docstr.find("\n")
+ if i != -1:
+ desc = docstr[i+2:]
+ else:
+ desc = " %s" % shortdesc
+ return (shortdesc, desc)
+
+def get_opts(opts):
+ for shortopt, longopt, default, desc in opts:
+ allopts = []
+ if shortopt:
+ allopts.append("-%s" % shortopt)
+ if longopt:
+ allopts.append("--%s" % longopt)
+ desc += default and _(" (default: %s)") % default or ""
+ yield(", ".join(allopts), desc)
+
+def get_cmd(cmd):
+ d = {}
+ attr = table[cmd]
+ cmds = cmd.lstrip("^").split("|")
+
+ d['cmd'] = cmds[0]
+ d['aliases'] = cmd.split("|")[1:]
+ d['desc'] = get_desc(attr[0].__doc__)
+ d['opts'] = list(get_opts(attr[1]))
+
+ s = 'hg ' + cmds[0]
+ if len(attr) > 2:
+ if not attr[2].startswith('hg'):
+ s += ' ' + attr[2]
+ else:
+ s = attr[2]
+ d['synopsis'] = s
+
+ return d
+
+def show_doc(ui):
+ def section(s):
+ ui.write("%s\n%s\n\n" % (s, "-" * len(s)))
+ def subsection(s):
+ ui.write("%s\n%s\n\n" % (s, '"' * len(s)))
+
+ # print options
+ section(_("OPTIONS"))
+ for optstr, desc in get_opts(globalopts):
+ ui.write("%s\n %s\n\n" % (optstr, desc))
+
+ # print cmds
+ section(_("COMMANDS"))
+ h = {}
+ for c, attr in table.items():
+ f = c.split("|")[0]
+ f = f.lstrip("^")
+ h[f] = c
+ cmds = h.keys()
+ cmds.sort()
+
+ for f in cmds:
+ if f.startswith("debug"): continue
+ d = get_cmd(h[f])
+ # synopsis
+ 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\n"))
+ for optstr, desc in opt_output:
+ if desc:
+ s = "%-*s %s" % (opts_len, optstr, desc)
+ else:
+ s = optstr
+ s = textwrap.fill(s, initial_indent=4 * " ",
+ subsequent_indent=(6 + opts_len) * " ")
+ ui.write("%s\n" % s)
+ ui.write("\n")
+ # aliases
+ if d['aliases']:
+ ui.write(_(" aliases: %s\n\n") % " ".join(d['aliases']))
+
+ # print topics
+ for names, sec, doc in helptable:
+ for name in names:
+ ui.write(".. _%s:\n" % name)
+ ui.write("\n")
+ section(sec.upper())
+ if callable(doc):
+ doc = doc()
+ ui.write(doc)
+ ui.write("\n")
+
+if __name__ == "__main__":
+ show_doc(sys.stdout)
diff --git a/sys/src/cmd/hg/doc/hg.1.txt b/sys/src/cmd/hg/doc/hg.1.txt
new file mode 100644
index 000000000..66e211217
--- /dev/null
+++ b/sys/src/cmd/hg/doc/hg.1.txt
@@ -0,0 +1,96 @@
+====
+ hg
+====
+
+---------------------------------------
+Mercurial source code management system
+---------------------------------------
+
+:Author: Matt Mackall <mpm@selenic.com>
+:Organization: Mercurial
+:Manual section: 1
+:Manual group: Mercurial Manual
+
+
+SYNOPSIS
+--------
+**hg** *command* [*option*]... [*argument*]...
+
+DESCRIPTION
+-----------
+The **hg** command provides a command line interface to the Mercurial
+system.
+
+COMMAND ELEMENTS
+----------------
+
+files...
+ indicates one or more filename or relative path filenames; see
+ "FILE NAME PATTERNS" for information on pattern matching
+
+path
+ indicates a path on the local machine
+
+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
+ either the pathname of a local repository or the URI of a remote
+ repository.
+
+.. include:: hg.1.gendoc.txt
+
+FILES
+-----
+
+``.hgignore``
+ This file contains regular expressions (one per line) that
+ describe file names that should be ignored by **hg**. For details,
+ see |hgignore(5)|_.
+
+``.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.
+
+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
+----
+Probably lots, please post them to the mailing list (See Resources
+below) when you find them.
+
+SEE ALSO
+--------
+|hgignore(5)|_, |hgrc(5)|_
+
+AUTHOR
+------
+Written by Matt Mackall <mpm@selenic.com>
+
+RESOURCES
+---------
+Main Web Site: http://mercurial.selenic.com/
+
+Source code repository: http://selenic.com/hg
+
+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 --git a/sys/src/cmd/hg/doc/hgignore.5.txt b/sys/src/cmd/hg/doc/hgignore.5.txt
new file mode 100644
index 000000000..e98dc40d1
--- /dev/null
+++ b/sys/src/cmd/hg/doc/hgignore.5.txt
@@ -0,0 +1,111 @@
+==========
+ hgignore
+==========
+
+---------------------------------
+syntax for Mercurial ignore files
+---------------------------------
+
+:Author: Vadim Gelfer <vadim.gelfer@gmail.com>
+:Organization: Mercurial
+:Manual section: 5
+:Manual group: Mercurial Manual
+
+SYNOPSIS
+--------
+
+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.
+
+DESCRIPTION
+-----------
+
+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
+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``.
+
+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
+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.
+
+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
+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::
+
+ syntax: NAME
+
+where ``NAME`` is one of the following:
+
+``regexp``
+ Regular expression, Python/Perl syntax.
+``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 "``^``".
+
+EXAMPLE
+-------
+
+Here is an example ignore file. ::
+
+ # use glob syntax.
+ syntax: glob
+
+ *.elc
+ *.pyc
+ *~
+
+ # switch to regexp syntax.
+ syntax: regexp
+ ^\.pc/
+
+AUTHOR
+------
+Vadim Gelfer <vadim.gelfer@gmail.com>
+
+Mercurial was written by Matt Mackall <mpm@selenic.com>.
+
+SEE ALSO
+--------
+|hg(1)|_, |hgrc(5)|_
+
+COPYING
+-------
+This manual page is copyright 2006 Vadim Gelfer.
+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 --git a/sys/src/cmd/hg/doc/hgrc.5.txt b/sys/src/cmd/hg/doc/hgrc.5.txt
new file mode 100644
index 000000000..7618cc614
--- /dev/null
+++ b/sys/src/cmd/hg/doc/hgrc.5.txt
@@ -0,0 +1,934 @@
+======
+ hgrc
+======
+
+---------------------------------
+configuration files for Mercurial
+---------------------------------
+
+:Author: Bryan O'Sullivan <bos@serpentine.com>
+:Organization: Mercurial
+:Manual section: 5
+:Manual group: Mercurial Manual
+
+
+SYNOPSIS
+--------
+
+The Mercurial system uses a set of configuration files to control
+aspects of its behavior.
+
+FILES
+-----
+
+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
+alphabetical order, later ones overriding earlier ones. Where multiple
+paths are given below, settings from later paths override earlier
+ones.
+
+| (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
+| (Unix) ``<install-root>/etc/mercurial/hgrc``
+
+ Per-installation configuration files, searched for in the
+ directory where Mercurial is installed. ``<install-root>`` 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``
+
+ 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) ``<install-dir>\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
+ be read.
+
+| (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
+ 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) ``<repo>/.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
+ this file override options in all other configuration files. On
+ Unix, most of this file will be ignored if it doesn't belong to a
+ trusted user or to a trusted group. See the documentation for the
+ trusted section below for more details.
+
+SYNTAX
+------
+
+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
+ green=
+ eggs
+
+Each line contains one entry. If the lines that follow are indented,
+they are treated as continuations of that entry.
+
+Leading whitespace is removed from values. Empty lines are skipped.
+
+Lines beginning with "``#``" or "``;``" are ignored and may be used to provide
+comments.
+
+SECTIONS
+--------
+
+This section describes the different sections that may appear in a
+Mercurial "hgrc" file, the purpose of each section, its possible keys,
+and their possible values.
+
+``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> = <command> [<argument]...
+
+For example, this definition::
+
+ latest = log --limit 5
+
+creates a new command ``latest`` that shows only the five most recent
+changesets. You can define subsequent aliases using earlier ones::
+
+ stable5 = latest -b stable
+
+NOTE: It is possible to create aliases with the same names as existing
+commands, which will then override the original definitions. This is
+almost always a bad idea!
+
+
+``auth``
+""""""""
+Authentication credentials for HTTP authentication. Each line has
+the following format::
+
+ <name>.<argument> = <value>
+
+where <name> is used to group arguments into authentication entries.
+Example::
+
+ foo.prefix = hg.intevation.org/mercurial
+ foo.username = foo
+ foo.password = bar
+ foo.schemes = http https
+
+ bar.prefix = secure.example.org
+ bar.key = path/to/file.key
+ bar.cert = path/to/file.cert
+ bar.schemes = https
+
+Supported arguments:
+
+``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
+ 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``
+ 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``
+ 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``
+ Optional. PEM encoded client certificate key file.
+``cert``
+ Optional. PEM encoded client certificate chain file.
+``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
+ static-http and static-https respectively, as well.
+ Default: https.
+
+If no suitable authentication entry is found, the user is prompted
+for credentials as usual if required by the remote.
+
+
+``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``".
+
+The filter command can start with a specifier, either "pipe:" or
+"tempfile:". If no specifier is given, "pipe:" is used by default.
+
+A "pipe:" command must accept data on stdin and return the transformed
+data on stdout.
+
+Pipe example::
+
+ [encode]
+ # uncompress gzip files on checkin to improve delta compression
+ # note: not necessarily a good idea, just an example
+ *.gz = pipe: gunzip
+
+ [decode]
+ # recompress gzip files when writing them to the working dir (we
+ # can safely omit "pipe:", because it's the default)
+ *.gz = gzip
+
+A "tempfile:" command is a template. The string INFILE is replaced
+with the name of a temporary file that contains the data to be
+filtered by the command. The string OUTFILE is replaced with the name
+of an empty temporary file, where the filtered data must be written by
+the command.
+
+NOTE: the tempfile mechanism is recommended for Windows systems, where
+the standard shell I/O redirection operators often have strange
+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::
+
+ [extensions]
+ hgext.win32text =
+ [encode]
+ ** = cleverencode:
+ [decode]
+ ** = cleverdecode:
+
+or if you only want to translate certain files::
+
+ [extensions]
+ hgext.win32text =
+ [encode]
+ **.txt = dumbencode:
+ [decode]
+ **.txt = dumbdecode:
+
+
+``defaults``
+""""""""""""
+
+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::
+
+ [defaults]
+ log = -v
+ status = -m
+
+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``
+""""""""
+
+Settings used when displaying diffs. They are all Boolean and
+defaults to False.
+
+``git``
+ Use git extended diff format.
+``nodates``
+ Don't include dates in diff headers.
+``showfunc``
+ Show which function each change is in.
+``ignorews``
+ Ignore white space when comparing lines.
+``ignorewsamount``
+ Ignore changes in the amount of white space.
+``ignoreblanklines``
+ Ignore changes whose lines are all blank.
+
+``email``
+"""""""""
+Settings for extensions that send email messages.
+
+``from``
+ Optional. Email address to use in "From" header and SMTP envelope
+ of outgoing messages.
+``to``
+ Optional. Comma-separated list of recipients' email addresses.
+``cc``
+ Optional. Comma-separated list of carbon copy recipients'
+ email addresses.
+``bcc``
+ Optional. Comma-separated list of blind carbon copy recipients'
+ email addresses. Cannot be set interactively.
+``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``
+ 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
+ conversion fails, the text in question is sent as is. Defaults to
+ empty (explicit) list.
+
+Order of outgoing email character sets::
+
+ us-ascii always first, regardless of settings
+ email.charsets in order given by user
+ ui.fallbackencoding if not in email.charsets
+ $HGENCODING if not in email.charsets
+ utf-8 always last, regardless of settings
+
+Email example::
+
+ [email]
+ from = Joseph User <joe.user@example.com>
+ method = /usr/sbin/sendmail
+ # 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``
+""""""""""""""
+
+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 "``=``".
+
+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
+supplied.
+
+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``
+""""""""""
+
+``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
+ you to store longer filenames in some situations at the expense of
+ compatibility and ensures that the on-disk format of newly created
+ repositories will be compatible with Mercurial before version 0.9.4.
+
+``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
+ reserved names, e.g. "nul". Enabled by default. Disabling this
+ option ensures that the on-disk format of newly created
+ repositories will be compatible with Mercurial before version 1.1.
+
+``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``
+"""""""""""""""
+
+This section configures external merge tools to use for file-level
+merges.
+
+Example ``~/.hgrc``::
+
+ [merge-tools]
+ # Override stock tool location
+ kdiff3.executable = ~/bin/kdiff3
+ # Specify command line
+ kdiff3.args = $base $local $other -o $output
+ # Give higher priority
+ kdiff3.priority = 1
+
+ # Define new tool
+ myHtmlTool.args = -m $local $other $base $output
+ myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
+ myHtmlTool.priority = 1
+
+Supported arguments:
+
+``priority``
+ The priority in which to evaluate this tool.
+ Default: 0.
+``executable``
+ Either just the name of the executable or its pathname.
+ Default: the tool name.
+``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``
+ Attempt to run internal non-interactive 3-way merge tool before
+ launching external tool.
+ Default: True
+``binary``
+ This tool can merge binary files. Defaults to False, unless tool
+ was selected by file pattern match.
+``symlink``
+ This tool can merge symlinks. Defaults to False, even if tool was
+ selected by file pattern match.
+``checkconflicts``
+ Check whether there are conflicts even though the tool reported
+ success.
+ Default: False
+``checkchanged``
+ Check whether outputs were written even though the tool reported
+ success.
+ Default: False
+``fixeol``
+ Attempt to fix up EOL changes caused by the merge tool.
+ Default: False
+``gui``
+ This tool requires a graphical interface to run. Default: False
+``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``.
+ Default: None
+``regname``
+ Name of value to read from specified registry key. Defaults to the
+ unnamed (default) value.
+``regappend``
+ String to append to the value read from the registry, typically
+ the executable name of the tool.
+ Default: None
+
+
+``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
+ incoming =
+ incoming.email = /my/email/hook
+ incoming.autobuild = /my/build/hook
+
+Most hooks are run with environment variables set that give useful
+additional information. For each hook below, the environment
+variables it is passed are listed with names of the form "$HG_foo".
+
+``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``
+ 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``
+ 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``
+ 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-<command>``
+ 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-<command>``
+ Run before executing the associated command. The contents of the
+ command line are passed as ``$HG_ARGS``. If the hook returns failure,
+ the command doesn't execute and Mercurial returns the failure
+ code.
+``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``
+ 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``
+ 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
+ SSH or HTTP repository. If "push", "pull" or "bundle", operation
+ is happening on behalf of repository on same system.
+``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``
+ 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
+ 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``
+ 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``
+ 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``
+ 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``.
+
+NOTE: it is generally better to use standard hooks rather than the
+generic pre- and post- command hooks as they are guaranteed to be
+called in the appropriate contexts for influencing transactions.
+Also, hooks like "commit" will be called in all contexts that
+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
+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::
+
+ hookname = python:modulename.submodule.callable
+ hookname = python:/path/to/python/module.py:callable
+
+Python hooks are run within the Mercurial process. Each hook is
+called with at least three keyword arguments: a ui object (keyword
+"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.
+
+If a Python hook returns a "true" value or raises an exception, this
+is treated as a failure.
+
+
+``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``
+ Optional. Comma-separated list of host names that should bypass
+ the proxy.
+``passwd``
+ Optional. Password to authenticate with at the proxy server.
+``user``
+ Optional. User name to authenticate with at the proxy server.
+
+``smtp``
+""""""""
+Configuration for extensions that need to send email messages.
+
+``host``
+ Host name of mail server, e.g. "mail.example.com".
+``port``
+ Optional. Port to connect to on mail server. Default: 25.
+``tls``
+ Optional. Whether to connect to mail server using TLS. True or
+ False. Default: False.
+``username``
+ Optional. User name to authenticate to SMTP server with. If
+ username is specified, password must also be specified.
+ Default: none.
+``password``
+ Optional. Password to authenticate to SMTP server with. If
+ username is specified, password must also be specified.
+ Default: none.
+``local_hostname``
+ Optional. It's the hostname that the sender can use to identify
+ itself to the MTA.
+
+
+``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``
+"""""""""
+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``
+ Optional. Directory or URL to use when pushing if no destination
+ is specified.
+
+
+``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``
+ 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``
+ Format profiling data for kcachegrind use: when saving to a
+ file, the generated file can directly be loaded into
+ kcachegrind.
+``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``
+""""""""""
+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
+ server and client. Over a LAN (100 Mbps or better) or a very fast
+ WAN, an uncompressed streaming clone is a lot faster (~10x) than a
+ regular clone. Over most WAN connections (anything slower than
+ about 6 Mbps), uncompressed streaming is slower, because of the
+ extra data transfer overhead. Default is False.
+
+
+``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 "``*``".
+
+``users``
+ Comma-separated list of trusted users.
+``groups``
+ Comma-separated list of trusted groups.
+
+
+``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``
+ Whether to prompt for a username when committing. If True, and
+ 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``
+ Print debugging information. True or False. Default is False.
+``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``
+ 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``
+ Allow to prompt the user. True or False. Default is True.
+``logtemplate``
+ Template string for commands that print changesets.
+``merge``
+ The conflict resolution program to use during a manual merge.
+ There are some internal tools available:
+
+ ``internal:local``
+ keep the local version
+ ``internal:other``
+ use the other version
+ ``internal:merge``
+ use the internal non-interactive merge tool
+ ``internal:fail``
+ fail to merge
+
+For more information on configuring merge tools see the
+merge-tools section.
+
+``patch``
+ command to use to apply patches. Look for 'gpatch' or 'patch' in
+ PATH if unset.
+``quiet``
+ Reduce the amount of output printed. True or False. Default is False.
+``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
+ trusted user or group. True or False. Default is True.
+``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 ("``\``")).
+ Default is False.
+``ssh``
+ command to use for SSH connections. Default is 'ssh'.
+``strict``
+ Require exact command names, instead of allowing unambiguous
+ abbreviations. True or False. Default is False.
+``style``
+ Name of style to use for command output.
+``timeout``
+ The timeout used when a lock is held (in seconds), a negative value
+ means no timeout. Default is 600.
+``username``
+ The committer of a changeset created when running "commit".
+ Typically a person's name and email address, e.g. "Fred Widget
+ <fred@example.com>". 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
+ "username =" in the system hgrc).
+``verbose``
+ Increase the amount of output printed. True or False. Default is False.
+
+
+``web``
+"""""""
+Web interface configuration.
+
+``accesslog``
+ Where to output the access log. Default is stdout.
+``address``
+ Interface address to bind to. Default is all.
+``allow_archive``
+ List of archive format (bz2, gz, zip) allowed for downloading.
+ Default is empty.
+``allowbz2``
+ (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
+ revisions.
+ Default is false.
+``allowgz``
+ (DEPRECATED) Whether to allow .tar.gz downloading of repository
+ revisions.
+ Default is false.
+``allowpull``
+ Whether to allow pulling from the repository. Default is true.
+``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, 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``
+ 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
+ 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``
+ (DEPRECATED) Whether to allow .zip downloading of repository
+ revisions. Default is false. This feature creates temporary files.
+``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``
+ 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``
+ Whether to deny pushing to the repository. If empty or not set,
+ 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``
+ 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
+ (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
+ deny_read and allow_read are empty or not set, then access is
+ permitted to all users by default. If the repository is being
+ served via hgwebdir, denied users will not be able to see it in
+ 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``
+ Textual description of the repository's purpose or contents.
+ Default is "unknown".
+``encoding``
+ Character encoding name.
+ Example: "UTF-8"
+``errorlog``
+ Where to output the error log. Default is stderr.
+``hidden``
+ Whether to hide the repository in the hgwebdir index.
+ Default is false.
+``ipv6``
+ Whether to use IPv6. Default is false.
+``name``
+ Repository name to use in the web interface. Default is current
+ working directory.
+``maxchanges``
+ Maximum number of changes to list on the changelog. Default is 10.
+``maxfiles``
+ Maximum number of files to list per changeset. Default is 10.
+``port``
+ Port to listen on. Default is 8000.
+``prefix``
+ Prefix path to serve from. Default is '' (server root).
+``push_ssl``
+ Whether to require that inbound pushes be transported over SSL to
+ prevent password sniffing. Default is true.
+``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``
+ How many lines a "zebra stripe" should span in multiline output.
+ Default is 1; set to 0 to disable.
+``style``
+ Which template map style to use.
+``templates``
+ Where to find the HTML templates. Default is install path.
+
+
+AUTHOR
+------
+Bryan O'Sullivan <bos@serpentine.com>.
+
+Mercurial was written by Matt Mackall <mpm@selenic.com>.
+
+SEE ALSO
+--------
+|hg(1)|_, |hgignore(5)|_
+
+COPYING
+-------
+This manual page is copyright 2005 Bryan O'Sullivan.
+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 --git a/sys/src/cmd/hg/doc/ja/Makefile b/sys/src/cmd/hg/doc/ja/Makefile
new file mode 100644
index 000000000..154239fb4
--- /dev/null
+++ b/sys/src/cmd/hg/doc/ja/Makefile
@@ -0,0 +1,21 @@
+SOURCES=$(wildcard *.[0-9].ja.txt)
+MAN=$(SOURCES:%.txt=%)
+HTML=$(SOURCES:%.txt=%.html)
+
+all: man html
+
+man: $(MAN)
+
+html: $(HTML)
+
+%: %.xml
+ xmlto -x docbook.ja.xsl man $*.xml
+
+%.xml: %.txt
+ -asciidoc -d manpage -b docbook -f docbook.ja.conf $*.txt
+
+%.html: %.txt
+ asciidoc -b html4 $*.txt
+
+clean:
+ $(RM) $(MAN:%.ja=%) $(MAN:%=%.xml) $(MAN:%=%.html)
diff --git a/sys/src/cmd/hg/doc/ja/docbook.ja.conf b/sys/src/cmd/hg/doc/ja/docbook.ja.conf
new file mode 100644
index 000000000..355692ab2
--- /dev/null
+++ b/sys/src/cmd/hg/doc/ja/docbook.ja.conf
@@ -0,0 +1,583 @@
+#
+# docbook.conf
+#
+# Asciidoc configuration file.
+# Modified docbook backend for Japanese.
+#
+
+[miscellaneous]
+outfilesuffix=.xml
+# Printable page width in pts.
+pagewidth=380
+pageunits=pt
+
+[attributes]
+basebackend=docbook
+basebackend-docbook=
+
+[replacements]
+# Line break markup is dropped (there is no DocBook line break tag).
+(?m)^(.*)\s\+$=\1
+# Superscripts.
+\^(.+?)\^=<superscript>\1</superscript>
+# Subscripts.
+~(.+?)~=<subscript>\1</subscript>
+
+[ruler-blockmacro]
+# Only applies to HTML so don't output anything.
+
+[image-inlinemacro]
+<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
+ </imageobject>
+ <textobject><phrase>{1={target}}</phrase></textobject>
+</inlinemediaobject>
+
+[image-blockmacro]
+<figure{id? id="{id}"}><title>{title}</title>
+{title%}<informalfigure{id? id="{id}"}>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
+ </imageobject>
+ <textobject><phrase>{1={target}}</phrase></textobject>
+</mediaobject>
+{title#}</figure>
+{title%}</informalfigure>
+
+[indexterm-inlinemacro]
+# Inline index term.
+# Generate separate index entries for primary, secondary and tertiary
+# descriptions.
+# Primary only.
+{2%}<indexterm>
+{2%} <primary>{1}</primary>
+{2%}</indexterm>
+# Primary and secondary.
+{2#}{3%}<indexterm>
+{2#}{3%} <primary>{1}</primary><secondary>{2}</secondary>
+{2#}{3%}</indexterm>
+{2#}{3%}<indexterm>
+{2#}{3%} <primary>{2}</primary>
+{2#}{3%}</indexterm>
+# Primary, secondary and tertiary.
+{3#}<indexterm>
+ <primary>{1}</primary><secondary>{2}</secondary><tertiary>{3}</tertiary>
+{3#}</indexterm>
+{3#}<indexterm>
+ <primary>{2}</primary><secondary>{3}</secondary>
+{3#}</indexterm>
+{3#}<indexterm>
+ <primary>{3}</primary>
+{3#}</indexterm>
+
+[indexterm2-inlinemacro]
+# Inline index term.
+# Single entry index term that is visible in the primary text flow.
+<indexterm>
+ <primary>{1}</primary>
+</indexterm>
+{1}
+
+[footnote-inlinemacro]
+# Inline footnote.
+<footnote><simpara>{0}</simpara></footnote>
+
+[callout-inlinemacro]
+# Inline callout.
+<co id="{coid}"/>
+
+[tags]
+# Bulleted, numbered and labeled list tags.
+ilist=<itemizedlist{id? id="{id}"}>{title?<title>{title}</title>}|</itemizedlist>
+ilistitem=<listitem>|</listitem>
+ilisttext=<simpara>|</simpara>
+olist=<orderedlist{id? id="{id}"}>{title?<title>{title}</title>}|</orderedlist>
+olist2=<orderedlist{id? id="{id}"} numeration="loweralpha">|</orderedlist>
+olistitem=<listitem>|</listitem>
+olisttext=<simpara>|</simpara>
+vlist=<variablelist{id? id="{id}"}>{title?<title>{title}</title>}|</variablelist>
+vlistentry=<varlistentry>|</varlistentry>
+vlistterm=<term>|</term>
+vlisttext=<simpara>|</simpara>
+vlistitem=<listitem>|</listitem>
+# Horizontal labeled list (implemented with two column table).
+# Hardwired column widths to 30%,70% because the current crop of PDF
+# generators do not auto calculate column widths.
+hlist=<{title?table}{title!informaltable}{id? id="{id}"} tabstyle="{style=hlabeledlist}" pgwide="0" frame="none" colsep="0" rowsep="0">{title?<title>{title}</title>}<tgroup cols="2"><colspec colwidth="{1=3}*"/><colspec colwidth="{2=7}*"/><tbody valign="top">|</tbody></tgroup><{title?/table}{title!/informaltable}>
+hlistentry=<row>|</row>
+hlisttext=<simpara>|</simpara>
+hlistterm=<entry><simpara>|</simpara></entry>
+hlistitem=<entry>|</entry>
+
+# Question and Answer list.
+qlist=<qandaset{id? id="{id}"}>{title?<title>{title}</title>}|</qandaset>
+qlistentry=<qandaentry>|</qandaentry>
+qlistterm=<question><simpara>|</simpara></question>
+qlistitem=<answer>|</answer>
+qlisttext=<simpara>|</simpara>
+# Bibliography list.
+blist=|
+blistitem=<bibliomixed>|</bibliomixed>
+blisttext=<bibliomisc>|</bibliomisc>
+# Glossary list.
+glist=|
+glistentry=<glossentry>|</glossentry>
+glistterm=<glossterm>|</glossterm>
+glistitem=<glossdef>|</glossdef>
+glisttext=<simpara>|</simpara>
+# Callout list.
+colist=<calloutlist{id? id="{id}"}>{title?<title>{title}</title>}|</calloutlist>
+colistitem=<callout arearefs="{coids}">|</callout>
+colisttext=<simpara>|</simpara>
+
+# Quoted text
+emphasis=<emphasis>|</emphasis>
+strong=<emphasis role="strong">|</emphasis>
+monospaced=<literal>|</literal>
+quoted={amp}#8220;|{amp}#8221;
+
+# Inline macros
+[http-inlinemacro]
+<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
+[https-inlinemacro]
+<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
+[ftp-inlinemacro]
+<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
+[file-inlinemacro]
+<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
+[mailto-inlinemacro]
+<ulink url="{name}:{target}">{0={target}}</ulink>
+#<email>{target}</email>
+[link-inlinemacro]
+<ulink url="{target}">{0={target}}</ulink>
+# anchor:id[text]
+[anchor-inlinemacro]
+<anchor id="{target}" xreflabel="{0=[{target}]}"/>
+# [[id,text]]
+[anchor2-inlinemacro]
+<anchor id="{1}" xreflabel="{2=[{1}]}"/>
+# [[[id]]]
+[anchor3-inlinemacro]
+<anchor id="{1}" xreflabel="[{1}]"/>[{1}]
+# xref:id[text]
+[xref-inlinemacro]
+<link linkend="{target}">{0}</link>
+{2%}<xref linkend="{target}"/>
+# <<id,text>>
+[xref2-inlinemacro]
+<link linkend="{1}">{2}</link>
+{2%}<xref linkend="{1}"/>
+
+
+# Special word macros
+[emphasizedwords]
+<emphasis>{words}</emphasis>
+[monospacedwords]
+<literal>{words}</literal>
+[strongwords]
+<emphasis role="strong">{words}</emphasis>
+
+# Paragraph substitution.
+[paragraph]
+<formalpara{id? id="{id}"}><title>{title}</title><para>
+{title%}<simpara{id? id="{id}"}>
+|
+{title%}</simpara>
+{title#}</para></formalpara>
+{empty}
+
+[admonitionparagraph]
+<{name}{id? id="{id}"}><simpara>|</simpara></{name}>
+
+[literalparagraph]
+# The literal block employs the same markup.
+template::[literalblock]
+
+[verseparagraph]
+template::[verseblock]
+
+# Delimited blocks.
+[literalblock]
+<example><title>{title}</title>
+<literallayout{id? id="{id}"} class="{font=monospaced}">
+|
+</literallayout>
+{title#}</example>
+
+[listingblock]
+<example><title>{title}</title>
+<screen>
+|
+</screen>
+{title#}</example>
+
+[verseblock]
+<formalpara{id? id="{id}"}><title>{title}</title><para>
+{title%}<literallayout{id? id="{id}"}>
+{title#}<literallayout>
+|
+</literallayout>
+{title#}</para></formalpara>
+
+[sidebarblock]
+<sidebar{id? id="{id}"}>
+<title>{title}</title>
+|
+</sidebar>
+
+[backendblock]
+|
+
+[quoteblock]
+# The epigraph element may be more appropriate than blockquote.
+<blockquote{id? id="{id}"}>
+<title>{title}</title>
+<attribution>
+{attribution}
+<citetitle>{citetitle}</citetitle>
+</attribution>
+|
+</blockquote>
+
+[exampleblock]
+<{title?example}{title!informalexample}{id? id="{id}"}>
+<title>{title}</title>
+|
+</{title?example}{title!informalexample}>
+
+[admonitionblock]
+<{name}{id? id="{id}"}>
+<title>{title}</title>
+|
+</{name}>
+
+# Tables.
+[tabledef-default]
+template=table
+colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"/>
+bodyrow=<row>|</row>
+bodydata=<entry>|</entry>
+
+[table]
+<{title?table}{title!informaltable}{id? id="{id}"} pgwide="0"
+frame="{frame=topbot}"
+{grid%rowsep="0" colsep="0"}
+{eval:\{"none":"rowsep=\"0\" colsep=\"0\"", "cols":"rowsep=\"0\" colsep=\"1\"", "all":"rowsep=\"1\" colsep=\"1\"", "rows":"rowsep=\"1\" colsep=\"0\"" \}["{grid}"]}
+>
+<title>{title}</title>
+<tgroup cols="{cols}">
+{colspecs}
+{headrows#}<thead>
+{headrows}
+{headrows#}</thead>
+{footrows#}<tfoot>
+{footrows}
+{footrows#}</tfoot>
+<tbody>
+{bodyrows}
+</tbody>
+</tgroup>
+</{title?table}{title!informaltable}>
+
+[specialsections]
+ifdef::doctype-article[]
+^Abstract$=sect-abstract
+endif::doctype-article[]
+
+ifdef::doctype-book[]
+^Colophon$=sect-colophon
+^Dedication$=sect-dedication
+^Preface$=sect-preface
+endif::doctype-book[]
+
+^Index$=sect-index
+^(Bibliography|References)$=sect-bibliography
+^Glossary$=sect-glossary
+^Appendix [A-Z][:.](?P<title>.*)$=sect-appendix
+
+# Special sections.
+[sect-preface]
+<preface{id? id="{id}"}>
+<title>{title}</title>
+|
+</preface>
+
+[sect-index]
+<index{id? id="{id}"}>
+<title>{title}</title>
+|
+</index>
+
+[sect-bibliography]
+<bibliography{id? id="{id}"}>
+<title>{title}</title>
+|
+</bibliography>
+
+[sect-glossary]
+<glossary{id? id="{id}"}>
+<title>{title}</title>
+|
+</glossary>
+
+[sect-appendix]
+<appendix{id? id="{id}"}>
+<title>{title}</title>
+|
+</appendix>
+
+
+[header-declarations]
+<?xml version="1.0" encoding="{encoding}"?>
+<!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+#-------------------------
+# article document type
+#-------------------------
+ifdef::doctype-article[]
+
+[header]
+template::[header-declarations]
+
+<article lang="ja">
+{doctitle#}<articleinfo>
+ <title>{doctitle}</title>
+ <date>{date}</date>
+ {authored#}<author>
+ <firstname>{firstname}</firstname>
+ <othername>{middlename}</othername>
+ <surname>{lastname}</surname>
+ <affiliation><address><email>{email}</email></address></affiliation>
+ {authored#}</author>
+
+# If file named like source document with -revhistory.xml suffix exists
+# include it as the document history, otherwise use current revision.
+{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
+{revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
+
+ <corpname>{companyname}</corpname>
+{doctitle#}</articleinfo>
+
+[footer]
+</article>
+
+[preamble]
+# Untitled elements between header and first section title.
+|
+
+[sect-abstract]
+<abstract{id? id="{id}"}>
+|
+</abstract>
+
+[sect1]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+[sect2]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+[sect3]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+[sect4]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+endif::doctype-article[]
+
+#-------------------------
+# manpage document type
+#-------------------------
+ifdef::doctype-manpage[]
+
+[replacements]
+# The roff format does not substitute special characters so just print them as
+# text.
+\(C\)=(C)
+\(TM\)=(TM)
+
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+</refmeta>
+<refnamediv>
+ <refname>{manname}</refname>
+ <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+
+[footer]
+</refentry>
+
+# Section macros
+[sect-synopsis]
+<refsynopsisdiv{id? id="{id}"}>
+|
+</refsynopsisdiv>
+
+[sect1]
+<refsect1{id? id="{id}"}>
+<title>{title}</title>
+|
+</refsect1>
+
+[sect2]
+<refsect2{id? id="{id}"}>
+<title>{title}</title>
+|
+</refsect2>
+
+[sect3]
+<refsect3{id? id="{id}"}>
+<title>{title}</title>
+|
+</refsect3>
+
+endif::doctype-manpage[]
+
+#-------------------------
+# book document type
+#-------------------------
+ifdef::doctype-book[]
+
+[header]
+template::[header-declarations]
+
+<book lang="ja">
+{doctitle#}<bookinfo>
+ <title>{doctitle}</title>
+ <date>{date}</date>
+ {authored#}<author>
+ <firstname>{firstname}</firstname>
+ <othername>{middlename}</othername>
+ <surname>{lastname}</surname>
+ <affiliation><address><email>{email}</email></address></affiliation>
+ {authored#}</author>
+
+# If file named like source document with -revhistory.xml suffix exists
+# include it as the document history, otherwise use current revision.
+{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
+{revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
+
+ <corpname>{companyname}</corpname>
+{doctitle#}</bookinfo>
+
+[footer]
+</book>
+
+[preamble]
+# Preamble is not allowed in DocBook book so wrap it in a preface.
+<preface{id? id="{id}"}>
+<title>Preface</title>
+|
+</preface>
+
+[sect-dedication]
+<dedication{id? id="{id}"}>
+|
+</dedication>
+
+[sect-colophon]
+<colophon{id? id="{id}"}>
+|
+</colophon>
+
+[sect0]
+<part{id? id="{id}"}>
+<title>{title}</title>
+|
+</part>
+
+[sect1]
+<chapter{id? id="{id}"}>
+<title>{title}</title>
+|
+</chapter>
+
+[sect2]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+[sect3]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+[sect4]
+<section{id? id="{id}"}>
+<title>{title}</title>
+|
+</section>
+
+endif::doctype-book[]
+
+ifdef::sgml[]
+#
+# Optional DocBook SGML.
+#
+# Most of the differences between DocBook XML and DocBook SGML boils
+# down to the empty element syntax: SGML does not like the XML empty
+# element <.../> syntax, use <...> instead.
+#
+[miscellaneous]
+outfilesuffix=.sgml
+
+[header-declarations]
+<!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+
+[tabledef-default]
+colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}">
+
+[image-inlinemacro]
+<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
+ </imageobject>
+ <textobject><phrase>{1={target}}</phrase></textobject>
+</inlinemediaobject>
+
+[image-blockmacro]
+<figure><title>{title}</title>
+{title%}<informalfigure>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
+ </imageobject>
+ <textobject><phrase>{1={target}}</phrase></textobject>
+</mediaobject>
+{title#}</figure>
+{title%}</informalfigure>
+
+# Inline macros
+[xref-inlinemacro]
+<link linkend="{target}">{0}</link>
+{2%}<xref linkend="{target}">
+[xref2-inlinemacro]
+# <<id,text>>
+<link linkend="{1}">{2}</link>
+{2%}<xref linkend="{1}">
+[anchor-inlinemacro]
+<anchor id="{target}" xreflabel="{0=[{target}]}">
+[anchor2-inlinemacro]
+# [[id,text]]
+<anchor id="{1}" xreflabel="{2=[{1}]}">
+
+endif::sgml[]
diff --git a/sys/src/cmd/hg/doc/ja/docbook.ja.xsl b/sys/src/cmd/hg/doc/ja/docbook.ja.xsl
new file mode 100644
index 000000000..aba2d65c1
--- /dev/null
+++ b/sys/src/cmd/hg/doc/ja/docbook.ja.xsl
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
+ <xsl:output encoding="UTF-8"/>
+
+ <xsl:template match="refnamediv">
+ <xsl:text>.SH 名前&#10;</xsl:text>
+ <xsl:for-each select="refname">
+ <xsl:if test="position()>1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text> \- </xsl:text>
+ <xsl:value-of select="normalize-space (refpurpose)"/>
+ </xsl:template>
+
+ <xsl:template match="refsynopsisdiv">
+ <xsl:text>&#10;.SH "曞匏"&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/sys/src/cmd/hg/doc/ja/hg.1.ja.txt b/sys/src/cmd/hg/doc/ja/hg.1.ja.txt
new file mode 100644
index 000000000..889cb4b57
--- /dev/null
+++ b/sys/src/cmd/hg/doc/ja/hg.1.ja.txt
@@ -0,0 +1,867 @@
+HG(1)
+=====
+Matt Mackall <mpm@selenic.com>
+
+名前
+--
+hg - Mercurial ゜ヌスコヌド管理システム
+
+曞匏
+--
+'hg' [-v -d -q -y] <command> [command options] [files]
+
+説明
+--
+hg(1) コマンドは Mercurial システムぞのコマンドラむンむンタヌフェ
+むスを提䟛したす。
+
+オプション
+----
+
+-R, --repository::
+ リポゞトリのルヌトディレクトリを指定したす。
+
+--cwd::
+ 䜜業ディレクトリを倉曎したす。
+
+-y, --noninteractive::
+ プロンプトを出さずに、芁求された答えが党お 'yes' であるず仮定
+ したす。
+
+-q, --quiet::
+ 出力を抑制したす。
+
+-v, --verbose::
+ さらなる出力を可胜にしたす。
+
+7--debug::
+ デバッグ出力を可胜にしたす。
+
+--traceback::
+ 䟋倖時にトレヌスバックを衚瀺したす。
+
+--time::
+ コマンドにどのくらい時間がかかるかを衚瀺したす。
+
+--profile::
+ コマンドを実行したずきのプロファむルを衚瀺したす。
+
+--version::
+ バヌゞョン情報を衚瀺しお終了したす。
+
+-h, --help::
+ ヘルプを衚瀺しお終了したす。
+
+コマンドの芁玠
+-------
+
+files ...::
+ 1぀以䞊のファむル名か盞察的なパスを衚したす; パタヌンマッチン
+ グの情報は「ファむル名のパタヌン」を参照しおください。
+
+path::
+ ロヌカルマシン䞊のパスを衚したす
+
+revision::
+ チェンゞセットのリビゞョンナンバヌ, タグ, チェンゞセットのハッ
+ シュ倀のナニヌクな郚分文字列により指定できるチェンゞセットを衚
+ したす
+
+repository path::
+ ロヌカルのリポゞトリのパス名かリモヌトのリポゞトリの URI を衚
+ したす。URI のプロトコルずしおは珟圚 2 ぀が利甚可胜です。
+ http:// は高速で、static-http:// は遅いですがりェブのホストに特別
+ なサヌバを必芁ずしたせん。
+
+コマンド
+----
+
+add [options] [files ...]::
+ ファむルをバヌゞョン管理䞋に眮きリポゞトリに远加するこずを予定
+ したす。
+
+ ファむルは次にコミット時にリポゞトリに远加されたす。
+
+ ファむル名が䞎えられなければ、珟圚のディレクトリずサブディレク
+ トリの党おのファむルを远加したす。
+
+addremove [options] [files ...]::
+ 新しいファむルを党お远加し無くなったファむルを党おリポゞトリか
+ ら取り陀きたす。
+
+ 新しいファむルは .hgignore 䞭のパタヌンにマッチした堎合無芖さ
+ れたす。add のようにこの倉曎は次のコミット時に効果を持ちたす。
+
+annotate [-r <rev> -u -n -c] [files ...]::
+ ファむル䞭の倉曎を列挙し、各行の原因であるリビゞョン id を衚瀺
+ したす。
+
+ このコマンドある倉曎が生じた際に誰がその倉曎をしたかを発芋する
+ のに圹に立ちたす。
+
+ -a オプションが無いず、annotate はバむナリずしお怜出されたファ
+ むルを避けるようになりたす。-a があるず、annotate はずくかく泚
+ 釈を生成し、おそらく望たしくない結果になるでしょう。
+
+ オプション:
+ -a, --text 党おのファむルをテキストずしお扱いたす
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含め
+ たす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+ -r, --revision <rev> 指定されたリビゞョンの泚釈を生成したす
+ -u, --user 著者を列挙したす
+ -c, --changeset チェンゞセットを列挙したす
+ -n, --number リビゞョンナンバヌを列挙したす
+ (デフォルト)
+
+bundle <file> <other>::
+ (実隓的)
+
+ 他のリポゞトリには芋付からなかった党おのチェンゞセットを集めた、
+ 圧瞮枈みチェンゞグルヌプファむルを生成したす。
+
+ このファむルは埓来の方法で転送するこずができ、他のリポゞトリに
+ unbundle コマンドで適甚できたす。これは push ず pull が䜿えな
+ いか、リポゞトリ党䜓を゚クスポヌトしおしたうこずが望たしくない
+ ずきに䟿利です。暙準のファむル拡匵子は ".hg" です。
+
+ import/export ず違っお、これはパヌミッション、名前倉曎のデヌタ、
+ リビゞョンの履歎を含めたチェンゞセットの内容党おを保存したす。
+
+cat [options] <file ...>::
+ 指定されたファむルを䞎えられたリビゞョンの内容で衚瀺したす。リ
+ ビゞョンが指定されなかった堎合は tip が䜿われたす。
+
+ 出力はファむルに察しおも可胜です。その堎合、ファむル名はフォヌ
+ マット文字列により指定されたす。フォヌマット芏則は export コマ
+ ンドず同じですが、さらに次のものが远加されたす。
+
+ %s 出力されるファむルのベヌス名
+ %d 出力されるファむルのディレクトリ名か、リポゞトリのルヌト
+ にいる堎合は "."
+ %p 出力されるファむルのルヌトからの盞察パス
+
+ オプション:
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前
+ を含めたす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前
+ を陀倖したす
+ -o, --output <filespec> 敎圢された名前でファむルに出力した
+ す
+ -r, --rev <rev> 䞎えられたリビゞョンを衚瀺したす
+
+clone [-U] <source> [dest]::
+ 既存のリポゞトリのコピヌを新しいディレクトリに䜜成したす
+
+ コピヌ先のディレクトリ名が指定されなければ、デフォルトで゜ヌス
+ のベヌス名を䜿甚したす。
+
+ 今埌の pull に䜿えるように、コピヌ元が新しいリポゞトリの
+ .hg/hgrc に远加されたす。
+
+ 効率のために、コピヌ元ずコピヌ先が同じファむルシステム䞊にある
+ 堎合はハヌドリンクが䜿われたす。
+
+ オプションン:
+ -U, --noupdate 新しい䜜業ディレクトリで update を行いたせん
+ -e, --ssh 䜿甚される ssh コマンドを指定したす
+ --remotecmd リモヌト偎で実行する hg コマンドを指定したす
+
+commit [options] [files...]::
+ 指定されたファむルの倉曎をリポゞトリにコミットしたす。
+
+ もしファむルのリストが省略されたら、リポゞトリのルヌトから実行
+ した"hg status" で報告される党おの倉曎がコミットされたす。
+
+ HGEDITOR や EDITOR 環境倉数はコミット時のコメントを远加する゚
+ ディタを起動するために䜿われたす。
+
+ オプション:
+
+ -A, --addremove コミット䞭に addremove を実行したす
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含め
+ たす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+ -m, --message <text> <text> をコミットメッセヌゞずしお䜿いた
+ す
+ -l, --logfile <file> <file> からコミットメッセヌゞを読み蟌み
+ たす
+ -d, --date <datecode> datecode をコミットした日付ずしお蚘録し
+ たす
+ -u, --user <user> user をコミッタずしお蚘録したす。
+
+ 別名: ci
+
+copy <source ...> <dest>::
+ コピヌ先がコピヌ元のファむルのコピヌを持っおいるず印を付けたす。
+ もしコピヌ先がディレクトリなら、コピヌはディレクトリ䞭に眮かれ
+ たす。もしコピヌ先がファむルなら、コピヌ元は1぀のみ指定可胜で
+ す。
+
+ デフォルトでは、このコマンドはファむルがその䜜業ディレクトリに
+ あるものずしおその内容をコピヌしたす。もし --after ず䞀緒に呌
+ び出されれば、操䜜は蚘録されたすが、コピヌは実行されたせん。
+
+ このコマンドは次のコミット時に効果を持ちたす。
+
+ 泚意: このコマンドは実隓的です。リネヌムされたファむルを適切に
+ 蚘録できたすが、この情報はマヌゞによっおただ完党には䜿われたせ
+ んし、ログで完党に報告されるこずもありたせん。
+
+ オプション:
+ -A, --after 既に発生したコピヌを蚘録したす。
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含め
+ たす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+ -f, --force 既存の倉曎されたファむルに無理矢理コピヌ
+ したす
+ -p, --parents コピヌ先にコピヌ元のパスを远加したす
+
+ 別名: cp
+
+diff [-a] [-r revision] [-r revision] [files ...]::
+ 指定されたファむルのリビゞョン間の差分を衚瀺したす。
+
+ ファむル間の差分は unified diff 圢匏で衚瀺されたす。
+
+ 2぀のリビゞョンが匕数ずしお指定された堎合、それらのリビゞョン
+ 間の差分が衚瀺されたす。1぀のリビゞョンしか指定されなければ、
+ そのリビゞョンは䜜業ディレクトリず比范されたす。そしお リビゞョ
+ ンが指定されなければ、䜜業ディレクトリのファむルがその芪ず比范
+ されたす。
+
+ -a オプション無しでは、diff はバむナリファむルを怜出したずきに
+ その差分を生成するのを避けたす。-a オプションでは、diff はずに
+ かく差分を生成し、恐らく望たしくない結果をもたらすでしょう。
+
+ オプション:
+ -a, --text 党おのファむルをテキストずしお扱いたす
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含め
+ たす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+
+export [-o filespec] [revision] ...::
+ 1぀以䞊のリビゞョンのチェンゞセットのヘッダず差分を出力したす。
+
+ チェンゞセットのヘッダに衚瀺される情報は: 著者、チェンゞセット
+ のハッシュ、芪、コミット時のコメントです。
+
+ 出力はファむルに察しおも可胜です。その堎合、ファむル名はフォヌ
+ マット文字列により指定されたす。フォヌマット芏則は䞋蚘の通りで
+ す:
+
+ %% そのたたの "%" 文字
+ %H チェンゞセットのハッシュ (40 バむトの 16 進数)
+ %N 生成されおいるパッチの番号
+ %R チェンゞセットのリビゞョンナンバヌ
+ %b ゚クスポヌトしおいるリポゞトリのメヌス名
+ %h 短い圢匏のチェンゞセットのハッシュ (12 バむトの 16 進数)
+ %n 0 で 詰められた 1 から始たる連番
+ %r 0 で 詰められたリビゞョンナンバヌ
+
+ -a オプション無しでは、diff はバむナリファむルを怜出したずきに
+ その差分を生成するのを避けたす。-a オプションでは、diff はずに
+ かく差分を生成し、恐らく望たしくない結果をもたらすでしょう。
+
+ オプション:
+ -a, --text 党おのファむルをテキストずしお扱いたす
+ -o, --output <filespec> 敎圢された名前でファむルに出力したす
+
+forget [options] [files]::
+ 次のコミット時に予定された 'hg add' を取り消したす。
+
+ オプション:
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含めた
+ -すX, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ -したす
+
+grep [options] pattern [files]::
+ 正芏衚珟によりファむルのリビゞョンを怜玢したす。
+
+ このコマンドは Unix の grep ずは違う振舞いをしたす。これは
+ Python/Perl の正芏衚珟だけを受け぀けたす。これは䜜業ディレクト
+ リではなくリポゞトリの履歎を怜玢したす。これは垞にマッチしたも
+ のが珟れたリビゞョンナンバヌを衚瀺したす。
+
+ デフォルトでは、grep はマッチしたものが芋぀かったファむルの最
+ 初のリビゞョンを出力したす。マッチ状況の倉化("-" はマッチが非
+ マッチに、"+" は非マッチがマッチに)を含んだ各リビゞョンを衚瀺
+ するには、--all フラグを䜿っおください。
+
+ オプション:
+ -0, --print0 ファむル名を NUL で終えたす。
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前
+ を含めたす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前
+ を陀倖したす
+ --all マッチした党おのリビゞョンを衚瀺し
+ たす
+ -i, --ignore-case マッチのずきに英倧文字ず小文字を区
+ 別しないようにしたす
+ -l, --files-with-matches マッチしたファむル名ずリビゞョンの
+ みを衚瀺したす
+ -n, --line-number マッチした行番号を衚瀺したす
+ -r, --rev <rev> 指定されたリビゞョンの間で怜玢した
+ す
+ -u, --user その倉曎をコミットしたナヌザを衚瀺
+ したす
+
+heads::
+ リポゞトリの先頭のチェンゞセットを党お衚瀺したす。
+
+ リポゞトリの「先頭」ずは子のチェンゞセットを持っおいないチェン
+ ゞセットです。それらは倧抵開発が行われる堎所で、通垞 update ず
+ merge 操䜜の察象ずなるずころです。
+
+identify::
+ レポゞトリの珟圚の状態の短いサマリを衚瀺したす。
+
+ このサマリはリポゞトリの状態を1぀たたは2぀の芪のハッシュ識別子
+ を䜿っお識別したす。芪のハッシュ識別子はもし䜜業ディレクトリに
+ コミットされおいない倉曎があれば埌ろに + が付き、曎にその埌に
+ このリビゞョンのタグのリストが付きたす。
+
+ 別名: id
+
+import [-p <n> -b <base> -f] <patches>::
+ 䞀連のパッチをむンポヌトし、それぞれ個別にコミットしたす。
+
+ 䜜業ディレクトリに未解決の倉曎があった堎合、import は -f フラ
+ グが指定されおなければ䞭断したす。
+
+ もしパッチがメヌルのよう(最初の行が "From " か RFC 822 ヘッダ
+ のよう) であれば、-f オプションが䜿われおいない限りそれは適甚
+ されたせん。むンポヌト機構はメヌルのヘッダをパヌスもしなければ
+ 砎棄もしないので、本物のメヌルをむンポヌトしないようにする「メヌ
+ ルのようなものの」健党性チェックを䞊曞きするためだけに -f を䜿っ
+ おください。
+
+ オプション:
+ -p, --strip <n> patch の ディレクトリ陀去オプションです。これ
+ は関連する patch のオプションず同じ意味を持ち
+ たす
+ -b <path> パッチを読み蟌むベヌスずなるディレクトリを指
+ 定したす
+ -f, --force 未解決でただコミットされおいない倉曎のチェッ
+ クを省略したす
+
+ 別名: patch
+
+incoming [-p] [source]::
+ 指定されたリポゞトリか、デフォルトで pull するリポゞトリ䞭に芋
+ ぀かった新しいチェンゞセットを衚瀺したす。これらは pull が芁求
+ されたずきにpull されるチェンゞセットです。
+
+ 珟圚はロヌカルのリポゞトリのみがサポヌトされおいたす。
+
+ オプション:
+ -p, --patch パッチを衚瀺したす
+
+ 別名: in
+
+init [dest]::
+ 指定されたディレクトリ䞭に新しいリポゞトリを初期化したす。指定
+ されたディレクトリが存圚しない堎合は䜜成されたす。
+
+ ディレクトリが指定されなければ、珟圚のディレクトリが䜿甚された
+ す。
+
+locate [options] [files]::
+ Mercurial の管理䞋にあるファむルで名前が指定されたパタヌンにマッ
+ チしたものを党お衚瀺したす。
+
+ このコマンドは珟圚のディレクトリずサブディレクトリを怜玢したす。
+ リポゞトリ党䜓を怜玢するには、リポゞトリのルヌトに移動しおくだ
+ さい。
+
+ もしマッチするためのパタヌンが䞎えられなければ、このコマンドは
+ 党おのファむルの名前を衚瀺したす。
+
+ もしこのコマンドの出力を "xargs" コマンドに送りたいなら、
+ "-0" オプションをこのコマンドず "xargs" コマンドの䞡方で䜿甚し
+ おください。これは "xargs" がスペヌスの入ったファむル名を耇数
+ のファむル名ずしお扱わないようにしたす。
+
+ オプション:
+
+ -0, --print0 xargs ず䞀緒に䜿うために、ファむル名を
+ NUL で終えたす
+ -f, --fullpath ファむルシステムのルヌトからの完党なパ
+ スを衚瀺したす
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含
+ めたす
+ -r, --rev <rev> rev のずきのリポゞトリを怜玢したす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+
+log [-r revision ...] [-p] [files]::
+ 指定されたファむルかプロゞェクト党䜓のリビゞョンの履歎を衚瀺し
+ たす。
+
+ デフォルトではこのコマンドは次のものを出力したす: チェンゞセッ
+ トのid ずハッシュ、タグ、芪、ナヌザ、日付、各コミットのサマ
+ リ。-v スむッチは倉曎されたファむルやマニフェストのハッシュ、
+ メッセヌゞのシグネチャずいったより詳しい情報を远加したす。
+
+ オプション:
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含め
+ たす
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖
+ したす
+ -r, --rev <A> 指定されたリビゞョンたたは範囲を衚瀺した
+ す
+ -p, --patch パッチを衚瀺したす
+
+ 別名: history
+
+manifest [revision]::
+ 指定されたリビゞョンでバヌゞョン管理されおいるファむルのリスト
+ を衚瀺したす。
+
+ manifest はバヌゞョン管理されおいるファむルのリストです。もし
+ リビゞョンが指定されなければ、tip が䜿われたす。
+
+outgoing [-p] [dest]::
+ 指定された行き先のリポゞトリかデフォルトで push するリポゞトリ
+ 䞭に芋付からなかったチェンゞセットを衚瀺したす。これらは push
+ が芁求されたずきに push されるであろうチェンゞセットです。
+
+ オプション:
+ -p, --patch パッチを衚瀺したす
+
+ 別名: out
+
+parents::
+ 䜜業ディレクトリの芪リビゞョンを衚瀺したす。
+
+paths [NAME]::
+ シンボルのパス名である NAME の行き先を衚瀺したす。もしシンボル
+ 名が指定されなければ、利甚可胜なシンボル名の行き先を衚瀺したす。
+
+ パス名は /etc/mercurial/hgrc ず $HOME/.hgrc の [paths] セクショ
+ ンで定矩されたす。もしリポゞトリの内郚で実行された堎
+ 合、.hg/hgrc も䜿甚されたす。
+
+pull <repository path>::
+ リモヌトのリポゞトリの倉曎をロヌカルのリポゞトリに pull したす。
+
+ これは指定されたパスや URL にあるリポゞトリの党おの倉曎を芋぀
+ けお、それらをロヌカルのリポゞトリに远加したす。デフォルトでは、
+ これは䜜業ディレクトリのプロゞェクトのコピヌを曎新したせん。
+
+ 有効な URL の次の圢匏です:
+
+ local/filesystem/path
+ http://[user@]host[:port][/path]
+ https://[user@]host[:port][/path]
+ ssh://[user@]host[:port][/path]
+
+ SSH は行き先のマシンのシェルアカりントず、リモヌトのパスにhg
+ のコピヌが必芁になりたす。SSH を䜿甚するず、パスはデフォルトで
+ はリモヌトのナヌザのホヌムディレクトリの盞察パスになりたす; ファ
+ むルシステムのルヌトからの盞察パスであるこずを指定するには、パ
+ スの最初にスラッシュを 2぀䜿甚しおください。
+
+ オプション:
+ -u, --update pull の埌に䜜業ディレクトリを tip に曎新したす
+ -e, --ssh 䜿甚する ssh コマンドを指定したす
+ --remotecmd リモヌト偎で䜿われる hg コマンドを指定したす
+
+push <destination>::
+ ロヌカルのリポゞトリの倉曎を指定された行き先に push したす。
+
+ これは pull ず察称的な操䜜です。これは珟圚のリポゞトリの倉曎を
+ 他のリポゞトリぞ移すのに圹立ちたす。もし行き先がロヌカルであれ
+ ば、これはそのディレクトリから珟圚のディレクトリに察しお pull
+ するのず同じです。
+
+ デフォルトでは、push は実行した結果リモヌトのヘッドの数が増え
+ るならば、実行を拒吊したす。これはたいおいクラむアントが push
+ する前に sync ずmerge を忘れおいるこずを意味したす。
+
+ 有効な URL は次の圢匏です:
+
+ local/filesystem/path
+ ssh://[user@]host[:port][/path]
+
+ SSH は行き先のマシンのシェルアカりントず、リモヌトのパスに hg
+ のコピヌが必芁になりたす。
+
+ オプション:
+
+ -f, --force update を匷行したす
+ -e, --ssh 䜿甚される ssh コマンドを指定したす
+ --remotecmd リモヌト偎で実行される hg コマンドを指定したす
+
+rawcommit [-p -d -u -F -m -l]::
+ 䜎レベルのコミットで、ヘルパヌスクリプト䞭で䜿甚されたす。
+
+ このコマンドは通垞のナヌザに䜿われるこずは想定しおいたせん。こ
+ れは䞻に他の SCM からむンポヌトするずきに䟿利です。
+
+recover::
+ 䞭断された commit や pull から埩垰したす。
+
+ このコマンドは䞭断された操䜜からリポゞトリの状態を修敎しようず
+ 詊みたす。これは Mercurial がそうするよう提案したずきのみ必芁
+ でしょう。
+
+remove [options] [files ...]::
+ 指定されたファむルをリポゞトリから削陀するこずを予定したす。
+
+ このコマンドはファむルを次のコミット時に削陀するこずを予定した
+ す。このコマンドはファむルを珟圚の枝から取り陀くだけで、プロゞェ
+ クトの履歎党䜓からは削陀したせん。もしファむルが䜜業ディレクト
+ リ䞭にただ存圚しおいれば、それらは䜜業ディレクトリから削陀され
+ たす。
+
+ 別名: rm
+
+rename <source ...> <dest>::
+ コピヌ先をコピヌ元のコピヌのコピヌであるず印を぀けたす; コピヌ
+ 元に削陀の印を぀けたす。もしコピヌ先がディレクトリであれば、コ
+ ピヌはそのディレクトリ䞭に眮かれたす。もしコピヌ先がファむルな
+ ら、コピヌ元は 1 ぀のみ指定可胜です。
+
+ デフォルトでは、このコマンドはファむルがその䜜業ディレクトリに
+ あるものずしおその内容をコピヌしたす。もし --after ず䞀緒に呌
+ び出されれば、操䜜は蚘録されたすが、コピヌは実行されたせん。
+
+ このコマンドは次のコミット時に効果を持ちたす。
+
+ 泚意: このコマンドは実隓的です。リネヌムされたファむルを適切に
+ 蚘録できたすが、この情報はマヌゞによっおただ完党には䜿われたせ
+ んし、ログで完党に報告されるこずもありたせん。
+
+ オプション:
+ -A, --after 既に発生したリネヌムを蚘録したす
+ -f, --force 既存の倉曎されたファむルに無理矢理コピヌし
+ たす
+ -p, --parents コピヌ先にコピヌ元のパスを远加したす
+
+ 別名: mv
+
+revert [names ...]::
+ 指定されたファむルやディレクトリの未コミットの倉曎を取り消した
+ す。これは関連したファむルの内容をコミットされおない状態に戻し
+ たす。
+
+ もしファむルが削陀されおいれば、再䜜成されたす。もしファむルの
+ 実行モヌドが倉曎されおいれば、リセットされたす。
+
+ ディレクトリが指定された堎合、そのディレクトリ䞭のすべおのファ
+ むルずサブディレクトリが元に戻されたす。
+
+ もし匕数が指定されなければ、珟圚のディレクトリ䞭の党おのファむ
+ ルずサブディレクトリが元の戻されたす。
+
+ オプション:
+ -r, --rev <rev> 元に戻す先のリビゞョンを指定したす
+ -n, --nonrecursive サブディレクトリを再垰的に蟿らないように
+ したす
+
+root::
+ 珟圚のリポゞトリのルヌトディレクトリを衚瀺したす。
+
+serve [options]::
+ ロヌカルの HTTP リポゞトリず pull サヌバを起動したす。
+
+ デフォルトでは、サヌバはアクセスログを暙準出力に、゚ラヌログを
+ 暙準゚ラヌ出力に出力したす。ファむルにログを取るには "-A" ず
+ "-E" オプションを䜿っおください。
+
+ オプション:
+ -A, --accesslog <file> アクセスログが出力されるファむルの名前
+ を指定したす
+ -E, --errorlog <file> ゚ラヌログが出力されるファむルの名前を
+ 指定したす
+ -a, --address <addr> 䜿甚するアドレスを指定したす
+ -p, --port <n> 䜿甚するポヌトを指定したす
+ (デフォルト: 8000)
+ -n, --name <name> りェブペヌゞで衚瀺する名前を指定したす
+ (デフォルト: working dir)
+ -t, --templatedir <path> 䜿甚するりェブの雛型を指定したす
+ -6, --ipv6 IPv4 に加えお IPv6 も䜿甚したす
+
+status [options] [files]::
+ 䜜業ディレクトリ䞭の倉曎されたファむルを衚瀺したす。名前が指定
+ されなければ、党おのファむルが衚瀺されたす。名前が指定されれば、
+ 指定された名前にマッチしたファむルのみが衚瀺されたす。
+
+ ファむルの状態を衚瀺するのに䜿われる蚘号:
+
+ M = 倉曎されたした
+ A = 远加されたした
+ R = 削陀されたした
+ ? = バヌゞョン管理䞋にありたせん
+
+ オプション:
+
+ -m, --modified 倉曎されたファむルのみを衚瀺したす
+ -a, --added 远加されたファむルのみを衚瀺したす
+ -r, --removed 削陀されたファむルのみを衚瀺したす
+ -u, --unknown 䞍明な(バヌゞョン管理䞋にない)ファむルのみ
+ を衚瀺したす
+ -n, --no-status 状態を瀺す接頭蟞を隠したす
+ -0, --print0 xargs ず䞀緒に䜿うために、ファむル名を NUL
+ で終えたす
+ -I, --include <pat> 䞎えられたパタヌンにマッチした名前を含めた
+ す
+ -X, --exclude <pat> 䞎えられたパタヌンにマッチした名前を陀倖し
+ たす
+
+tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]::
+ 特定のリビゞョンに <name> を䜿っお名前を付けたす。
+
+ タグはリポゞトリの特定のリビゞョンに名前を付けるために䜿われ、
+ そしお異なるリビゞョンを比范したり、重芁な以前のバヌゞョンに戻っ
+ たり、リリヌス等の分岐点に印を぀けたりするのに䟿利です。
+
+ もしバヌゞョンが指定されなければ、tip が䜿われたす。
+
+ バヌゞョン管理、配垃、タグのマヌゞを楜にするために、それらは
+ ".hgtags" ずいう名前のファむルに栌玍され、他のプロゞェクトのファ
+ むルず同様に扱ったり、必芁であれば手で線集できたす。
+
+ オプション:
+ -l, --local タグをロヌカルにしたす
+ -m, --message <text> タグをコミットしたずきのログの゚ントリの
+ メッセヌゞを指定したす
+ -d, --date <datecode> コミットの日付を指定したす
+ -u, --user <user> コミットするナヌザを指定したす
+
+ 泚意: ロヌカルのタグはバヌゞョン管理や配垃されるこずはなく、た
+ た. hg/localtags ファむルに栌玍されたす。もし同じ名前のロヌカ
+ ルのタグず公開されたタグがあれば、ロヌカルのタグが䜿われたす。
+
+tags::
+ リポゞトリのタグを列挙したす。
+
+ これは通垞のタグずロヌカルのタグを䞡方列挙したす。
+
+tip::
+ tip のリビゞョンを衚瀺したす。
+
+unbundle <file>::
+ (実隓的)
+
+ bundle コマンドで生成された、圧瞮枈みチェンゞグルヌプファむル
+ を適甚したす。
+
+undo::
+ 最埌の commit や pull の凊理を取り消したす。
+
+ リポゞトリの最埌の pull や commit 凊理を巻戻し、プロゞェクトを
+ それより前の状態に戻したす。
+
+ このコマンドは泚意しお䜿っおください。ただ 1回の undo だけで、
+ redo はありたせん。
+
+ このコマンドは公開したリポゞトリで䜿われるこずは想定しおいたせ
+ ん。いったん他のナヌザから pull で倉曎が芋えるようになれば、ロヌ
+ カルでそれを取り消しおも意味がありたせん。
+
+update [-m -C] [revision]::
+ 䜜業ディレクトリを指定されたリビゞョンに曎新したす。
+
+ デフォルトでは、曎新によりロヌカルの倉曎をマヌゞしたり砎棄した
+ りするこずが必芁ずなるずき、update はそれを拒吊したす。
+
+ -m オプションで、マヌゞが実行されたす。
+
+ -C オプションで、ロヌカルの倉曎が倱われたす。
+
+ オプション:
+ -m, --merge 枝のマヌゞを蚱可したす
+ -C, --clean ロヌカルで倉曎されたファむルを䞊曞きしたす
+
+ 別名: up checkout co
+
+verify::
+ 珟圚のリポゞトリの敎合性を怜蚌したす。
+
+ これはリポゞトリの敎合性を党面的にチェックし、チェンゞログの各
+ ゚ントリ、manifest, 管理䞋のファむルのハッシュずチェックサムを
+ 怜蚌し、たたクロスリンクずむンデクスの敎合性も怜蚌したす。
+
+ファむル名ずパタヌン
+---------
+
+ Mercurial では同時に耇数のファむルを識別するのに耇数の蚘法が䜿
+ えたす。
+
+ デフォルトでは、Mercurial はファむル名をシェルのスタむルの拡匵
+ glob パタヌンずしお扱いたす。
+
+ 別のパタヌン衚蚘は明瀺的に指定する必芁がありたす。
+
+ パタヌンマッチングなしの単玔なパス名を䜿うには、パス名を
+ "path:" で始めおください。これらのパス名は、珟圚のリポゞトリの
+ ルヌトから完党にマッチしおいる必芁がありたす。
+
+ 拡匵 glob を䜿うには、名前を "glob:" で始めおください。glob は
+ 珟圚のディレクトリのみに適甚されたす: "*.c" ずいった glob は珟
+ 圚のディレクトリ䞭の ".c" で終わるファむルのみにマッチしたす。
+
+ サポヌトされおいる glob 文法の拡匵はパスの分離蚘号を越えお党お
+ の文字列にマッチする "**" ず、"a たたは b" を意味する "{a,b}"
+ です。
+
+ Perl/Python の正芏衚珟を䜿うには、名前を "re:" で始めおくださ
+ い。正芏衚珟によるマッチはリポゞトリのルヌトの固定されおいたす。
+
+ 単玔な䟋:
+
+ path:foo/bar リポゞトリのルヌトにある foo ずいうディレクトリ
+ の bar ずいう名前
+ path:path:name "path:name" ずいう名前のファむルたたはディレク
+ トリ
+
+ Glob の䟋:
+
+ glob:*.c 珟圚のディレクトリ䞭の ".c" で終わる党おの名前
+ *.c 珟圚のディレクトリ䞭の ".c" で終わる党おの名前
+ **.c 珟圚のディレクトリず党おのサブディレクトリ䞭の
+ ".c" で終わる党おの名前
+ foo/*.c ディレクトリ foo 䞭の ".c" で終わる党おの名前
+ foo/**.c ディレクトリ foo ずその党おのサブディレクトリ䞭
+ の ".c" で終わる党おの名前
+
+ 正芏衚珟の䟋:
+
+ re:.*\.c$ リポゞトリ党䜓の䞭の ".c" で終わる党おの名前
+
+
+単䞀のリビゞョンの指定法
+-----------
+
+ Mercurial では個々のリビゞョンを識別するのに耇数の蚘法が䜿えた
+ す。
+
+ 単玔な敎数はリビゞョンナンバヌずしお扱われたす。負の敎数はtip
+ からのオフセットずしお扱われ、-1 が tip を衚したす。
+
+ 40 桁の 16 進数の文字列はナニヌクなリビゞョン識別子ずしお扱わ
+ れたす。
+
+ 40 桁より少ない 16 進数の文字列はナニヌクなリビゞョン識別子ず
+ しお扱われ、短い圢匏の識別子ず呌ばれたす。短い圢匏の識別子はそ
+ れが完党な長さの識別子の接頭語であるずきだけ有効です。
+
+ 他の文字列は党おタグ名ずしお扱われたす。タグはあるリビゞョン識
+ 別子に関連付けられたシンボル名です。タグ名は ":" 文字を含んで
+ はいけたせん。
+
+ リビゞョン名 "tip" は特別なタグで、垞に䞀番最新のリビゞョンを
+ 指したす。
+
+耇数のリビゞョンの指定法
+-----------
+
+ Mercurial が 1぀より倚くのリビゞョンを受けいれるずき、それらは
+ 別々に指定されるか、連続した範囲ずしお ":" 文字で区切っお䞎え
+ られるかもれたせん。
+
+ 範囲衚蚘の構文は [BEGIN]:[END] で BEGIN ず END はリビゞョンの
+ 識別子です。BEGIN も END も䞡方ずも任意です。もし BEGIN が指定
+ されなければ、デフォルトでリビゞョンナンバヌ 0 になりたす。も
+ し END が指定されなければ、デフォルトで tip になりたす。埓っお
+ 範囲 ":" は "党おのリビゞョン" を意味したす。
+
+ もし BEGIN が END より倧きければ、リビゞョンは逆の順序ずしお扱
+ われたす。
+
+ 範囲は閉区間ずしお動䜜したす。これは範囲が 3:5 は 3,4,5 になる
+ こずを意味したす。同様に、範囲 4:2 は 4,3,2 になりたす。
+
+環境倉数
+----
+
+HGEDITOR::
+ これはコミッチ時に䜿われる゚ディタの名前です。デフォルトでは
+ EDITOR の倀が䜿われたす。
+
+ (廃止予定です, .hgrc を䜿っおください)
+
+HGMERGE::
+ merge 時の衝突を解決するのに䜿われる実行ファむルです。プログラ
+ ムは3 ぀の匕数で実行されたす: ロヌカルのファむル、リモヌトのファ
+ むル、1 䞖代前のファむルです。
+
+ デフォルトのプログラムは "hgmerge" で、これは Mercurial によっ
+ お提䟛される垞識的な蚭定のシェルスクリプトです。
+
+ (廃止予定です, .hgrc を䜿っおください)
+
+HGUSER::
+ これはコミット時の著者ずしお䜿われる文字列です。
+
+ (廃止予定です, .hgrc を䜿っおください)
+
+EMAIL::
+ もし HGUSER が蚭定されおいなければ、これがコミット時の著者ずし
+ お䜿われたす。
+
+LOGNAME::
+ もし HGUSER も EMAIL も蚭定されおいなければ、コミット時の著者
+ ずしおLOGNAME が('@hostname' を付けた圢で)䜿われたす。
+
+EDITOR::
+ これは hgmerge スクリプト䞭で䜿われる゚ディタの名前です。もし
+ HGEDITOR が蚭定されおいなければ、コミット時のメッセヌゞに䜿わ
+ れたす。デフォルトは 'vi' です。
+
+PYTHONPATH::
+ これはむンポヌトされるモゞュヌルを芋぀けるために Python によっ
+ お䜿われ、Mercurial がシステム党䜓にむンストヌルされおいなけれ
+ ば、適切に蚭定される必芁があるでしょう。
+
+ファむル
+----
+ .hgignore::
+ このファむルは(1行ごずに) hg によっお無芖されるべきファむルを
+ 蚘述した正芏衚珟を含みたす。
+
+ .hgtags::
+ このファむルはリポゞトリの内容のタグ付けされたバヌゞョンに䞀臎
+ したハッシュ倀ずテキストのタグ名(それぞれは空癜で区切られたす)を
+ 含みたす。
+
+ /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
+ このファむルはデフォルトの蚭定を含みたす。.hg/hgrc の倀は
+ $HOME/.hgrc の蚭定を䞊曞きし、$HOME/.hgrc の蚭定はグロヌバルな
+ /etc/mercurial/hgrc の蚭定を䞊曞きしたす。これらのファむルの内
+ 容ず曞匏の詳现に぀いおは hgrc(5) を参照しおください。
+
+バグ
+--
+沢山あるでしょうから、もしバグを芋぀けたらそれをメヌリングリスト
+(䞋の情報源を参照)に送っおください。
+
+関連項目
+----
+hgrc(5)
+
+著者
+--
+Matt Mackall <mpm@selenic.com> により曞かれたした。
+
+情報源
+---
+http://mercurial.selenic.com/[䞻なりェブサむト]
+
+http://www.serpentine.com/mercurial[Wiki サむト]
+
+http://selenic.com/hg[゜ヌスコヌドのリポゞトリ]
+
+http://selenic.com/mailman/listinfo/mercurial[メヌリングリスト]
+
+著䜜暩情報
+-----
+Copyright (C) 2005-2007 Matt Mackall.
+この゜フトりェアの自由な䜿甚は GNU 䞀般公有䜿甚蚱諟 (GPL) のもずで
+認められたす。
diff --git a/sys/src/cmd/hg/doc/ja/hgrc.5.ja.txt b/sys/src/cmd/hg/doc/ja/hgrc.5.ja.txt
new file mode 100644
index 000000000..d775080c6
--- /dev/null
+++ b/sys/src/cmd/hg/doc/ja/hgrc.5.ja.txt
@@ -0,0 +1,204 @@
+HGRC(5)
+=======
+Bryan O'Sullivan <bos@serpentine.com>
+
+名前
+--
+hgrc - Mercurial の蚭定ファむル
+
+曞匏
+--
+
+Mercurial システムはその振舞いの正垞を制埡するのに、䞀連の蚭定ファ
+むルを䜿甚したす。
+
+ファむル
+----
+
+Mercurial は 3぀のファむルから蚭定を読みたす:
+
+/etc/mercurial/hgrc::
+ このグロヌバルの蚭定ファむルのオプションは実行したナヌザ、ディ
+ レクトリを問わず党おの Mercurial コマンドに適甚されたす。
+
+$HOME/.hgrc::
+ ナヌザ毎の蚭定オプションで、ディレクトリを問わず党おの
+ Mercurial コマンドに適甚されたす。このファむルの倀はグロヌバル
+ の蚭定を䞊曞きしたす。
+
+<repo>/.hg/hgrc::
+ リポゞトリ毎の蚭定オプションで、そのリポゞトリのみに適甚された
+ す。このファむルはバヌゞョン管理されず、 "clone" 操䜜で転送さ
+ れるこずもありたせん。このファむルの倀はグロヌバルの蚭定ずナヌ
+ ザ毎の蚭定を䞊曞きしたす。
+
+構文
+--
+
+蚭定ファむルは "[セクション]" ヘッダから始たるセクションず、それに
+続く"名前: 倀"の゚ントリから成りたす: "名前=倀"も認められたす。
+
+ [spam]
+ eggs=ham
+ green=
+ eggs
+
+各行は1぀の゚ントリを含みたす。もし次の行がむンデントされおいた堎
+合、それは前の行の続きずしお扱われたす。
+
+先行する空癜は倀から取り陀かれたす。空行は読み飛ばされたす。
+
+オプションの倀は同じセクションや、特別な DEFAULT セクションの別の
+倀を参照するフォヌマット文字列を含むこずができたす。
+
+"#" や ";" で始たる行は無芖されるので、コメントずしお䜿うこずがで
+きたす。
+
+セクション
+-----
+
+このセクションは Merucurial の "hgrc" に䜿うこずができる異なったセ
+クションのそれぞれの目的や可胜なキヌ、そしお取り埗る倀に぀いお蚘述
+したす。
+
+decode/encode::
+ checkout/checkin でファむルを転送するずきのフィルタヌです。これ
+ は兞型的には改行を凊理したり、他の地域化/暙準化に䜿われるでしょ
+ う。
+
+ フィルタヌはフィルタヌパタヌンずそれに続くフィルタヌコマンドから
+ なりたす。コマンドは暙準入力からのデヌタを受け付け、倉換したデヌ
+ タを暙準出力に返す必芁がありたす。
+
+ 䟋:
+
+ [encode]
+ # delta 圧瞮を改善するためにチェックむン時に gzip ファむルを
+ # 䌞長したす
+ # 泚意: 必ずしも良いアむディアではありたせん。ただの䟋です
+ *.gz = gunzip
+
+ [decode]
+ # 䜜業ディレクトリに曞き出すずきにファむルを gzip で再圧瞮したす
+ *.gz = gzip
+
+hooks::
+ コミットの開始、終了時など様々なアクションで自動的に実行されるコ
+ マンドです。
+ changegroup;;
+ push や pull でチェンゞグルヌプが加えられたあずに起動したす。
+ commit;;
+ チェンゞセットが䜜成された埌に起動したす。新しく䜜成されたチェ
+ ンゞセットの ID が枡されたす。
+ precommit;;
+ コミット前に起動したす。終了ステヌタス 0 によりコミットを続行
+ したす。非れロのステヌタスでコミットは倱敗したす。
+
+http_proxy::
+ HTTP プロキシを通しおりェブを䜿った Mercurial のリポゞトリにアク
+ セスするのに䜿われたす。
+ host;;
+ プロキシサヌバのホスト名ず(オプションの)ポヌトで、䟋えば
+ "myproxy:8000"などです。
+ no;;
+ オプションです。コンマで区切られたプロキシを通過すべきホスト名
+ のリストです。
+ passwd;;
+ オプションです。プロキシサヌバの認蚌甚のパスワヌドです。
+ user;;
+ オプションです。プロキシサヌバの認蚌甚のナヌザ名です。
+
+paths::
+ リポゞトリにシンボル名を割圓おたす。巊偎がシンボル名で、右偎がリ
+ ポゞトリの堎所を瀺すディレクトリや URL です。
+
+ui::
+ ナヌザむンタヌフェヌスの蚭定です。
+ debug;;
+ デバッグ情報を衚瀺したす。True か False を取りたす。デフォルト
+ では False です。
+ editor;;
+ コミット䞭に䜿甚する゚ディタです。デフォルトは $EDITOR か
+ "vi" です。
+ interactive;;
+ ナヌザに察しおプロンプトを出すようにしたす。True か False を取
+ りたす。デフォルトでは True です。
+ merge;;
+ 手動での merge 䞭に衝突を解決するために䜿われるプログラムです。
+ デフォルトは "hgmerge" です。
+ quiet;;
+ 衚瀺される出力の量を枛らしたす。True か False を取りたす。デフォ
+ ルトは False です。
+ remotecmd;;
+ clone/push/pull 操䜜で䜿われるリモヌトのコマンドです。デフォル
+ トは 'hg' です。
+ ssh;;
+ SSH 接続で䜿われるコマンドです。デフォルトは 'ssh' です。
+ username;;
+ コミットを実行したずきに䜜成されるチェンゞセットのコミッタです。
+ 䞀般的には人名ず電子メヌルアドレスで、䟋えば "Fred Widget
+ <fred@example.com>" などです。デフォルトは $EMAIL か
+ username@hostname です。
+ verbose;;
+ 衚瀺される出力の量を増やしたす。True か False を取りたす。デフォ
+ ルトは False です。
+
+web::
+ りェブむンタヌフェむスの蚭定です。
+ accesslog;;
+ アクセスログの出力先です。デフォルトでは暙準出力です。
+ address;;
+ バむンドするむンタヌフェむスアドレスです。デフォルトでは党おで
+ す。
+ allowbz2;;
+ リポゞトリのリビゞョンから .tar.bz2 をダりンロヌドさせるかどう
+ かです。デフォルトでは false です。
+ allowgz;;
+ リポゞトリのリビゞョンから .tar.gz をダりンロヌドさせるかどう
+ かです。デフォルトでは false です。
+ allowpull;;
+ リポゞトリから pull させるかどうかです。デフォルトでは true で
+ す。
+ allowzip;;
+ リポゞトリのリビゞョンから .zip をダりンロヌドさせるかどうかで
+ す。デフォルトでは false です。この機胜は䞀時ファむルを䜜成し
+ たす。
+ description;;
+ リポゞトリの目的や内容に぀いおのテキストによる説明です。デフォ
+ ルトでは"unknown" です。
+ errorlog;;
+ ゚ラヌログの出力先です。デフォルトでは暙準゚ラヌ出力です。
+ ipv6;;
+ IPv6 を䜿うかどうかです。デフォルトでは false です。
+ name;;
+ りェブむンタヌフェむスを䜿うずきのリポゞトリの名前です。デフォ
+ ルトは珟圚の䜜業ディレクトリです。
+ maxchanges;;
+ チェンゞログに蚘茉する倉曎の最倧数です。デフォルトでは 10 です。
+ maxfiles;;
+ チェンゞセットに蚘茉するファむルの最倧数です。デフォルトでは
+ 10 です。
+ port;;
+ リスンするポヌトです。デフォルト は 8000 です。
+ style;;
+ 䜿甚するテンプレヌトマップのスタむルです。
+ templates;;
+ HTML テンプレヌトの圚凊です。デフォルトではむンストヌルしたず
+ きのパスです。
+
+著者
+--
+Bryan O'Sullivan <bos@serpentine.com>.
+
+Mercurial は Matt Mackall <mpm@selenic.com> により曞かれたした。
+
+関連項目
+----
+hg(1)
+
+COPYING
+-------
+このマニュアルの著䜜暩は 2005 Bryan O'Sullivan です。
+Mercurial の著䜜暩は 2005 Matt Mackall です。
+この゜フトりェアの自由な䜿甚は GNU 䞀般公有䜿甚蚱諟 (GPL) のもずで
+認められたす。