annotate mercurial/help/scripting.txt @ 25900:d14590f90cb6 stable

help: fix typo familar -> familiar
author Javi Merino <merino.jav@gmail.com>
date Mon, 03 Aug 2015 20:34:36 +0100
parents 9de443515f1d
children 7b7e25a85f63
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25881
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1 It is common for machines (as opposed to humans) to consume Mercurial.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2 This help topic describes some of the considerations for interfacing
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3 machines with Mercurial.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5 Choosing an Interface
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 =====================
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
8 Machines have a choice of several methods to interface with Mercurial.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 These include:
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 - Executing the ``hg`` process
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 - Querying a HTTP server
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13 - Calling out to a command server
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
14
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
15 Executing ``hg`` processes is very similar to how humans interact with
25900
d14590f90cb6 help: fix typo familar -> familiar
Javi Merino <merino.jav@gmail.com>
parents: 25881
diff changeset
16 Mercurial in the shell. It should already be familiar to you.
25881
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
17
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
18 :hg:`serve` can be used to start a server. By default, this will start
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
19 a "hgweb" HTTP server. This HTTP server has support for machine-readable
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
20 output, such as JSON. For more, see :hg:`help hgweb`.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
21
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
22 :hg:`serve` can also start a "command server." Clients can connect
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
23 to this server and issue Mercurial commands over a special protocol.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
24 For more details on the command server, including links to client
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
25 libraries, see https://mercurial.selenic.com/wiki/CommandServer.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
26
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
27 :hg:`serve` based interfaces (the hgweb and command servers) have the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
28 advantage over simple ``hg`` process invocations in that they are
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
29 likely more efficient. This is because there is significant overhead
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
30 to spawn new Python processes.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
31
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
32 .. tip::
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
33
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
34 If you need to invoke several ``hg`` processes in short order and/or
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
35 performance is important to you, use of a server-based interface
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
36 is highly recommended.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
37
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
38 Environment Variables
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
39 =====================
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
41 As documented in :hg:`help environment`, various environment variables
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
42 influence the operation of Mercurial. The following are particularly
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
43 relevant for machines consuming Mercurial:
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
44
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
45 HGPLAIN
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
46 If not set, Mercurial's output could be influenced by configuration
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
47 settings that impact its encoding, verbose mode, localization, etc.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
48
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
49 It is highly recommended for machines to set this variable when
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
50 invoking ``hg`` processes.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
51
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
52 HGENCODING
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
53 If not set, the locale used by Mercurial will be detected from the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
54 environment. If the determined locale does not support display of
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
55 certain characters, Mercurial may render these character sequences
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
56 incorrectly (often by using "?" as a placeholder for invalid
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
57 characters in the current locale).
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
58
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
59 Explcitly setting this environment variable is a good practice to
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
60 guarantee consistent results. "utf-8" is a good choice on UNIX-like
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
61 environments.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
62
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
63 HGRCPATH
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
64 If not set, Mercurial will inherit config options from config files
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
65 using the process described in :hg:`help config`. This includes
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
66 inheriting user or system-wide config files.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
67
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
68 When utmost control over the Mercurial configuration is desired, the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
69 value of ``HGRCPATH`` can be set to an explicit file with known good
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
70 configs. In rare cases, the value can be set to an empty file or the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
71 null device (often ``/dev/null``) to bypass loading of any user or
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
72 system config files. Note that these approaches can have unintended
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
73 consequences, as the user and system config files often define things
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
74 like the username and extensions that may be required to interface
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75 with a repository.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
76
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
77 Consuming Command Output
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
78 ========================
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
79
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
80 It is common for machines to need to parse the output of Mercurial
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
81 commands for relevant data. This section describes the various
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
82 techniques for doing so.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
83
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
84 Parsing Raw Command Output
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
85 --------------------------
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
86
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
87 Likely the simplest and most effective solution for consuming command
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
88 output is to simply invoke ``hg`` commands as you would as a user and
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
89 parse their output.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
90
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
91 The output of many commands can easily be parsed with tools like
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
92 ``grep``, ``sed``, and ``awk``.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
93
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
94 A potential downside with parsing command output is that the output
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
95 of commands can change when Mercurial is upgraded. While Mercurial
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
96 does generally strive for strong backwards compatibility, command
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
97 output does occasionally change. Having tests for your automated
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
98 interactions with ``hg`` commands is generally recommended, but is
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
99 even more important when raw command output parsing is involved.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
100
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
101 Using Templates to Control Output
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102 ---------------------------------
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
104 Many ``hg`` commands support templatized output via the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
105 ``-T/--template`` argument. For more, see :hg:`help templates`.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
106
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
107 Templates are useful for explicitly controlling output so that
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 you get exactly the data you want formatted how you want it. For
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109 example, ``log -T {node}\n`` can be used to print a newline
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110 delimited list of changeset nodes instead of a human-tailored
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111 output containing authors, dates, descriptions, etc.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
113 .. tip::
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
114
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
115 If parsing raw command output is too complicated, consider
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
116 using templates to make your life easier.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
117
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
118 The ``-T/--template`` argument allows specifying pre-defined styles.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
119 Mercurial ships with the machine-readable styles ``json`` and ``xml``,
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
120 which provide JSON and XML output, respectively. These are useful for
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
121 producing output that is machine readable as-is.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
122
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
123 .. important::
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
124
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
125 The ``json`` and ``xml`` styles are considered experimental. While
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
126 they may be attractive to use for easily obtaining machine-readable
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
127 output, their behavior may change in subsequent versions.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
128
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
129 These styles may also exhibit unexpected results when dealing with
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
130 certain encodings. Mercurial treats things like filenames as a
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
131 series of bytes and normalizing certain byte sequences to JSON
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
132 or XML with certain encoding settings can lead to surprises.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
133
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
134 Command Server Output
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
135 ---------------------
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
136
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
137 If using the command server to interact with Mercurial, you are likely
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
138 using an existing library/API that abstracts implementation details of
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
139 the command server. If so, this interface layer may perform parsing for
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
140 you, saving you the work of implementing it yourself.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
141
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
142 Output Verbosity
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
143 ----------------
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
144
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
145 Commands often have varying output verbosity, even when machine
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
146 readable styles are being used (e.g. ``-T json``). Adding
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147 ``-v/--verbose`` and ``--debug`` to the command's arguments can
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148 increase the amount of data exposed by Mercurial.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
150 An alternate way to get the data you need is by explicitly specifying
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151 a template.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
152
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
153 Other Topics
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
154 ============
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
155
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
156 revsets
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
157 Revisions sets is a functional query language for selecting a set
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
158 of revisions. Think of it as SQL for Mercurial repositories. Revsets
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
159 are useful for querying repositories for specific data.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
160
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
161 See :hg:`help revsets` for more.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
162
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
163 share extension
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
164 The ``share`` extension provides functionality for sharing
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
165 repository data across several working copies. It can even
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
166 automatically "pool" storage for logically related repositories when
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
167 cloning.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
168
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
169 Configuring the ``share`` extension can lead to significant resource
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
170 utilization reduction, particularly around disk space and the
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
171 network. This is especially true for continuous integration (CI)
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
172 environments.
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
173
9de443515f1d help: scripting help topic
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
174 See :hg:`help -e share` for more.