Show More
@@ -1,2658 +1,2665 b'' | |||||
1 | The Mercurial system uses a set of configuration files to control |
|
1 | The Mercurial system uses a set of configuration files to control | |
2 | aspects of its behavior. |
|
2 | aspects of its behavior. | |
3 |
|
3 | |||
4 | Troubleshooting |
|
4 | Troubleshooting | |
5 | =============== |
|
5 | =============== | |
6 |
|
6 | |||
7 | If you're having problems with your configuration, |
|
7 | If you're having problems with your configuration, | |
8 | :hg:`config --debug` can help you understand what is introducing |
|
8 | :hg:`config --debug` can help you understand what is introducing | |
9 | a setting into your environment. |
|
9 | a setting into your environment. | |
10 |
|
10 | |||
11 | See :hg:`help config.syntax` and :hg:`help config.files` |
|
11 | See :hg:`help config.syntax` and :hg:`help config.files` | |
12 | for information about how and where to override things. |
|
12 | for information about how and where to override things. | |
13 |
|
13 | |||
14 | Structure |
|
14 | Structure | |
15 | ========= |
|
15 | ========= | |
16 |
|
16 | |||
17 | The configuration files use a simple ini-file format. A configuration |
|
17 | The configuration files use a simple ini-file format. A configuration | |
18 | file consists of sections, led by a ``[section]`` header and followed |
|
18 | file consists of sections, led by a ``[section]`` header and followed | |
19 | by ``name = value`` entries:: |
|
19 | by ``name = value`` entries:: | |
20 |
|
20 | |||
21 | [ui] |
|
21 | [ui] | |
22 | username = Firstname Lastname <firstname.lastname@example.net> |
|
22 | username = Firstname Lastname <firstname.lastname@example.net> | |
23 | verbose = True |
|
23 | verbose = True | |
24 |
|
24 | |||
25 | The above entries will be referred to as ``ui.username`` and |
|
25 | The above entries will be referred to as ``ui.username`` and | |
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. |
|
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. | |
27 |
|
27 | |||
28 | Files |
|
28 | Files | |
29 | ===== |
|
29 | ===== | |
30 |
|
30 | |||
31 | Mercurial reads configuration data from several files, if they exist. |
|
31 | Mercurial reads configuration data from several files, if they exist. | |
32 | These files do not exist by default and you will have to create the |
|
32 | These files do not exist by default and you will have to create the | |
33 | appropriate configuration files yourself: |
|
33 | appropriate configuration files yourself: | |
34 |
|
34 | |||
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. |
|
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. | |
36 |
|
36 | |||
37 | Global configuration like the username setting is typically put into: |
|
37 | Global configuration like the username setting is typically put into: | |
38 |
|
38 | |||
39 | .. container:: windows |
|
39 | .. container:: windows | |
40 |
|
40 | |||
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) |
|
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) | |
42 |
|
42 | |||
43 | .. container:: unix.plan9 |
|
43 | .. container:: unix.plan9 | |
44 |
|
44 | |||
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) |
|
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) | |
46 |
|
46 | |||
47 | The names of these files depend on the system on which Mercurial is |
|
47 | The names of these files depend on the system on which Mercurial is | |
48 | installed. ``*.rc`` files from a single directory are read in |
|
48 | installed. ``*.rc`` files from a single directory are read in | |
49 | alphabetical order, later ones overriding earlier ones. Where multiple |
|
49 | alphabetical order, later ones overriding earlier ones. Where multiple | |
50 | paths are given below, settings from earlier paths override later |
|
50 | paths are given below, settings from earlier paths override later | |
51 | ones. |
|
51 | ones. | |
52 |
|
52 | |||
53 | .. container:: verbose.unix |
|
53 | .. container:: verbose.unix | |
54 |
|
54 | |||
55 | On Unix, the following files are consulted: |
|
55 | On Unix, the following files are consulted: | |
56 |
|
56 | |||
57 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
57 | - ``<repo>/.hg/hgrc`` (per-repository) | |
58 | - ``$HOME/.hgrc`` (per-user) |
|
58 | - ``$HOME/.hgrc`` (per-user) | |
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) |
|
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) | |
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) | |
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) | |
62 | - ``/etc/mercurial/hgrc`` (per-system) |
|
62 | - ``/etc/mercurial/hgrc`` (per-system) | |
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) | |
64 | - ``<internal>/default.d/*.rc`` (defaults) |
|
64 | - ``<internal>/default.d/*.rc`` (defaults) | |
65 |
|
65 | |||
66 | .. container:: verbose.windows |
|
66 | .. container:: verbose.windows | |
67 |
|
67 | |||
68 | On Windows, the following files are consulted: |
|
68 | On Windows, the following files are consulted: | |
69 |
|
69 | |||
70 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
70 | - ``<repo>/.hg/hgrc`` (per-repository) | |
71 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
71 | - ``%USERPROFILE%\.hgrc`` (per-user) | |
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) | |
73 | - ``%HOME%\.hgrc`` (per-user) |
|
73 | - ``%HOME%\.hgrc`` (per-user) | |
74 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
74 | - ``%HOME%\Mercurial.ini`` (per-user) | |
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) |
|
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) | |
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) | |
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) | |
78 | - ``<internal>/default.d/*.rc`` (defaults) |
|
78 | - ``<internal>/default.d/*.rc`` (defaults) | |
79 |
|
79 | |||
80 | .. note:: |
|
80 | .. note:: | |
81 |
|
81 | |||
82 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
82 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` | |
83 | is used when running 32-bit Python on 64-bit Windows. |
|
83 | is used when running 32-bit Python on 64-bit Windows. | |
84 |
|
84 | |||
85 | .. container:: windows |
|
85 | .. container:: windows | |
86 |
|
86 | |||
87 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. |
|
87 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. | |
88 |
|
88 | |||
89 | .. container:: verbose.plan9 |
|
89 | .. container:: verbose.plan9 | |
90 |
|
90 | |||
91 | On Plan9, the following files are consulted: |
|
91 | On Plan9, the following files are consulted: | |
92 |
|
92 | |||
93 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
93 | - ``<repo>/.hg/hgrc`` (per-repository) | |
94 | - ``$home/lib/hgrc`` (per-user) |
|
94 | - ``$home/lib/hgrc`` (per-user) | |
95 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
95 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) | |
96 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
96 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) | |
97 | - ``/lib/mercurial/hgrc`` (per-system) |
|
97 | - ``/lib/mercurial/hgrc`` (per-system) | |
98 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
98 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) | |
99 | - ``<internal>/default.d/*.rc`` (defaults) |
|
99 | - ``<internal>/default.d/*.rc`` (defaults) | |
100 |
|
100 | |||
101 | Per-repository configuration options only apply in a |
|
101 | Per-repository configuration options only apply in a | |
102 | particular repository. This file is not version-controlled, and |
|
102 | particular repository. This file is not version-controlled, and | |
103 | will not get transferred during a "clone" operation. Options in |
|
103 | will not get transferred during a "clone" operation. Options in | |
104 | this file override options in all other configuration files. |
|
104 | this file override options in all other configuration files. | |
105 |
|
105 | |||
106 | .. container:: unix.plan9 |
|
106 | .. container:: unix.plan9 | |
107 |
|
107 | |||
108 | On Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
108 | On Plan 9 and Unix, most of this file will be ignored if it doesn't | |
109 | belong to a trusted user or to a trusted group. See |
|
109 | belong to a trusted user or to a trusted group. See | |
110 | :hg:`help config.trusted` for more details. |
|
110 | :hg:`help config.trusted` for more details. | |
111 |
|
111 | |||
112 | Per-user configuration file(s) are for the user running Mercurial. Options |
|
112 | Per-user configuration file(s) are for the user running Mercurial. Options | |
113 | in these files apply to all Mercurial commands executed by this user in any |
|
113 | in these files apply to all Mercurial commands executed by this user in any | |
114 | directory. Options in these files override per-system and per-installation |
|
114 | directory. Options in these files override per-system and per-installation | |
115 | options. |
|
115 | options. | |
116 |
|
116 | |||
117 | Per-installation configuration files are searched for in the |
|
117 | Per-installation configuration files are searched for in the | |
118 | directory where Mercurial is installed. ``<install-root>`` is the |
|
118 | directory where Mercurial is installed. ``<install-root>`` is the | |
119 | parent directory of the **hg** executable (or symlink) being run. |
|
119 | parent directory of the **hg** executable (or symlink) being run. | |
120 |
|
120 | |||
121 | .. container:: unix.plan9 |
|
121 | .. container:: unix.plan9 | |
122 |
|
122 | |||
123 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial |
|
123 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial | |
124 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these |
|
124 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these | |
125 | files apply to all Mercurial commands executed by any user in any |
|
125 | files apply to all Mercurial commands executed by any user in any | |
126 | directory. |
|
126 | directory. | |
127 |
|
127 | |||
128 | Per-installation configuration files are for the system on |
|
128 | Per-installation configuration files are for the system on | |
129 | which Mercurial is running. Options in these files apply to all |
|
129 | which Mercurial is running. Options in these files apply to all | |
130 | Mercurial commands executed by any user in any directory. Registry |
|
130 | Mercurial commands executed by any user in any directory. Registry | |
131 | keys contain PATH-like strings, every part of which must reference |
|
131 | keys contain PATH-like strings, every part of which must reference | |
132 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
132 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
133 | be read. Mercurial checks each of these locations in the specified |
|
133 | be read. Mercurial checks each of these locations in the specified | |
134 | order until one or more configuration files are detected. |
|
134 | order until one or more configuration files are detected. | |
135 |
|
135 | |||
136 | Per-system configuration files are for the system on which Mercurial |
|
136 | Per-system configuration files are for the system on which Mercurial | |
137 | is running. Options in these files apply to all Mercurial commands |
|
137 | is running. Options in these files apply to all Mercurial commands | |
138 | executed by any user in any directory. Options in these files |
|
138 | executed by any user in any directory. Options in these files | |
139 | override per-installation options. |
|
139 | override per-installation options. | |
140 |
|
140 | |||
141 | Mercurial comes with some default configuration. The default configuration |
|
141 | Mercurial comes with some default configuration. The default configuration | |
142 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
142 | files are installed with Mercurial and will be overwritten on upgrades. Default | |
143 | configuration files should never be edited by users or administrators but can |
|
143 | configuration files should never be edited by users or administrators but can | |
144 | be overridden in other configuration files. So far the directory only contains |
|
144 | be overridden in other configuration files. So far the directory only contains | |
145 | merge tool configuration but packagers can also put other default configuration |
|
145 | merge tool configuration but packagers can also put other default configuration | |
146 | there. |
|
146 | there. | |
147 |
|
147 | |||
148 | Syntax |
|
148 | Syntax | |
149 | ====== |
|
149 | ====== | |
150 |
|
150 | |||
151 | A configuration file consists of sections, led by a ``[section]`` header |
|
151 | A configuration file consists of sections, led by a ``[section]`` header | |
152 | and followed by ``name = value`` entries (sometimes called |
|
152 | and followed by ``name = value`` entries (sometimes called | |
153 | ``configuration keys``):: |
|
153 | ``configuration keys``):: | |
154 |
|
154 | |||
155 | [spam] |
|
155 | [spam] | |
156 | eggs=ham |
|
156 | eggs=ham | |
157 | green= |
|
157 | green= | |
158 | eggs |
|
158 | eggs | |
159 |
|
159 | |||
160 | Each line contains one entry. If the lines that follow are indented, |
|
160 | Each line contains one entry. If the lines that follow are indented, | |
161 | they are treated as continuations of that entry. Leading whitespace is |
|
161 | they are treated as continuations of that entry. Leading whitespace is | |
162 | removed from values. Empty lines are skipped. Lines beginning with |
|
162 | removed from values. Empty lines are skipped. Lines beginning with | |
163 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
163 | ``#`` or ``;`` are ignored and may be used to provide comments. | |
164 |
|
164 | |||
165 | Configuration keys can be set multiple times, in which case Mercurial |
|
165 | Configuration keys can be set multiple times, in which case Mercurial | |
166 | will use the value that was configured last. As an example:: |
|
166 | will use the value that was configured last. As an example:: | |
167 |
|
167 | |||
168 | [spam] |
|
168 | [spam] | |
169 | eggs=large |
|
169 | eggs=large | |
170 | ham=serrano |
|
170 | ham=serrano | |
171 | eggs=small |
|
171 | eggs=small | |
172 |
|
172 | |||
173 | This would set the configuration key named ``eggs`` to ``small``. |
|
173 | This would set the configuration key named ``eggs`` to ``small``. | |
174 |
|
174 | |||
175 | It is also possible to define a section multiple times. A section can |
|
175 | It is also possible to define a section multiple times. A section can | |
176 | be redefined on the same and/or on different configuration files. For |
|
176 | be redefined on the same and/or on different configuration files. For | |
177 | example:: |
|
177 | example:: | |
178 |
|
178 | |||
179 | [foo] |
|
179 | [foo] | |
180 | eggs=large |
|
180 | eggs=large | |
181 | ham=serrano |
|
181 | ham=serrano | |
182 | eggs=small |
|
182 | eggs=small | |
183 |
|
183 | |||
184 | [bar] |
|
184 | [bar] | |
185 | eggs=ham |
|
185 | eggs=ham | |
186 | green= |
|
186 | green= | |
187 | eggs |
|
187 | eggs | |
188 |
|
188 | |||
189 | [foo] |
|
189 | [foo] | |
190 | ham=prosciutto |
|
190 | ham=prosciutto | |
191 | eggs=medium |
|
191 | eggs=medium | |
192 | bread=toasted |
|
192 | bread=toasted | |
193 |
|
193 | |||
194 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
194 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys | |
195 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
195 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, | |
196 | respectively. As you can see there only thing that matters is the last |
|
196 | respectively. As you can see there only thing that matters is the last | |
197 | value that was set for each of the configuration keys. |
|
197 | value that was set for each of the configuration keys. | |
198 |
|
198 | |||
199 | If a configuration key is set multiple times in different |
|
199 | If a configuration key is set multiple times in different | |
200 | configuration files the final value will depend on the order in which |
|
200 | configuration files the final value will depend on the order in which | |
201 | the different configuration files are read, with settings from earlier |
|
201 | the different configuration files are read, with settings from earlier | |
202 | paths overriding later ones as described on the ``Files`` section |
|
202 | paths overriding later ones as described on the ``Files`` section | |
203 | above. |
|
203 | above. | |
204 |
|
204 | |||
205 | A line of the form ``%include file`` will include ``file`` into the |
|
205 | A line of the form ``%include file`` will include ``file`` into the | |
206 | current configuration file. The inclusion is recursive, which means |
|
206 | current configuration file. The inclusion is recursive, which means | |
207 | that included files can include other files. Filenames are relative to |
|
207 | that included files can include other files. Filenames are relative to | |
208 | the configuration file in which the ``%include`` directive is found. |
|
208 | the configuration file in which the ``%include`` directive is found. | |
209 | Environment variables and ``~user`` constructs are expanded in |
|
209 | Environment variables and ``~user`` constructs are expanded in | |
210 | ``file``. This lets you do something like:: |
|
210 | ``file``. This lets you do something like:: | |
211 |
|
211 | |||
212 | %include ~/.hgrc.d/$HOST.rc |
|
212 | %include ~/.hgrc.d/$HOST.rc | |
213 |
|
213 | |||
214 | to include a different configuration file on each computer you use. |
|
214 | to include a different configuration file on each computer you use. | |
215 |
|
215 | |||
216 | A line with ``%unset name`` will remove ``name`` from the current |
|
216 | A line with ``%unset name`` will remove ``name`` from the current | |
217 | section, if it has been set previously. |
|
217 | section, if it has been set previously. | |
218 |
|
218 | |||
219 | The values are either free-form text strings, lists of text strings, |
|
219 | The values are either free-form text strings, lists of text strings, | |
220 | or Boolean values. Boolean values can be set to true using any of "1", |
|
220 | or Boolean values. Boolean values can be set to true using any of "1", | |
221 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
221 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" | |
222 | (all case insensitive). |
|
222 | (all case insensitive). | |
223 |
|
223 | |||
224 | List values are separated by whitespace or comma, except when values are |
|
224 | List values are separated by whitespace or comma, except when values are | |
225 | placed in double quotation marks:: |
|
225 | placed in double quotation marks:: | |
226 |
|
226 | |||
227 | allow_read = "John Doe, PhD", brian, betty |
|
227 | allow_read = "John Doe, PhD", brian, betty | |
228 |
|
228 | |||
229 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
229 | Quotation marks can be escaped by prefixing them with a backslash. Only | |
230 | quotation marks at the beginning of a word is counted as a quotation |
|
230 | quotation marks at the beginning of a word is counted as a quotation | |
231 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
231 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). | |
232 |
|
232 | |||
233 | Sections |
|
233 | Sections | |
234 | ======== |
|
234 | ======== | |
235 |
|
235 | |||
236 | This section describes the different sections that may appear in a |
|
236 | This section describes the different sections that may appear in a | |
237 | Mercurial configuration file, the purpose of each section, its possible |
|
237 | Mercurial configuration file, the purpose of each section, its possible | |
238 | keys, and their possible values. |
|
238 | keys, and their possible values. | |
239 |
|
239 | |||
240 | ``alias`` |
|
240 | ``alias`` | |
241 | --------- |
|
241 | --------- | |
242 |
|
242 | |||
243 | Defines command aliases. |
|
243 | Defines command aliases. | |
244 |
|
244 | |||
245 | Aliases allow you to define your own commands in terms of other |
|
245 | Aliases allow you to define your own commands in terms of other | |
246 | commands (or aliases), optionally including arguments. Positional |
|
246 | commands (or aliases), optionally including arguments. Positional | |
247 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition |
|
247 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition | |
248 | are expanded by Mercurial before execution. Positional arguments not |
|
248 | are expanded by Mercurial before execution. Positional arguments not | |
249 | already used by ``$N`` in the definition are put at the end of the |
|
249 | already used by ``$N`` in the definition are put at the end of the | |
250 | command to be executed. |
|
250 | command to be executed. | |
251 |
|
251 | |||
252 | Alias definitions consist of lines of the form:: |
|
252 | Alias definitions consist of lines of the form:: | |
253 |
|
253 | |||
254 | <alias> = <command> [<argument>]... |
|
254 | <alias> = <command> [<argument>]... | |
255 |
|
255 | |||
256 | For example, this definition:: |
|
256 | For example, this definition:: | |
257 |
|
257 | |||
258 | latest = log --limit 5 |
|
258 | latest = log --limit 5 | |
259 |
|
259 | |||
260 | creates a new command ``latest`` that shows only the five most recent |
|
260 | creates a new command ``latest`` that shows only the five most recent | |
261 | changesets. You can define subsequent aliases using earlier ones:: |
|
261 | changesets. You can define subsequent aliases using earlier ones:: | |
262 |
|
262 | |||
263 | stable5 = latest -b stable |
|
263 | stable5 = latest -b stable | |
264 |
|
264 | |||
265 | .. note:: |
|
265 | .. note:: | |
266 |
|
266 | |||
267 | It is possible to create aliases with the same names as |
|
267 | It is possible to create aliases with the same names as | |
268 | existing commands, which will then override the original |
|
268 | existing commands, which will then override the original | |
269 | definitions. This is almost always a bad idea! |
|
269 | definitions. This is almost always a bad idea! | |
270 |
|
270 | |||
271 | An alias can start with an exclamation point (``!``) to make it a |
|
271 | An alias can start with an exclamation point (``!``) to make it a | |
272 | shell alias. A shell alias is executed with the shell and will let you |
|
272 | shell alias. A shell alias is executed with the shell and will let you | |
273 | run arbitrary commands. As an example, :: |
|
273 | run arbitrary commands. As an example, :: | |
274 |
|
274 | |||
275 | echo = !echo $@ |
|
275 | echo = !echo $@ | |
276 |
|
276 | |||
277 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
277 | will let you do ``hg echo foo`` to have ``foo`` printed in your | |
278 | terminal. A better example might be:: |
|
278 | terminal. A better example might be:: | |
279 |
|
279 | |||
280 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f |
|
280 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f | |
281 |
|
281 | |||
282 | which will make ``hg purge`` delete all unknown files in the |
|
282 | which will make ``hg purge`` delete all unknown files in the | |
283 | repository in the same manner as the purge extension. |
|
283 | repository in the same manner as the purge extension. | |
284 |
|
284 | |||
285 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
285 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition | |
286 | expand to the command arguments. Unmatched arguments are |
|
286 | expand to the command arguments. Unmatched arguments are | |
287 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
287 | removed. ``$0`` expands to the alias name and ``$@`` expands to all | |
288 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
288 | arguments separated by a space. ``"$@"`` (with quotes) expands to all | |
289 | arguments quoted individually and separated by a space. These expansions |
|
289 | arguments quoted individually and separated by a space. These expansions | |
290 | happen before the command is passed to the shell. |
|
290 | happen before the command is passed to the shell. | |
291 |
|
291 | |||
292 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
292 | Shell aliases are executed in an environment where ``$HG`` expands to | |
293 | the path of the Mercurial that was used to execute the alias. This is |
|
293 | the path of the Mercurial that was used to execute the alias. This is | |
294 | useful when you want to call further Mercurial commands in a shell |
|
294 | useful when you want to call further Mercurial commands in a shell | |
295 | alias, as was done above for the purge alias. In addition, |
|
295 | alias, as was done above for the purge alias. In addition, | |
296 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
296 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg | |
297 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
297 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. | |
298 |
|
298 | |||
299 | .. note:: |
|
299 | .. note:: | |
300 |
|
300 | |||
301 | Some global configuration options such as ``-R`` are |
|
301 | Some global configuration options such as ``-R`` are | |
302 | processed before shell aliases and will thus not be passed to |
|
302 | processed before shell aliases and will thus not be passed to | |
303 | aliases. |
|
303 | aliases. | |
304 |
|
304 | |||
305 |
|
305 | |||
306 | ``annotate`` |
|
306 | ``annotate`` | |
307 | ------------ |
|
307 | ------------ | |
308 |
|
308 | |||
309 | Settings used when displaying file annotations. All values are |
|
309 | Settings used when displaying file annotations. All values are | |
310 | Booleans and default to False. See :hg:`help config.diff` for |
|
310 | Booleans and default to False. See :hg:`help config.diff` for | |
311 | related options for the diff command. |
|
311 | related options for the diff command. | |
312 |
|
312 | |||
313 | ``ignorews`` |
|
313 | ``ignorews`` | |
314 | Ignore white space when comparing lines. |
|
314 | Ignore white space when comparing lines. | |
315 |
|
315 | |||
316 | ``ignorewseol`` |
|
316 | ``ignorewseol`` | |
317 | Ignore white space at the end of a line when comparing lines. |
|
317 | Ignore white space at the end of a line when comparing lines. | |
318 |
|
318 | |||
319 | ``ignorewsamount`` |
|
319 | ``ignorewsamount`` | |
320 | Ignore changes in the amount of white space. |
|
320 | Ignore changes in the amount of white space. | |
321 |
|
321 | |||
322 | ``ignoreblanklines`` |
|
322 | ``ignoreblanklines`` | |
323 | Ignore changes whose lines are all blank. |
|
323 | Ignore changes whose lines are all blank. | |
324 |
|
324 | |||
325 |
|
325 | |||
326 | ``auth`` |
|
326 | ``auth`` | |
327 | -------- |
|
327 | -------- | |
328 |
|
328 | |||
329 | Authentication credentials and other authentication-like configuration |
|
329 | Authentication credentials and other authentication-like configuration | |
330 | for HTTP connections. This section allows you to store usernames and |
|
330 | for HTTP connections. This section allows you to store usernames and | |
331 | passwords for use when logging *into* HTTP servers. See |
|
331 | passwords for use when logging *into* HTTP servers. See | |
332 | :hg:`help config.web` if you want to configure *who* can login to |
|
332 | :hg:`help config.web` if you want to configure *who* can login to | |
333 | your HTTP server. |
|
333 | your HTTP server. | |
334 |
|
334 | |||
335 | The following options apply to all hosts. |
|
335 | The following options apply to all hosts. | |
336 |
|
336 | |||
337 | ``cookiefile`` |
|
337 | ``cookiefile`` | |
338 | Path to a file containing HTTP cookie lines. Cookies matching a |
|
338 | Path to a file containing HTTP cookie lines. Cookies matching a | |
339 | host will be sent automatically. |
|
339 | host will be sent automatically. | |
340 |
|
340 | |||
341 | The file format uses the Mozilla cookies.txt format, which defines cookies |
|
341 | The file format uses the Mozilla cookies.txt format, which defines cookies | |
342 | on their own lines. Each line contains 7 fields delimited by the tab |
|
342 | on their own lines. Each line contains 7 fields delimited by the tab | |
343 | character (domain, is_domain_cookie, path, is_secure, expires, name, |
|
343 | character (domain, is_domain_cookie, path, is_secure, expires, name, | |
344 | value). For more info, do an Internet search for "Netscape cookies.txt |
|
344 | value). For more info, do an Internet search for "Netscape cookies.txt | |
345 | format." |
|
345 | format." | |
346 |
|
346 | |||
347 | Note: the cookies parser does not handle port numbers on domains. You |
|
347 | Note: the cookies parser does not handle port numbers on domains. You | |
348 | will need to remove ports from the domain for the cookie to be recognized. |
|
348 | will need to remove ports from the domain for the cookie to be recognized. | |
349 | This could result in a cookie being disclosed to an unwanted server. |
|
349 | This could result in a cookie being disclosed to an unwanted server. | |
350 |
|
350 | |||
351 | The cookies file is read-only. |
|
351 | The cookies file is read-only. | |
352 |
|
352 | |||
353 | Other options in this section are grouped by name and have the following |
|
353 | Other options in this section are grouped by name and have the following | |
354 | format:: |
|
354 | format:: | |
355 |
|
355 | |||
356 | <name>.<argument> = <value> |
|
356 | <name>.<argument> = <value> | |
357 |
|
357 | |||
358 | where ``<name>`` is used to group arguments into authentication |
|
358 | where ``<name>`` is used to group arguments into authentication | |
359 | entries. Example:: |
|
359 | entries. Example:: | |
360 |
|
360 | |||
361 | foo.prefix = hg.intevation.de/mercurial |
|
361 | foo.prefix = hg.intevation.de/mercurial | |
362 | foo.username = foo |
|
362 | foo.username = foo | |
363 | foo.password = bar |
|
363 | foo.password = bar | |
364 | foo.schemes = http https |
|
364 | foo.schemes = http https | |
365 |
|
365 | |||
366 | bar.prefix = secure.example.org |
|
366 | bar.prefix = secure.example.org | |
367 | bar.key = path/to/file.key |
|
367 | bar.key = path/to/file.key | |
368 | bar.cert = path/to/file.cert |
|
368 | bar.cert = path/to/file.cert | |
369 | bar.schemes = https |
|
369 | bar.schemes = https | |
370 |
|
370 | |||
371 | Supported arguments: |
|
371 | Supported arguments: | |
372 |
|
372 | |||
373 | ``prefix`` |
|
373 | ``prefix`` | |
374 | Either ``*`` or a URI prefix with or without the scheme part. |
|
374 | Either ``*`` or a URI prefix with or without the scheme part. | |
375 | The authentication entry with the longest matching prefix is used |
|
375 | The authentication entry with the longest matching prefix is used | |
376 | (where ``*`` matches everything and counts as a match of length |
|
376 | (where ``*`` matches everything and counts as a match of length | |
377 | 1). If the prefix doesn't include a scheme, the match is performed |
|
377 | 1). If the prefix doesn't include a scheme, the match is performed | |
378 | against the URI with its scheme stripped as well, and the schemes |
|
378 | against the URI with its scheme stripped as well, and the schemes | |
379 | argument, q.v., is then subsequently consulted. |
|
379 | argument, q.v., is then subsequently consulted. | |
380 |
|
380 | |||
381 | ``username`` |
|
381 | ``username`` | |
382 | Optional. Username to authenticate with. If not given, and the |
|
382 | Optional. Username to authenticate with. If not given, and the | |
383 | remote site requires basic or digest authentication, the user will |
|
383 | remote site requires basic or digest authentication, the user will | |
384 | be prompted for it. Environment variables are expanded in the |
|
384 | be prompted for it. Environment variables are expanded in the | |
385 | username letting you do ``foo.username = $USER``. If the URI |
|
385 | username letting you do ``foo.username = $USER``. If the URI | |
386 | includes a username, only ``[auth]`` entries with a matching |
|
386 | includes a username, only ``[auth]`` entries with a matching | |
387 | username or without a username will be considered. |
|
387 | username or without a username will be considered. | |
388 |
|
388 | |||
389 | ``password`` |
|
389 | ``password`` | |
390 | Optional. Password to authenticate with. If not given, and the |
|
390 | Optional. Password to authenticate with. If not given, and the | |
391 | remote site requires basic or digest authentication, the user |
|
391 | remote site requires basic or digest authentication, the user | |
392 | will be prompted for it. |
|
392 | will be prompted for it. | |
393 |
|
393 | |||
394 | ``key`` |
|
394 | ``key`` | |
395 | Optional. PEM encoded client certificate key file. Environment |
|
395 | Optional. PEM encoded client certificate key file. Environment | |
396 | variables are expanded in the filename. |
|
396 | variables are expanded in the filename. | |
397 |
|
397 | |||
398 | ``cert`` |
|
398 | ``cert`` | |
399 | Optional. PEM encoded client certificate chain file. Environment |
|
399 | Optional. PEM encoded client certificate chain file. Environment | |
400 | variables are expanded in the filename. |
|
400 | variables are expanded in the filename. | |
401 |
|
401 | |||
402 | ``schemes`` |
|
402 | ``schemes`` | |
403 | Optional. Space separated list of URI schemes to use this |
|
403 | Optional. Space separated list of URI schemes to use this | |
404 | authentication entry with. Only used if the prefix doesn't include |
|
404 | authentication entry with. Only used if the prefix doesn't include | |
405 | a scheme. Supported schemes are http and https. They will match |
|
405 | a scheme. Supported schemes are http and https. They will match | |
406 | static-http and static-https respectively, as well. |
|
406 | static-http and static-https respectively, as well. | |
407 | (default: https) |
|
407 | (default: https) | |
408 |
|
408 | |||
409 | If no suitable authentication entry is found, the user is prompted |
|
409 | If no suitable authentication entry is found, the user is prompted | |
410 | for credentials as usual if required by the remote. |
|
410 | for credentials as usual if required by the remote. | |
411 |
|
411 | |||
412 | ``color`` |
|
412 | ``color`` | |
413 | --------- |
|
413 | --------- | |
414 |
|
414 | |||
415 | Configure the Mercurial color mode. For details about how to define your custom |
|
415 | Configure the Mercurial color mode. For details about how to define your custom | |
416 | effect and style see :hg:`help color`. |
|
416 | effect and style see :hg:`help color`. | |
417 |
|
417 | |||
418 | ``mode`` |
|
418 | ``mode`` | |
419 | String: control the method used to output color. One of ``auto``, ``ansi``, |
|
419 | String: control the method used to output color. One of ``auto``, ``ansi``, | |
420 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will |
|
420 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will | |
421 | use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a |
|
421 | use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a | |
422 | terminal. Any invalid value will disable color. |
|
422 | terminal. Any invalid value will disable color. | |
423 |
|
423 | |||
424 | ``pagermode`` |
|
424 | ``pagermode`` | |
425 | String: optional override of ``color.mode`` used with pager. |
|
425 | String: optional override of ``color.mode`` used with pager. | |
426 |
|
426 | |||
427 | On some systems, terminfo mode may cause problems when using |
|
427 | On some systems, terminfo mode may cause problems when using | |
428 | color with ``less -R`` as a pager program. less with the -R option |
|
428 | color with ``less -R`` as a pager program. less with the -R option | |
429 | will only display ECMA-48 color codes, and terminfo mode may sometimes |
|
429 | will only display ECMA-48 color codes, and terminfo mode may sometimes | |
430 | emit codes that less doesn't understand. You can work around this by |
|
430 | emit codes that less doesn't understand. You can work around this by | |
431 | either using ansi mode (or auto mode), or by using less -r (which will |
|
431 | either using ansi mode (or auto mode), or by using less -r (which will | |
432 | pass through all terminal control codes, not just color control |
|
432 | pass through all terminal control codes, not just color control | |
433 | codes). |
|
433 | codes). | |
434 |
|
434 | |||
435 | On some systems (such as MSYS in Windows), the terminal may support |
|
435 | On some systems (such as MSYS in Windows), the terminal may support | |
436 | a different color mode than the pager program. |
|
436 | a different color mode than the pager program. | |
437 |
|
437 | |||
438 | ``commands`` |
|
438 | ``commands`` | |
439 | ------------ |
|
439 | ------------ | |
440 |
|
440 | |||
441 | ``status.relative`` |
|
441 | ``status.relative`` | |
442 | Make paths in :hg:`status` output relative to the current directory. |
|
442 | Make paths in :hg:`status` output relative to the current directory. | |
443 | (default: False) |
|
443 | (default: False) | |
444 |
|
444 | |||
445 | ``status.terse`` |
|
445 | ``status.terse`` | |
446 | Default value for the --terse flag, which condenes status output. |
|
446 | Default value for the --terse flag, which condenes status output. | |
447 | (default: empty) |
|
447 | (default: empty) | |
448 |
|
448 | |||
449 | ``update.check`` |
|
449 | ``update.check`` | |
450 | Determines what level of checking :hg:`update` will perform before moving |
|
450 | Determines what level of checking :hg:`update` will perform before moving | |
451 | to a destination revision. Valid values are ``abort``, ``none``, |
|
451 | to a destination revision. Valid values are ``abort``, ``none``, | |
452 | ``linear``, and ``noconflict``. ``abort`` always fails if the working |
|
452 | ``linear``, and ``noconflict``. ``abort`` always fails if the working | |
453 | directory has uncommitted changes. ``none`` performs no checking, and may |
|
453 | directory has uncommitted changes. ``none`` performs no checking, and may | |
454 | result in a merge with uncommitted changes. ``linear`` allows any update |
|
454 | result in a merge with uncommitted changes. ``linear`` allows any update | |
455 | as long as it follows a straight line in the revision history, and may |
|
455 | as long as it follows a straight line in the revision history, and may | |
456 | trigger a merge with uncommitted changes. ``noconflict`` will allow any |
|
456 | trigger a merge with uncommitted changes. ``noconflict`` will allow any | |
457 | update which would not trigger a merge with uncommitted changes, if any |
|
457 | update which would not trigger a merge with uncommitted changes, if any | |
458 | are present. |
|
458 | are present. | |
459 | (default: ``linear``) |
|
459 | (default: ``linear``) | |
460 |
|
460 | |||
461 | ``update.requiredest`` |
|
461 | ``update.requiredest`` | |
462 | Require that the user pass a destination when running :hg:`update`. |
|
462 | Require that the user pass a destination when running :hg:`update`. | |
463 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` |
|
463 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` | |
464 | will be disallowed. |
|
464 | will be disallowed. | |
465 | (default: False) |
|
465 | (default: False) | |
466 |
|
466 | |||
467 | ``committemplate`` |
|
467 | ``committemplate`` | |
468 | ------------------ |
|
468 | ------------------ | |
469 |
|
469 | |||
470 | ``changeset`` |
|
470 | ``changeset`` | |
471 | String: configuration in this section is used as the template to |
|
471 | String: configuration in this section is used as the template to | |
472 | customize the text shown in the editor when committing. |
|
472 | customize the text shown in the editor when committing. | |
473 |
|
473 | |||
474 | In addition to pre-defined template keywords, commit log specific one |
|
474 | In addition to pre-defined template keywords, commit log specific one | |
475 | below can be used for customization: |
|
475 | below can be used for customization: | |
476 |
|
476 | |||
477 | ``extramsg`` |
|
477 | ``extramsg`` | |
478 | String: Extra message (typically 'Leave message empty to abort |
|
478 | String: Extra message (typically 'Leave message empty to abort | |
479 | commit.'). This may be changed by some commands or extensions. |
|
479 | commit.'). This may be changed by some commands or extensions. | |
480 |
|
480 | |||
481 | For example, the template configuration below shows as same text as |
|
481 | For example, the template configuration below shows as same text as | |
482 | one shown by default:: |
|
482 | one shown by default:: | |
483 |
|
483 | |||
484 | [committemplate] |
|
484 | [committemplate] | |
485 | changeset = {desc}\n\n |
|
485 | changeset = {desc}\n\n | |
486 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
486 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
487 | HG: {extramsg} |
|
487 | HG: {extramsg} | |
488 | HG: -- |
|
488 | HG: -- | |
489 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
489 | HG: user: {author}\n{ifeq(p2rev, "-1", "", | |
490 | "HG: branch merge\n") |
|
490 | "HG: branch merge\n") | |
491 | }HG: branch '{branch}'\n{if(activebookmark, |
|
491 | }HG: branch '{branch}'\n{if(activebookmark, | |
492 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
492 | "HG: bookmark '{activebookmark}'\n") }{subrepos % | |
493 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
493 | "HG: subrepo {subrepo}\n" }{file_adds % | |
494 | "HG: added {file}\n" }{file_mods % |
|
494 | "HG: added {file}\n" }{file_mods % | |
495 | "HG: changed {file}\n" }{file_dels % |
|
495 | "HG: changed {file}\n" }{file_dels % | |
496 | "HG: removed {file}\n" }{if(files, "", |
|
496 | "HG: removed {file}\n" }{if(files, "", | |
497 | "HG: no files changed\n")} |
|
497 | "HG: no files changed\n")} | |
498 |
|
498 | |||
499 | ``diff()`` |
|
499 | ``diff()`` | |
500 | String: show the diff (see :hg:`help templates` for detail) |
|
500 | String: show the diff (see :hg:`help templates` for detail) | |
501 |
|
501 | |||
502 | Sometimes it is helpful to show the diff of the changeset in the editor without |
|
502 | Sometimes it is helpful to show the diff of the changeset in the editor without | |
503 | having to prefix 'HG: ' to each line so that highlighting works correctly. For |
|
503 | having to prefix 'HG: ' to each line so that highlighting works correctly. For | |
504 | this, Mercurial provides a special string which will ignore everything below |
|
504 | this, Mercurial provides a special string which will ignore everything below | |
505 | it:: |
|
505 | it:: | |
506 |
|
506 | |||
507 | HG: ------------------------ >8 ------------------------ |
|
507 | HG: ------------------------ >8 ------------------------ | |
508 |
|
508 | |||
509 | For example, the template configuration below will show the diff below the |
|
509 | For example, the template configuration below will show the diff below the | |
510 | extra message:: |
|
510 | extra message:: | |
511 |
|
511 | |||
512 | [committemplate] |
|
512 | [committemplate] | |
513 | changeset = {desc}\n\n |
|
513 | changeset = {desc}\n\n | |
514 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
514 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
515 | HG: {extramsg} |
|
515 | HG: {extramsg} | |
516 | HG: ------------------------ >8 ------------------------ |
|
516 | HG: ------------------------ >8 ------------------------ | |
517 | HG: Do not touch the line above. |
|
517 | HG: Do not touch the line above. | |
518 | HG: Everything below will be removed. |
|
518 | HG: Everything below will be removed. | |
519 | {diff()} |
|
519 | {diff()} | |
520 |
|
520 | |||
521 | .. note:: |
|
521 | .. note:: | |
522 |
|
522 | |||
523 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
523 | For some problematic encodings (see :hg:`help win32mbcs` for | |
524 | detail), this customization should be configured carefully, to |
|
524 | detail), this customization should be configured carefully, to | |
525 | avoid showing broken characters. |
|
525 | avoid showing broken characters. | |
526 |
|
526 | |||
527 | For example, if a multibyte character ending with backslash (0x5c) is |
|
527 | For example, if a multibyte character ending with backslash (0x5c) is | |
528 | followed by the ASCII character 'n' in the customized template, |
|
528 | followed by the ASCII character 'n' in the customized template, | |
529 | the sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
529 | the sequence of backslash and 'n' is treated as line-feed unexpectedly | |
530 | (and the multibyte character is broken, too). |
|
530 | (and the multibyte character is broken, too). | |
531 |
|
531 | |||
532 | Customized template is used for commands below (``--edit`` may be |
|
532 | Customized template is used for commands below (``--edit`` may be | |
533 | required): |
|
533 | required): | |
534 |
|
534 | |||
535 | - :hg:`backout` |
|
535 | - :hg:`backout` | |
536 | - :hg:`commit` |
|
536 | - :hg:`commit` | |
537 | - :hg:`fetch` (for merge commit only) |
|
537 | - :hg:`fetch` (for merge commit only) | |
538 | - :hg:`graft` |
|
538 | - :hg:`graft` | |
539 | - :hg:`histedit` |
|
539 | - :hg:`histedit` | |
540 | - :hg:`import` |
|
540 | - :hg:`import` | |
541 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
541 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` | |
542 | - :hg:`rebase` |
|
542 | - :hg:`rebase` | |
543 | - :hg:`shelve` |
|
543 | - :hg:`shelve` | |
544 | - :hg:`sign` |
|
544 | - :hg:`sign` | |
545 | - :hg:`tag` |
|
545 | - :hg:`tag` | |
546 | - :hg:`transplant` |
|
546 | - :hg:`transplant` | |
547 |
|
547 | |||
548 | Configuring items below instead of ``changeset`` allows showing |
|
548 | Configuring items below instead of ``changeset`` allows showing | |
549 | customized message only for specific actions, or showing different |
|
549 | customized message only for specific actions, or showing different | |
550 | messages for each action. |
|
550 | messages for each action. | |
551 |
|
551 | |||
552 | - ``changeset.backout`` for :hg:`backout` |
|
552 | - ``changeset.backout`` for :hg:`backout` | |
553 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
553 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges | |
554 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
554 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other | |
555 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
555 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges | |
556 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
556 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other | |
557 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
557 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) | |
558 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
558 | - ``changeset.gpg.sign`` for :hg:`sign` | |
559 | - ``changeset.graft`` for :hg:`graft` |
|
559 | - ``changeset.graft`` for :hg:`graft` | |
560 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
560 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` | |
561 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
561 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` | |
562 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
562 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` | |
563 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
563 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` | |
564 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
564 | - ``changeset.import.bypass`` for :hg:`import --bypass` | |
565 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
565 | - ``changeset.import.normal.merge`` for :hg:`import` on merges | |
566 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
566 | - ``changeset.import.normal.normal`` for :hg:`import` on other | |
567 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
567 | - ``changeset.mq.qnew`` for :hg:`qnew` | |
568 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
568 | - ``changeset.mq.qfold`` for :hg:`qfold` | |
569 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
569 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` | |
570 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
570 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` | |
571 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
571 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges | |
572 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
572 | - ``changeset.rebase.normal`` for :hg:`rebase` on other | |
573 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
573 | - ``changeset.shelve.shelve`` for :hg:`shelve` | |
574 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
574 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` | |
575 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
575 | - ``changeset.tag.remove`` for :hg:`tag --remove` | |
576 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
576 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges | |
577 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
577 | - ``changeset.transplant.normal`` for :hg:`transplant` on other | |
578 |
|
578 | |||
579 | These dot-separated lists of names are treated as hierarchical ones. |
|
579 | These dot-separated lists of names are treated as hierarchical ones. | |
580 | For example, ``changeset.tag.remove`` customizes the commit message |
|
580 | For example, ``changeset.tag.remove`` customizes the commit message | |
581 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
581 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the | |
582 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
582 | commit message for :hg:`tag` regardless of ``--remove`` option. | |
583 |
|
583 | |||
584 | When the external editor is invoked for a commit, the corresponding |
|
584 | When the external editor is invoked for a commit, the corresponding | |
585 | dot-separated list of names without the ``changeset.`` prefix |
|
585 | dot-separated list of names without the ``changeset.`` prefix | |
586 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment |
|
586 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment | |
587 | variable. |
|
587 | variable. | |
588 |
|
588 | |||
589 | In this section, items other than ``changeset`` can be referred from |
|
589 | In this section, items other than ``changeset`` can be referred from | |
590 | others. For example, the configuration to list committed files up |
|
590 | others. For example, the configuration to list committed files up | |
591 | below can be referred as ``{listupfiles}``:: |
|
591 | below can be referred as ``{listupfiles}``:: | |
592 |
|
592 | |||
593 | [committemplate] |
|
593 | [committemplate] | |
594 | listupfiles = {file_adds % |
|
594 | listupfiles = {file_adds % | |
595 | "HG: added {file}\n" }{file_mods % |
|
595 | "HG: added {file}\n" }{file_mods % | |
596 | "HG: changed {file}\n" }{file_dels % |
|
596 | "HG: changed {file}\n" }{file_dels % | |
597 | "HG: removed {file}\n" }{if(files, "", |
|
597 | "HG: removed {file}\n" }{if(files, "", | |
598 | "HG: no files changed\n")} |
|
598 | "HG: no files changed\n")} | |
599 |
|
599 | |||
600 | ``decode/encode`` |
|
600 | ``decode/encode`` | |
601 | ----------------- |
|
601 | ----------------- | |
602 |
|
602 | |||
603 | Filters for transforming files on checkout/checkin. This would |
|
603 | Filters for transforming files on checkout/checkin. This would | |
604 | typically be used for newline processing or other |
|
604 | typically be used for newline processing or other | |
605 | localization/canonicalization of files. |
|
605 | localization/canonicalization of files. | |
606 |
|
606 | |||
607 | Filters consist of a filter pattern followed by a filter command. |
|
607 | Filters consist of a filter pattern followed by a filter command. | |
608 | Filter patterns are globs by default, rooted at the repository root. |
|
608 | Filter patterns are globs by default, rooted at the repository root. | |
609 | For example, to match any file ending in ``.txt`` in the root |
|
609 | For example, to match any file ending in ``.txt`` in the root | |
610 | directory only, use the pattern ``*.txt``. To match any file ending |
|
610 | directory only, use the pattern ``*.txt``. To match any file ending | |
611 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
611 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. | |
612 | For each file only the first matching filter applies. |
|
612 | For each file only the first matching filter applies. | |
613 |
|
613 | |||
614 | The filter command can start with a specifier, either ``pipe:`` or |
|
614 | The filter command can start with a specifier, either ``pipe:`` or | |
615 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
615 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. | |
616 |
|
616 | |||
617 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
617 | A ``pipe:`` command must accept data on stdin and return the transformed | |
618 | data on stdout. |
|
618 | data on stdout. | |
619 |
|
619 | |||
620 | Pipe example:: |
|
620 | Pipe example:: | |
621 |
|
621 | |||
622 | [encode] |
|
622 | [encode] | |
623 | # uncompress gzip files on checkin to improve delta compression |
|
623 | # uncompress gzip files on checkin to improve delta compression | |
624 | # note: not necessarily a good idea, just an example |
|
624 | # note: not necessarily a good idea, just an example | |
625 | *.gz = pipe: gunzip |
|
625 | *.gz = pipe: gunzip | |
626 |
|
626 | |||
627 | [decode] |
|
627 | [decode] | |
628 | # recompress gzip files when writing them to the working dir (we |
|
628 | # recompress gzip files when writing them to the working dir (we | |
629 | # can safely omit "pipe:", because it's the default) |
|
629 | # can safely omit "pipe:", because it's the default) | |
630 | *.gz = gzip |
|
630 | *.gz = gzip | |
631 |
|
631 | |||
632 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
632 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced | |
633 | with the name of a temporary file that contains the data to be |
|
633 | with the name of a temporary file that contains the data to be | |
634 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
634 | filtered by the command. The string ``OUTFILE`` is replaced with the name | |
635 | of an empty temporary file, where the filtered data must be written by |
|
635 | of an empty temporary file, where the filtered data must be written by | |
636 | the command. |
|
636 | the command. | |
637 |
|
637 | |||
638 | .. container:: windows |
|
638 | .. container:: windows | |
639 |
|
639 | |||
640 | .. note:: |
|
640 | .. note:: | |
641 |
|
641 | |||
642 | The tempfile mechanism is recommended for Windows systems, |
|
642 | The tempfile mechanism is recommended for Windows systems, | |
643 | where the standard shell I/O redirection operators often have |
|
643 | where the standard shell I/O redirection operators often have | |
644 | strange effects and may corrupt the contents of your files. |
|
644 | strange effects and may corrupt the contents of your files. | |
645 |
|
645 | |||
646 | This filter mechanism is used internally by the ``eol`` extension to |
|
646 | This filter mechanism is used internally by the ``eol`` extension to | |
647 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
647 | translate line ending characters between Windows (CRLF) and Unix (LF) | |
648 | format. We suggest you use the ``eol`` extension for convenience. |
|
648 | format. We suggest you use the ``eol`` extension for convenience. | |
649 |
|
649 | |||
650 |
|
650 | |||
651 | ``defaults`` |
|
651 | ``defaults`` | |
652 | ------------ |
|
652 | ------------ | |
653 |
|
653 | |||
654 | (defaults are deprecated. Don't use them. Use aliases instead.) |
|
654 | (defaults are deprecated. Don't use them. Use aliases instead.) | |
655 |
|
655 | |||
656 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
656 | Use the ``[defaults]`` section to define command defaults, i.e. the | |
657 | default options/arguments to pass to the specified commands. |
|
657 | default options/arguments to pass to the specified commands. | |
658 |
|
658 | |||
659 | The following example makes :hg:`log` run in verbose mode, and |
|
659 | The following example makes :hg:`log` run in verbose mode, and | |
660 | :hg:`status` show only the modified files, by default:: |
|
660 | :hg:`status` show only the modified files, by default:: | |
661 |
|
661 | |||
662 | [defaults] |
|
662 | [defaults] | |
663 | log = -v |
|
663 | log = -v | |
664 | status = -m |
|
664 | status = -m | |
665 |
|
665 | |||
666 | The actual commands, instead of their aliases, must be used when |
|
666 | The actual commands, instead of their aliases, must be used when | |
667 | defining command defaults. The command defaults will also be applied |
|
667 | defining command defaults. The command defaults will also be applied | |
668 | to the aliases of the commands defined. |
|
668 | to the aliases of the commands defined. | |
669 |
|
669 | |||
670 |
|
670 | |||
671 | ``diff`` |
|
671 | ``diff`` | |
672 | -------- |
|
672 | -------- | |
673 |
|
673 | |||
674 | Settings used when displaying diffs. Everything except for ``unified`` |
|
674 | Settings used when displaying diffs. Everything except for ``unified`` | |
675 | is a Boolean and defaults to False. See :hg:`help config.annotate` |
|
675 | is a Boolean and defaults to False. See :hg:`help config.annotate` | |
676 | for related options for the annotate command. |
|
676 | for related options for the annotate command. | |
677 |
|
677 | |||
678 | ``git`` |
|
678 | ``git`` | |
679 | Use git extended diff format. |
|
679 | Use git extended diff format. | |
680 |
|
680 | |||
681 | ``nobinary`` |
|
681 | ``nobinary`` | |
682 | Omit git binary patches. |
|
682 | Omit git binary patches. | |
683 |
|
683 | |||
684 | ``nodates`` |
|
684 | ``nodates`` | |
685 | Don't include dates in diff headers. |
|
685 | Don't include dates in diff headers. | |
686 |
|
686 | |||
687 | ``noprefix`` |
|
687 | ``noprefix`` | |
688 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
688 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. | |
689 |
|
689 | |||
690 | ``showfunc`` |
|
690 | ``showfunc`` | |
691 | Show which function each change is in. |
|
691 | Show which function each change is in. | |
692 |
|
692 | |||
693 | ``ignorews`` |
|
693 | ``ignorews`` | |
694 | Ignore white space when comparing lines. |
|
694 | Ignore white space when comparing lines. | |
695 |
|
695 | |||
696 | ``ignorewsamount`` |
|
696 | ``ignorewsamount`` | |
697 | Ignore changes in the amount of white space. |
|
697 | Ignore changes in the amount of white space. | |
698 |
|
698 | |||
699 | ``ignoreblanklines`` |
|
699 | ``ignoreblanklines`` | |
700 | Ignore changes whose lines are all blank. |
|
700 | Ignore changes whose lines are all blank. | |
701 |
|
701 | |||
702 | ``unified`` |
|
702 | ``unified`` | |
703 | Number of lines of context to show. |
|
703 | Number of lines of context to show. | |
704 |
|
704 | |||
705 | ``word-diff`` |
|
705 | ``word-diff`` | |
706 | Highlight changed words. |
|
706 | Highlight changed words. | |
707 |
|
707 | |||
708 | ``email`` |
|
708 | ``email`` | |
709 | --------- |
|
709 | --------- | |
710 |
|
710 | |||
711 | Settings for extensions that send email messages. |
|
711 | Settings for extensions that send email messages. | |
712 |
|
712 | |||
713 | ``from`` |
|
713 | ``from`` | |
714 | Optional. Email address to use in "From" header and SMTP envelope |
|
714 | Optional. Email address to use in "From" header and SMTP envelope | |
715 | of outgoing messages. |
|
715 | of outgoing messages. | |
716 |
|
716 | |||
717 | ``to`` |
|
717 | ``to`` | |
718 | Optional. Comma-separated list of recipients' email addresses. |
|
718 | Optional. Comma-separated list of recipients' email addresses. | |
719 |
|
719 | |||
720 | ``cc`` |
|
720 | ``cc`` | |
721 | Optional. Comma-separated list of carbon copy recipients' |
|
721 | Optional. Comma-separated list of carbon copy recipients' | |
722 | email addresses. |
|
722 | email addresses. | |
723 |
|
723 | |||
724 | ``bcc`` |
|
724 | ``bcc`` | |
725 | Optional. Comma-separated list of blind carbon copy recipients' |
|
725 | Optional. Comma-separated list of blind carbon copy recipients' | |
726 | email addresses. |
|
726 | email addresses. | |
727 |
|
727 | |||
728 | ``method`` |
|
728 | ``method`` | |
729 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
729 | Optional. Method to use to send email messages. If value is ``smtp`` | |
730 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
730 | (default), use SMTP (see the ``[smtp]`` section for configuration). | |
731 | Otherwise, use as name of program to run that acts like sendmail |
|
731 | Otherwise, use as name of program to run that acts like sendmail | |
732 | (takes ``-f`` option for sender, list of recipients on command line, |
|
732 | (takes ``-f`` option for sender, list of recipients on command line, | |
733 | message on stdin). Normally, setting this to ``sendmail`` or |
|
733 | message on stdin). Normally, setting this to ``sendmail`` or | |
734 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
734 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. | |
735 |
|
735 | |||
736 | ``charsets`` |
|
736 | ``charsets`` | |
737 | Optional. Comma-separated list of character sets considered |
|
737 | Optional. Comma-separated list of character sets considered | |
738 | convenient for recipients. Addresses, headers, and parts not |
|
738 | convenient for recipients. Addresses, headers, and parts not | |
739 | containing patches of outgoing messages will be encoded in the |
|
739 | containing patches of outgoing messages will be encoded in the | |
740 | first character set to which conversion from local encoding |
|
740 | first character set to which conversion from local encoding | |
741 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
741 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct | |
742 | conversion fails, the text in question is sent as is. |
|
742 | conversion fails, the text in question is sent as is. | |
743 | (default: '') |
|
743 | (default: '') | |
744 |
|
744 | |||
745 | Order of outgoing email character sets: |
|
745 | Order of outgoing email character sets: | |
746 |
|
746 | |||
747 | 1. ``us-ascii``: always first, regardless of settings |
|
747 | 1. ``us-ascii``: always first, regardless of settings | |
748 | 2. ``email.charsets``: in order given by user |
|
748 | 2. ``email.charsets``: in order given by user | |
749 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
749 | 3. ``ui.fallbackencoding``: if not in email.charsets | |
750 | 4. ``$HGENCODING``: if not in email.charsets |
|
750 | 4. ``$HGENCODING``: if not in email.charsets | |
751 | 5. ``utf-8``: always last, regardless of settings |
|
751 | 5. ``utf-8``: always last, regardless of settings | |
752 |
|
752 | |||
753 | Email example:: |
|
753 | Email example:: | |
754 |
|
754 | |||
755 | [email] |
|
755 | [email] | |
756 | from = Joseph User <joe.user@example.com> |
|
756 | from = Joseph User <joe.user@example.com> | |
757 | method = /usr/sbin/sendmail |
|
757 | method = /usr/sbin/sendmail | |
758 | # charsets for western Europeans |
|
758 | # charsets for western Europeans | |
759 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
759 | # us-ascii, utf-8 omitted, as they are tried first and last | |
760 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
760 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
761 |
|
761 | |||
762 |
|
762 | |||
763 | ``extensions`` |
|
763 | ``extensions`` | |
764 | -------------- |
|
764 | -------------- | |
765 |
|
765 | |||
766 | Mercurial has an extension mechanism for adding new features. To |
|
766 | Mercurial has an extension mechanism for adding new features. To | |
767 | enable an extension, create an entry for it in this section. |
|
767 | enable an extension, create an entry for it in this section. | |
768 |
|
768 | |||
769 | If you know that the extension is already in Python's search path, |
|
769 | If you know that the extension is already in Python's search path, | |
770 | you can give the name of the module, followed by ``=``, with nothing |
|
770 | you can give the name of the module, followed by ``=``, with nothing | |
771 | after the ``=``. |
|
771 | after the ``=``. | |
772 |
|
772 | |||
773 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
773 | Otherwise, give a name that you choose, followed by ``=``, followed by | |
774 | the path to the ``.py`` file (including the file name extension) that |
|
774 | the path to the ``.py`` file (including the file name extension) that | |
775 | defines the extension. |
|
775 | defines the extension. | |
776 |
|
776 | |||
777 | To explicitly disable an extension that is enabled in an hgrc of |
|
777 | To explicitly disable an extension that is enabled in an hgrc of | |
778 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
778 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` | |
779 | or ``foo = !`` when path is not supplied. |
|
779 | or ``foo = !`` when path is not supplied. | |
780 |
|
780 | |||
781 | Example for ``~/.hgrc``:: |
|
781 | Example for ``~/.hgrc``:: | |
782 |
|
782 | |||
783 | [extensions] |
|
783 | [extensions] | |
784 | # (the churn extension will get loaded from Mercurial's path) |
|
784 | # (the churn extension will get loaded from Mercurial's path) | |
785 | churn = |
|
785 | churn = | |
786 | # (this extension will get loaded from the file specified) |
|
786 | # (this extension will get loaded from the file specified) | |
787 | myfeature = ~/.hgext/myfeature.py |
|
787 | myfeature = ~/.hgext/myfeature.py | |
788 |
|
788 | |||
789 |
|
789 | |||
790 | ``format`` |
|
790 | ``format`` | |
791 | ---------- |
|
791 | ---------- | |
792 |
|
792 | |||
793 | ``usegeneraldelta`` |
|
793 | ``usegeneraldelta`` | |
794 | Enable or disable the "generaldelta" repository format which improves |
|
794 | Enable or disable the "generaldelta" repository format which improves | |
795 | repository compression by allowing "revlog" to store delta against arbitrary |
|
795 | repository compression by allowing "revlog" to store delta against arbitrary | |
796 | revision instead of the previous stored one. This provides significant |
|
796 | revision instead of the previous stored one. This provides significant | |
797 | improvement for repositories with branches. |
|
797 | improvement for repositories with branches. | |
798 |
|
798 | |||
799 | Repositories with this on-disk format require Mercurial version 1.9. |
|
799 | Repositories with this on-disk format require Mercurial version 1.9. | |
800 |
|
800 | |||
801 | Enabled by default. |
|
801 | Enabled by default. | |
802 |
|
802 | |||
803 | ``dotencode`` |
|
803 | ``dotencode`` | |
804 | Enable or disable the "dotencode" repository format which enhances |
|
804 | Enable or disable the "dotencode" repository format which enhances | |
805 | the "fncache" repository format (which has to be enabled to use |
|
805 | the "fncache" repository format (which has to be enabled to use | |
806 | dotencode) to avoid issues with filenames starting with ._ on |
|
806 | dotencode) to avoid issues with filenames starting with ._ on | |
807 | Mac OS X and spaces on Windows. |
|
807 | Mac OS X and spaces on Windows. | |
808 |
|
808 | |||
809 | Repositories with this on-disk format require Mercurial version 1.7. |
|
809 | Repositories with this on-disk format require Mercurial version 1.7. | |
810 |
|
810 | |||
811 | Enabled by default. |
|
811 | Enabled by default. | |
812 |
|
812 | |||
813 | ``usefncache`` |
|
813 | ``usefncache`` | |
814 | Enable or disable the "fncache" repository format which enhances |
|
814 | Enable or disable the "fncache" repository format which enhances | |
815 | the "store" repository format (which has to be enabled to use |
|
815 | the "store" repository format (which has to be enabled to use | |
816 | fncache) to allow longer filenames and avoids using Windows |
|
816 | fncache) to allow longer filenames and avoids using Windows | |
817 | reserved names, e.g. "nul". |
|
817 | reserved names, e.g. "nul". | |
818 |
|
818 | |||
819 | Repositories with this on-disk format require Mercurial version 1.1. |
|
819 | Repositories with this on-disk format require Mercurial version 1.1. | |
820 |
|
820 | |||
821 | Enabled by default. |
|
821 | Enabled by default. | |
822 |
|
822 | |||
823 | ``usestore`` |
|
823 | ``usestore`` | |
824 | Enable or disable the "store" repository format which improves |
|
824 | Enable or disable the "store" repository format which improves | |
825 | compatibility with systems that fold case or otherwise mangle |
|
825 | compatibility with systems that fold case or otherwise mangle | |
826 | filenames. Disabling this option will allow you to store longer filenames |
|
826 | filenames. Disabling this option will allow you to store longer filenames | |
827 | in some situations at the expense of compatibility. |
|
827 | in some situations at the expense of compatibility. | |
828 |
|
828 | |||
829 | Repositories with this on-disk format require Mercurial version 0.9.4. |
|
829 | Repositories with this on-disk format require Mercurial version 0.9.4. | |
830 |
|
830 | |||
831 | Enabled by default. |
|
831 | Enabled by default. | |
832 |
|
832 | |||
833 | ``graph`` |
|
833 | ``graph`` | |
834 | --------- |
|
834 | --------- | |
835 |
|
835 | |||
836 | Web graph view configuration. This section let you change graph |
|
836 | Web graph view configuration. This section let you change graph | |
837 | elements display properties by branches, for instance to make the |
|
837 | elements display properties by branches, for instance to make the | |
838 | ``default`` branch stand out. |
|
838 | ``default`` branch stand out. | |
839 |
|
839 | |||
840 | Each line has the following format:: |
|
840 | Each line has the following format:: | |
841 |
|
841 | |||
842 | <branch>.<argument> = <value> |
|
842 | <branch>.<argument> = <value> | |
843 |
|
843 | |||
844 | where ``<branch>`` is the name of the branch being |
|
844 | where ``<branch>`` is the name of the branch being | |
845 | customized. Example:: |
|
845 | customized. Example:: | |
846 |
|
846 | |||
847 | [graph] |
|
847 | [graph] | |
848 | # 2px width |
|
848 | # 2px width | |
849 | default.width = 2 |
|
849 | default.width = 2 | |
850 | # red color |
|
850 | # red color | |
851 | default.color = FF0000 |
|
851 | default.color = FF0000 | |
852 |
|
852 | |||
853 | Supported arguments: |
|
853 | Supported arguments: | |
854 |
|
854 | |||
855 | ``width`` |
|
855 | ``width`` | |
856 | Set branch edges width in pixels. |
|
856 | Set branch edges width in pixels. | |
857 |
|
857 | |||
858 | ``color`` |
|
858 | ``color`` | |
859 | Set branch edges color in hexadecimal RGB notation. |
|
859 | Set branch edges color in hexadecimal RGB notation. | |
860 |
|
860 | |||
861 | ``hooks`` |
|
861 | ``hooks`` | |
862 | --------- |
|
862 | --------- | |
863 |
|
863 | |||
864 | Commands or Python functions that get automatically executed by |
|
864 | Commands or Python functions that get automatically executed by | |
865 | various actions such as starting or finishing a commit. Multiple |
|
865 | various actions such as starting or finishing a commit. Multiple | |
866 | hooks can be run for the same action by appending a suffix to the |
|
866 | hooks can be run for the same action by appending a suffix to the | |
867 | action. Overriding a site-wide hook can be done by changing its |
|
867 | action. Overriding a site-wide hook can be done by changing its | |
868 | value or setting it to an empty string. Hooks can be prioritized |
|
868 | value or setting it to an empty string. Hooks can be prioritized | |
869 | by adding a prefix of ``priority.`` to the hook name on a new line |
|
869 | by adding a prefix of ``priority.`` to the hook name on a new line | |
870 | and setting the priority. The default priority is 0. |
|
870 | and setting the priority. The default priority is 0. | |
871 |
|
871 | |||
872 | Example ``.hg/hgrc``:: |
|
872 | Example ``.hg/hgrc``:: | |
873 |
|
873 | |||
874 | [hooks] |
|
874 | [hooks] | |
875 | # update working directory after adding changesets |
|
875 | # update working directory after adding changesets | |
876 | changegroup.update = hg update |
|
876 | changegroup.update = hg update | |
877 | # do not use the site-wide hook |
|
877 | # do not use the site-wide hook | |
878 | incoming = |
|
878 | incoming = | |
879 | incoming.email = /my/email/hook |
|
879 | incoming.email = /my/email/hook | |
880 | incoming.autobuild = /my/build/hook |
|
880 | incoming.autobuild = /my/build/hook | |
881 | # force autobuild hook to run before other incoming hooks |
|
881 | # force autobuild hook to run before other incoming hooks | |
882 | priority.incoming.autobuild = 1 |
|
882 | priority.incoming.autobuild = 1 | |
883 |
|
883 | |||
884 | Most hooks are run with environment variables set that give useful |
|
884 | Most hooks are run with environment variables set that give useful | |
885 | additional information. For each hook below, the environment variables |
|
885 | additional information. For each hook below, the environment variables | |
886 | it is passed are listed with names in the form ``$HG_foo``. The |
|
886 | it is passed are listed with names in the form ``$HG_foo``. The | |
887 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. |
|
887 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. | |
888 | They contain the type of hook which triggered the run and the full name |
|
888 | They contain the type of hook which triggered the run and the full name | |
889 | of the hook in the config, respectively. In the example above, this will |
|
889 | of the hook in the config, respectively. In the example above, this will | |
890 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. |
|
890 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. | |
891 |
|
891 | |||
892 | .. container:: windows |
|
892 | .. container:: windows | |
893 |
|
893 | |||
894 | Some basic Unix syntax is supported for portability, including ``$VAR`` |
|
894 | Some basic Unix syntax is supported for portability, including ``$VAR`` | |
895 | and ``${VAR}`` style variables. To use a literal ``$``, it must be |
|
895 | and ``${VAR}`` style variables. To use a literal ``$``, it must be | |
896 | escaped with a back slash or inside of a strong quote. |
|
896 | escaped with a back slash or inside of a strong quote. This can be | |
|
897 | disabled by adding a prefix of ``tonative.`` to the hook name on a new | |||
|
898 | line, and setting it to ``False``. For example:: | |||
|
899 | ||||
|
900 | [hooks] | |||
|
901 | incoming.autobuild = /my/build/hook | |||
|
902 | # disable translation to cmd.exe syntax for autobuild hook | |||
|
903 | tonative.incoming.autobuild = False | |||
897 |
|
904 | |||
898 | ``changegroup`` |
|
905 | ``changegroup`` | |
899 | Run after a changegroup has been added via push, pull or unbundle. The ID of |
|
906 | Run after a changegroup has been added via push, pull or unbundle. The ID of | |
900 | the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``. |
|
907 | the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``. | |
901 | The URL from which changes came is in ``$HG_URL``. |
|
908 | The URL from which changes came is in ``$HG_URL``. | |
902 |
|
909 | |||
903 | ``commit`` |
|
910 | ``commit`` | |
904 | Run after a changeset has been created in the local repository. The ID |
|
911 | Run after a changeset has been created in the local repository. The ID | |
905 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
912 | of the newly created changeset is in ``$HG_NODE``. Parent changeset | |
906 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
913 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
907 |
|
914 | |||
908 | ``incoming`` |
|
915 | ``incoming`` | |
909 | Run after a changeset has been pulled, pushed, or unbundled into |
|
916 | Run after a changeset has been pulled, pushed, or unbundled into | |
910 | the local repository. The ID of the newly arrived changeset is in |
|
917 | the local repository. The ID of the newly arrived changeset is in | |
911 | ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``. |
|
918 | ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``. | |
912 |
|
919 | |||
913 | ``outgoing`` |
|
920 | ``outgoing`` | |
914 | Run after sending changes from the local repository to another. The ID of |
|
921 | Run after sending changes from the local repository to another. The ID of | |
915 | first changeset sent is in ``$HG_NODE``. The source of operation is in |
|
922 | first changeset sent is in ``$HG_NODE``. The source of operation is in | |
916 | ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`. |
|
923 | ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`. | |
917 |
|
924 | |||
918 | ``post-<command>`` |
|
925 | ``post-<command>`` | |
919 | Run after successful invocations of the associated command. The |
|
926 | Run after successful invocations of the associated command. The | |
920 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
927 | contents of the command line are passed as ``$HG_ARGS`` and the result | |
921 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
928 | code in ``$HG_RESULT``. Parsed command line arguments are passed as | |
922 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
929 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of | |
923 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
930 | the python data internally passed to <command>. ``$HG_OPTS`` is a | |
924 | dictionary of options (with unspecified options set to their defaults). |
|
931 | dictionary of options (with unspecified options set to their defaults). | |
925 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
932 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. | |
926 |
|
933 | |||
927 | ``fail-<command>`` |
|
934 | ``fail-<command>`` | |
928 | Run after a failed invocation of an associated command. The contents |
|
935 | Run after a failed invocation of an associated command. The contents | |
929 | of the command line are passed as ``$HG_ARGS``. Parsed command line |
|
936 | of the command line are passed as ``$HG_ARGS``. Parsed command line | |
930 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain |
|
937 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain | |
931 | string representations of the python data internally passed to |
|
938 | string representations of the python data internally passed to | |
932 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified |
|
939 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified | |
933 | options set to their defaults). ``$HG_PATS`` is a list of arguments. |
|
940 | options set to their defaults). ``$HG_PATS`` is a list of arguments. | |
934 | Hook failure is ignored. |
|
941 | Hook failure is ignored. | |
935 |
|
942 | |||
936 | ``pre-<command>`` |
|
943 | ``pre-<command>`` | |
937 | Run before executing the associated command. The contents of the |
|
944 | Run before executing the associated command. The contents of the | |
938 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
945 | command line are passed as ``$HG_ARGS``. Parsed command line arguments | |
939 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
946 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string | |
940 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
947 | representations of the data internally passed to <command>. ``$HG_OPTS`` | |
941 | is a dictionary of options (with unspecified options set to their |
|
948 | is a dictionary of options (with unspecified options set to their | |
942 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
949 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns | |
943 | failure, the command doesn't execute and Mercurial returns the failure |
|
950 | failure, the command doesn't execute and Mercurial returns the failure | |
944 | code. |
|
951 | code. | |
945 |
|
952 | |||
946 | ``prechangegroup`` |
|
953 | ``prechangegroup`` | |
947 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
954 | Run before a changegroup is added via push, pull or unbundle. Exit | |
948 | status 0 allows the changegroup to proceed. A non-zero status will |
|
955 | status 0 allows the changegroup to proceed. A non-zero status will | |
949 | cause the push, pull or unbundle to fail. The URL from which changes |
|
956 | cause the push, pull or unbundle to fail. The URL from which changes | |
950 | will come is in ``$HG_URL``. |
|
957 | will come is in ``$HG_URL``. | |
951 |
|
958 | |||
952 | ``precommit`` |
|
959 | ``precommit`` | |
953 | Run before starting a local commit. Exit status 0 allows the |
|
960 | Run before starting a local commit. Exit status 0 allows the | |
954 | commit to proceed. A non-zero status will cause the commit to fail. |
|
961 | commit to proceed. A non-zero status will cause the commit to fail. | |
955 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
962 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
956 |
|
963 | |||
957 | ``prelistkeys`` |
|
964 | ``prelistkeys`` | |
958 | Run before listing pushkeys (like bookmarks) in the |
|
965 | Run before listing pushkeys (like bookmarks) in the | |
959 | repository. A non-zero status will cause failure. The key namespace is |
|
966 | repository. A non-zero status will cause failure. The key namespace is | |
960 | in ``$HG_NAMESPACE``. |
|
967 | in ``$HG_NAMESPACE``. | |
961 |
|
968 | |||
962 | ``preoutgoing`` |
|
969 | ``preoutgoing`` | |
963 | Run before collecting changes to send from the local repository to |
|
970 | Run before collecting changes to send from the local repository to | |
964 | another. A non-zero status will cause failure. This lets you prevent |
|
971 | another. A non-zero status will cause failure. This lets you prevent | |
965 | pull over HTTP or SSH. It can also prevent propagating commits (via |
|
972 | pull over HTTP or SSH. It can also prevent propagating commits (via | |
966 | local pull, push (outbound) or bundle commands), but not completely, |
|
973 | local pull, push (outbound) or bundle commands), but not completely, | |
967 | since you can just copy files instead. The source of operation is in |
|
974 | since you can just copy files instead. The source of operation is in | |
968 | ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote |
|
975 | ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote | |
969 | SSH or HTTP repository. If "push", "pull" or "bundle", the operation |
|
976 | SSH or HTTP repository. If "push", "pull" or "bundle", the operation | |
970 | is happening on behalf of a repository on same system. |
|
977 | is happening on behalf of a repository on same system. | |
971 |
|
978 | |||
972 | ``prepushkey`` |
|
979 | ``prepushkey`` | |
973 | Run before a pushkey (like a bookmark) is added to the |
|
980 | Run before a pushkey (like a bookmark) is added to the | |
974 | repository. A non-zero status will cause the key to be rejected. The |
|
981 | repository. A non-zero status will cause the key to be rejected. The | |
975 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
982 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, | |
976 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
983 | the old value (if any) is in ``$HG_OLD``, and the new value is in | |
977 | ``$HG_NEW``. |
|
984 | ``$HG_NEW``. | |
978 |
|
985 | |||
979 | ``pretag`` |
|
986 | ``pretag`` | |
980 | Run before creating a tag. Exit status 0 allows the tag to be |
|
987 | Run before creating a tag. Exit status 0 allows the tag to be | |
981 | created. A non-zero status will cause the tag to fail. The ID of the |
|
988 | created. A non-zero status will cause the tag to fail. The ID of the | |
982 | changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The |
|
989 | changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The | |
983 | tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``. |
|
990 | tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``. | |
984 |
|
991 | |||
985 | ``pretxnopen`` |
|
992 | ``pretxnopen`` | |
986 | Run before any new repository transaction is open. The reason for the |
|
993 | Run before any new repository transaction is open. The reason for the | |
987 | transaction will be in ``$HG_TXNNAME``, and a unique identifier for the |
|
994 | transaction will be in ``$HG_TXNNAME``, and a unique identifier for the | |
988 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
995 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the | |
989 | transaction from being opened. |
|
996 | transaction from being opened. | |
990 |
|
997 | |||
991 | ``pretxnclose`` |
|
998 | ``pretxnclose`` | |
992 | Run right before the transaction is actually finalized. Any repository change |
|
999 | Run right before the transaction is actually finalized. Any repository change | |
993 | will be visible to the hook program. This lets you validate the transaction |
|
1000 | will be visible to the hook program. This lets you validate the transaction | |
994 | content or change it. Exit status 0 allows the commit to proceed. A non-zero |
|
1001 | content or change it. Exit status 0 allows the commit to proceed. A non-zero | |
995 | status will cause the transaction to be rolled back. The reason for the |
|
1002 | status will cause the transaction to be rolled back. The reason for the | |
996 | transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for |
|
1003 | transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for | |
997 | the transaction will be in ``HG_TXNID``. The rest of the available data will |
|
1004 | the transaction will be in ``HG_TXNID``. The rest of the available data will | |
998 | vary according the transaction type. New changesets will add ``$HG_NODE`` |
|
1005 | vary according the transaction type. New changesets will add ``$HG_NODE`` | |
999 | (the ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last |
|
1006 | (the ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last | |
1000 | added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables. Bookmark and |
|
1007 | added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables. Bookmark and | |
1001 | phase changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1`` |
|
1008 | phase changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1`` | |
1002 | respectively, etc. |
|
1009 | respectively, etc. | |
1003 |
|
1010 | |||
1004 | ``pretxnclose-bookmark`` |
|
1011 | ``pretxnclose-bookmark`` | |
1005 | Run right before a bookmark change is actually finalized. Any repository |
|
1012 | Run right before a bookmark change is actually finalized. Any repository | |
1006 | change will be visible to the hook program. This lets you validate the |
|
1013 | change will be visible to the hook program. This lets you validate the | |
1007 | transaction content or change it. Exit status 0 allows the commit to |
|
1014 | transaction content or change it. Exit status 0 allows the commit to | |
1008 | proceed. A non-zero status will cause the transaction to be rolled back. |
|
1015 | proceed. A non-zero status will cause the transaction to be rolled back. | |
1009 | The name of the bookmark will be available in ``$HG_BOOKMARK``, the new |
|
1016 | The name of the bookmark will be available in ``$HG_BOOKMARK``, the new | |
1010 | bookmark location will be available in ``$HG_NODE`` while the previous |
|
1017 | bookmark location will be available in ``$HG_NODE`` while the previous | |
1011 | location will be available in ``$HG_OLDNODE``. In case of a bookmark |
|
1018 | location will be available in ``$HG_OLDNODE``. In case of a bookmark | |
1012 | creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE`` |
|
1019 | creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE`` | |
1013 | will be empty. |
|
1020 | will be empty. | |
1014 | In addition, the reason for the transaction opening will be in |
|
1021 | In addition, the reason for the transaction opening will be in | |
1015 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in |
|
1022 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in | |
1016 | ``HG_TXNID``. |
|
1023 | ``HG_TXNID``. | |
1017 |
|
1024 | |||
1018 | ``pretxnclose-phase`` |
|
1025 | ``pretxnclose-phase`` | |
1019 | Run right before a phase change is actually finalized. Any repository change |
|
1026 | Run right before a phase change is actually finalized. Any repository change | |
1020 | will be visible to the hook program. This lets you validate the transaction |
|
1027 | will be visible to the hook program. This lets you validate the transaction | |
1021 | content or change it. Exit status 0 allows the commit to proceed. A non-zero |
|
1028 | content or change it. Exit status 0 allows the commit to proceed. A non-zero | |
1022 | status will cause the transaction to be rolled back. The hook is called |
|
1029 | status will cause the transaction to be rolled back. The hook is called | |
1023 | multiple times, once for each revision affected by a phase change. |
|
1030 | multiple times, once for each revision affected by a phase change. | |
1024 | The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE`` |
|
1031 | The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE`` | |
1025 | while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE`` |
|
1032 | while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE`` | |
1026 | will be empty. In addition, the reason for the transaction opening will be in |
|
1033 | will be empty. In addition, the reason for the transaction opening will be in | |
1027 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in |
|
1034 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in | |
1028 | ``HG_TXNID``. The hook is also run for newly added revisions. In this case |
|
1035 | ``HG_TXNID``. The hook is also run for newly added revisions. In this case | |
1029 | the ``$HG_OLDPHASE`` entry will be empty. |
|
1036 | the ``$HG_OLDPHASE`` entry will be empty. | |
1030 |
|
1037 | |||
1031 | ``txnclose`` |
|
1038 | ``txnclose`` | |
1032 | Run after any repository transaction has been committed. At this |
|
1039 | Run after any repository transaction has been committed. At this | |
1033 | point, the transaction can no longer be rolled back. The hook will run |
|
1040 | point, the transaction can no longer be rolled back. The hook will run | |
1034 | after the lock is released. See :hg:`help config.hooks.pretxnclose` for |
|
1041 | after the lock is released. See :hg:`help config.hooks.pretxnclose` for | |
1035 | details about available variables. |
|
1042 | details about available variables. | |
1036 |
|
1043 | |||
1037 | ``txnclose-bookmark`` |
|
1044 | ``txnclose-bookmark`` | |
1038 | Run after any bookmark change has been committed. At this point, the |
|
1045 | Run after any bookmark change has been committed. At this point, the | |
1039 | transaction can no longer be rolled back. The hook will run after the lock |
|
1046 | transaction can no longer be rolled back. The hook will run after the lock | |
1040 | is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details |
|
1047 | is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details | |
1041 | about available variables. |
|
1048 | about available variables. | |
1042 |
|
1049 | |||
1043 | ``txnclose-phase`` |
|
1050 | ``txnclose-phase`` | |
1044 | Run after any phase change has been committed. At this point, the |
|
1051 | Run after any phase change has been committed. At this point, the | |
1045 | transaction can no longer be rolled back. The hook will run after the lock |
|
1052 | transaction can no longer be rolled back. The hook will run after the lock | |
1046 | is released. See :hg:`help config.hooks.pretxnclose-phase` for details about |
|
1053 | is released. See :hg:`help config.hooks.pretxnclose-phase` for details about | |
1047 | available variables. |
|
1054 | available variables. | |
1048 |
|
1055 | |||
1049 | ``txnabort`` |
|
1056 | ``txnabort`` | |
1050 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` |
|
1057 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` | |
1051 | for details about available variables. |
|
1058 | for details about available variables. | |
1052 |
|
1059 | |||
1053 | ``pretxnchangegroup`` |
|
1060 | ``pretxnchangegroup`` | |
1054 | Run after a changegroup has been added via push, pull or unbundle, but before |
|
1061 | Run after a changegroup has been added via push, pull or unbundle, but before | |
1055 | the transaction has been committed. The changegroup is visible to the hook |
|
1062 | the transaction has been committed. The changegroup is visible to the hook | |
1056 | program. This allows validation of incoming changes before accepting them. |
|
1063 | program. This allows validation of incoming changes before accepting them. | |
1057 | The ID of the first new changeset is in ``$HG_NODE`` and last is in |
|
1064 | The ID of the first new changeset is in ``$HG_NODE`` and last is in | |
1058 | ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero |
|
1065 | ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero | |
1059 | status will cause the transaction to be rolled back, and the push, pull or |
|
1066 | status will cause the transaction to be rolled back, and the push, pull or | |
1060 | unbundle will fail. The URL that was the source of changes is in ``$HG_URL``. |
|
1067 | unbundle will fail. The URL that was the source of changes is in ``$HG_URL``. | |
1061 |
|
1068 | |||
1062 | ``pretxncommit`` |
|
1069 | ``pretxncommit`` | |
1063 | Run after a changeset has been created, but before the transaction is |
|
1070 | Run after a changeset has been created, but before the transaction is | |
1064 | committed. The changeset is visible to the hook program. This allows |
|
1071 | committed. The changeset is visible to the hook program. This allows | |
1065 | validation of the commit message and changes. Exit status 0 allows the |
|
1072 | validation of the commit message and changes. Exit status 0 allows the | |
1066 | commit to proceed. A non-zero status will cause the transaction to |
|
1073 | commit to proceed. A non-zero status will cause the transaction to | |
1067 | be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent |
|
1074 | be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent | |
1068 | changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1075 | changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
1069 |
|
1076 | |||
1070 | ``preupdate`` |
|
1077 | ``preupdate`` | |
1071 | Run before updating the working directory. Exit status 0 allows |
|
1078 | Run before updating the working directory. Exit status 0 allows | |
1072 | the update to proceed. A non-zero status will prevent the update. |
|
1079 | the update to proceed. A non-zero status will prevent the update. | |
1073 | The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a |
|
1080 | The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a | |
1074 | merge, the ID of second new parent is in ``$HG_PARENT2``. |
|
1081 | merge, the ID of second new parent is in ``$HG_PARENT2``. | |
1075 |
|
1082 | |||
1076 | ``listkeys`` |
|
1083 | ``listkeys`` | |
1077 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
1084 | Run after listing pushkeys (like bookmarks) in the repository. The | |
1078 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
1085 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a | |
1079 | dictionary containing the keys and values. |
|
1086 | dictionary containing the keys and values. | |
1080 |
|
1087 | |||
1081 | ``pushkey`` |
|
1088 | ``pushkey`` | |
1082 | Run after a pushkey (like a bookmark) is added to the |
|
1089 | Run after a pushkey (like a bookmark) is added to the | |
1083 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
1090 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in | |
1084 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
1091 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new | |
1085 | value is in ``$HG_NEW``. |
|
1092 | value is in ``$HG_NEW``. | |
1086 |
|
1093 | |||
1087 | ``tag`` |
|
1094 | ``tag`` | |
1088 | Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``. |
|
1095 | Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``. | |
1089 | The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in |
|
1096 | The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in | |
1090 | the repository if ``$HG_LOCAL=0``. |
|
1097 | the repository if ``$HG_LOCAL=0``. | |
1091 |
|
1098 | |||
1092 | ``update`` |
|
1099 | ``update`` | |
1093 | Run after updating the working directory. The changeset ID of first |
|
1100 | Run after updating the working directory. The changeset ID of first | |
1094 | new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new |
|
1101 | new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new | |
1095 | parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
1102 | parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the | |
1096 | update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``. |
|
1103 | update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``. | |
1097 |
|
1104 | |||
1098 | .. note:: |
|
1105 | .. note:: | |
1099 |
|
1106 | |||
1100 | It is generally better to use standard hooks rather than the |
|
1107 | It is generally better to use standard hooks rather than the | |
1101 | generic pre- and post- command hooks, as they are guaranteed to be |
|
1108 | generic pre- and post- command hooks, as they are guaranteed to be | |
1102 | called in the appropriate contexts for influencing transactions. |
|
1109 | called in the appropriate contexts for influencing transactions. | |
1103 | Also, hooks like "commit" will be called in all contexts that |
|
1110 | Also, hooks like "commit" will be called in all contexts that | |
1104 | generate a commit (e.g. tag) and not just the commit command. |
|
1111 | generate a commit (e.g. tag) and not just the commit command. | |
1105 |
|
1112 | |||
1106 | .. note:: |
|
1113 | .. note:: | |
1107 |
|
1114 | |||
1108 | Environment variables with empty values may not be passed to |
|
1115 | Environment variables with empty values may not be passed to | |
1109 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
1116 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` | |
1110 | will have an empty value under Unix-like platforms for non-merge |
|
1117 | will have an empty value under Unix-like platforms for non-merge | |
1111 | changesets, while it will not be available at all under Windows. |
|
1118 | changesets, while it will not be available at all under Windows. | |
1112 |
|
1119 | |||
1113 | The syntax for Python hooks is as follows:: |
|
1120 | The syntax for Python hooks is as follows:: | |
1114 |
|
1121 | |||
1115 | hookname = python:modulename.submodule.callable |
|
1122 | hookname = python:modulename.submodule.callable | |
1116 | hookname = python:/path/to/python/module.py:callable |
|
1123 | hookname = python:/path/to/python/module.py:callable | |
1117 |
|
1124 | |||
1118 | Python hooks are run within the Mercurial process. Each hook is |
|
1125 | Python hooks are run within the Mercurial process. Each hook is | |
1119 | called with at least three keyword arguments: a ui object (keyword |
|
1126 | called with at least three keyword arguments: a ui object (keyword | |
1120 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
1127 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` | |
1121 | keyword that tells what kind of hook is used. Arguments listed as |
|
1128 | keyword that tells what kind of hook is used. Arguments listed as | |
1122 | environment variables above are passed as keyword arguments, with no |
|
1129 | environment variables above are passed as keyword arguments, with no | |
1123 | ``HG_`` prefix, and names in lower case. |
|
1130 | ``HG_`` prefix, and names in lower case. | |
1124 |
|
1131 | |||
1125 | If a Python hook returns a "true" value or raises an exception, this |
|
1132 | If a Python hook returns a "true" value or raises an exception, this | |
1126 | is treated as a failure. |
|
1133 | is treated as a failure. | |
1127 |
|
1134 | |||
1128 |
|
1135 | |||
1129 | ``hostfingerprints`` |
|
1136 | ``hostfingerprints`` | |
1130 | -------------------- |
|
1137 | -------------------- | |
1131 |
|
1138 | |||
1132 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) |
|
1139 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) | |
1133 |
|
1140 | |||
1134 | Fingerprints of the certificates of known HTTPS servers. |
|
1141 | Fingerprints of the certificates of known HTTPS servers. | |
1135 |
|
1142 | |||
1136 | A HTTPS connection to a server with a fingerprint configured here will |
|
1143 | A HTTPS connection to a server with a fingerprint configured here will | |
1137 | only succeed if the servers certificate matches the fingerprint. |
|
1144 | only succeed if the servers certificate matches the fingerprint. | |
1138 | This is very similar to how ssh known hosts works. |
|
1145 | This is very similar to how ssh known hosts works. | |
1139 |
|
1146 | |||
1140 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
1147 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. | |
1141 | Multiple values can be specified (separated by spaces or commas). This can |
|
1148 | Multiple values can be specified (separated by spaces or commas). This can | |
1142 | be used to define both old and new fingerprints while a host transitions |
|
1149 | be used to define both old and new fingerprints while a host transitions | |
1143 | to a new certificate. |
|
1150 | to a new certificate. | |
1144 |
|
1151 | |||
1145 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
1152 | The CA chain and web.cacerts is not used for servers with a fingerprint. | |
1146 |
|
1153 | |||
1147 | For example:: |
|
1154 | For example:: | |
1148 |
|
1155 | |||
1149 | [hostfingerprints] |
|
1156 | [hostfingerprints] | |
1150 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1157 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1151 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1158 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1152 |
|
1159 | |||
1153 | ``hostsecurity`` |
|
1160 | ``hostsecurity`` | |
1154 | ---------------- |
|
1161 | ---------------- | |
1155 |
|
1162 | |||
1156 | Used to specify global and per-host security settings for connecting to |
|
1163 | Used to specify global and per-host security settings for connecting to | |
1157 | other machines. |
|
1164 | other machines. | |
1158 |
|
1165 | |||
1159 | The following options control default behavior for all hosts. |
|
1166 | The following options control default behavior for all hosts. | |
1160 |
|
1167 | |||
1161 | ``ciphers`` |
|
1168 | ``ciphers`` | |
1162 | Defines the cryptographic ciphers to use for connections. |
|
1169 | Defines the cryptographic ciphers to use for connections. | |
1163 |
|
1170 | |||
1164 | Value must be a valid OpenSSL Cipher List Format as documented at |
|
1171 | Value must be a valid OpenSSL Cipher List Format as documented at | |
1165 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. |
|
1172 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. | |
1166 |
|
1173 | |||
1167 | This setting is for advanced users only. Setting to incorrect values |
|
1174 | This setting is for advanced users only. Setting to incorrect values | |
1168 | can significantly lower connection security or decrease performance. |
|
1175 | can significantly lower connection security or decrease performance. | |
1169 | You have been warned. |
|
1176 | You have been warned. | |
1170 |
|
1177 | |||
1171 | This option requires Python 2.7. |
|
1178 | This option requires Python 2.7. | |
1172 |
|
1179 | |||
1173 | ``minimumprotocol`` |
|
1180 | ``minimumprotocol`` | |
1174 | Defines the minimum channel encryption protocol to use. |
|
1181 | Defines the minimum channel encryption protocol to use. | |
1175 |
|
1182 | |||
1176 | By default, the highest version of TLS supported by both client and server |
|
1183 | By default, the highest version of TLS supported by both client and server | |
1177 | is used. |
|
1184 | is used. | |
1178 |
|
1185 | |||
1179 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. |
|
1186 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. | |
1180 |
|
1187 | |||
1181 | When running on an old Python version, only ``tls1.0`` is allowed since |
|
1188 | When running on an old Python version, only ``tls1.0`` is allowed since | |
1182 | old versions of Python only support up to TLS 1.0. |
|
1189 | old versions of Python only support up to TLS 1.0. | |
1183 |
|
1190 | |||
1184 | When running a Python that supports modern TLS versions, the default is |
|
1191 | When running a Python that supports modern TLS versions, the default is | |
1185 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this |
|
1192 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this | |
1186 | weakens security and should only be used as a feature of last resort if |
|
1193 | weakens security and should only be used as a feature of last resort if | |
1187 | a server does not support TLS 1.1+. |
|
1194 | a server does not support TLS 1.1+. | |
1188 |
|
1195 | |||
1189 | Options in the ``[hostsecurity]`` section can have the form |
|
1196 | Options in the ``[hostsecurity]`` section can have the form | |
1190 | ``hostname``:``setting``. This allows multiple settings to be defined on a |
|
1197 | ``hostname``:``setting``. This allows multiple settings to be defined on a | |
1191 | per-host basis. |
|
1198 | per-host basis. | |
1192 |
|
1199 | |||
1193 | The following per-host settings can be defined. |
|
1200 | The following per-host settings can be defined. | |
1194 |
|
1201 | |||
1195 | ``ciphers`` |
|
1202 | ``ciphers`` | |
1196 | This behaves like ``ciphers`` as described above except it only applies |
|
1203 | This behaves like ``ciphers`` as described above except it only applies | |
1197 | to the host on which it is defined. |
|
1204 | to the host on which it is defined. | |
1198 |
|
1205 | |||
1199 | ``fingerprints`` |
|
1206 | ``fingerprints`` | |
1200 | A list of hashes of the DER encoded peer/remote certificate. Values have |
|
1207 | A list of hashes of the DER encoded peer/remote certificate. Values have | |
1201 | the form ``algorithm``:``fingerprint``. e.g. |
|
1208 | the form ``algorithm``:``fingerprint``. e.g. | |
1202 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. |
|
1209 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. | |
1203 | In addition, colons (``:``) can appear in the fingerprint part. |
|
1210 | In addition, colons (``:``) can appear in the fingerprint part. | |
1204 |
|
1211 | |||
1205 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, |
|
1212 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, | |
1206 | ``sha512``. |
|
1213 | ``sha512``. | |
1207 |
|
1214 | |||
1208 | Use of ``sha256`` or ``sha512`` is preferred. |
|
1215 | Use of ``sha256`` or ``sha512`` is preferred. | |
1209 |
|
1216 | |||
1210 | If a fingerprint is specified, the CA chain is not validated for this |
|
1217 | If a fingerprint is specified, the CA chain is not validated for this | |
1211 | host and Mercurial will require the remote certificate to match one |
|
1218 | host and Mercurial will require the remote certificate to match one | |
1212 | of the fingerprints specified. This means if the server updates its |
|
1219 | of the fingerprints specified. This means if the server updates its | |
1213 | certificate, Mercurial will abort until a new fingerprint is defined. |
|
1220 | certificate, Mercurial will abort until a new fingerprint is defined. | |
1214 | This can provide stronger security than traditional CA-based validation |
|
1221 | This can provide stronger security than traditional CA-based validation | |
1215 | at the expense of convenience. |
|
1222 | at the expense of convenience. | |
1216 |
|
1223 | |||
1217 | This option takes precedence over ``verifycertsfile``. |
|
1224 | This option takes precedence over ``verifycertsfile``. | |
1218 |
|
1225 | |||
1219 | ``minimumprotocol`` |
|
1226 | ``minimumprotocol`` | |
1220 | This behaves like ``minimumprotocol`` as described above except it |
|
1227 | This behaves like ``minimumprotocol`` as described above except it | |
1221 | only applies to the host on which it is defined. |
|
1228 | only applies to the host on which it is defined. | |
1222 |
|
1229 | |||
1223 | ``verifycertsfile`` |
|
1230 | ``verifycertsfile`` | |
1224 | Path to file a containing a list of PEM encoded certificates used to |
|
1231 | Path to file a containing a list of PEM encoded certificates used to | |
1225 | verify the server certificate. Environment variables and ``~user`` |
|
1232 | verify the server certificate. Environment variables and ``~user`` | |
1226 | constructs are expanded in the filename. |
|
1233 | constructs are expanded in the filename. | |
1227 |
|
1234 | |||
1228 | The server certificate or the certificate's certificate authority (CA) |
|
1235 | The server certificate or the certificate's certificate authority (CA) | |
1229 | must match a certificate from this file or certificate verification |
|
1236 | must match a certificate from this file or certificate verification | |
1230 | will fail and connections to the server will be refused. |
|
1237 | will fail and connections to the server will be refused. | |
1231 |
|
1238 | |||
1232 | If defined, only certificates provided by this file will be used: |
|
1239 | If defined, only certificates provided by this file will be used: | |
1233 | ``web.cacerts`` and any system/default certificates will not be |
|
1240 | ``web.cacerts`` and any system/default certificates will not be | |
1234 | used. |
|
1241 | used. | |
1235 |
|
1242 | |||
1236 | This option has no effect if the per-host ``fingerprints`` option |
|
1243 | This option has no effect if the per-host ``fingerprints`` option | |
1237 | is set. |
|
1244 | is set. | |
1238 |
|
1245 | |||
1239 | The format of the file is as follows:: |
|
1246 | The format of the file is as follows:: | |
1240 |
|
1247 | |||
1241 | -----BEGIN CERTIFICATE----- |
|
1248 | -----BEGIN CERTIFICATE----- | |
1242 | ... (certificate in base64 PEM encoding) ... |
|
1249 | ... (certificate in base64 PEM encoding) ... | |
1243 | -----END CERTIFICATE----- |
|
1250 | -----END CERTIFICATE----- | |
1244 | -----BEGIN CERTIFICATE----- |
|
1251 | -----BEGIN CERTIFICATE----- | |
1245 | ... (certificate in base64 PEM encoding) ... |
|
1252 | ... (certificate in base64 PEM encoding) ... | |
1246 | -----END CERTIFICATE----- |
|
1253 | -----END CERTIFICATE----- | |
1247 |
|
1254 | |||
1248 | For example:: |
|
1255 | For example:: | |
1249 |
|
1256 | |||
1250 | [hostsecurity] |
|
1257 | [hostsecurity] | |
1251 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 |
|
1258 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 | |
1252 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1259 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1253 | hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2 |
|
1260 | hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2 | |
1254 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem |
|
1261 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem | |
1255 |
|
1262 | |||
1256 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 |
|
1263 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 | |
1257 | when connecting to ``hg.example.com``:: |
|
1264 | when connecting to ``hg.example.com``:: | |
1258 |
|
1265 | |||
1259 | [hostsecurity] |
|
1266 | [hostsecurity] | |
1260 | minimumprotocol = tls1.2 |
|
1267 | minimumprotocol = tls1.2 | |
1261 | hg.example.com:minimumprotocol = tls1.1 |
|
1268 | hg.example.com:minimumprotocol = tls1.1 | |
1262 |
|
1269 | |||
1263 | ``http_proxy`` |
|
1270 | ``http_proxy`` | |
1264 | -------------- |
|
1271 | -------------- | |
1265 |
|
1272 | |||
1266 | Used to access web-based Mercurial repositories through a HTTP |
|
1273 | Used to access web-based Mercurial repositories through a HTTP | |
1267 | proxy. |
|
1274 | proxy. | |
1268 |
|
1275 | |||
1269 | ``host`` |
|
1276 | ``host`` | |
1270 | Host name and (optional) port of the proxy server, for example |
|
1277 | Host name and (optional) port of the proxy server, for example | |
1271 | "myproxy:8000". |
|
1278 | "myproxy:8000". | |
1272 |
|
1279 | |||
1273 | ``no`` |
|
1280 | ``no`` | |
1274 | Optional. Comma-separated list of host names that should bypass |
|
1281 | Optional. Comma-separated list of host names that should bypass | |
1275 | the proxy. |
|
1282 | the proxy. | |
1276 |
|
1283 | |||
1277 | ``passwd`` |
|
1284 | ``passwd`` | |
1278 | Optional. Password to authenticate with at the proxy server. |
|
1285 | Optional. Password to authenticate with at the proxy server. | |
1279 |
|
1286 | |||
1280 | ``user`` |
|
1287 | ``user`` | |
1281 | Optional. User name to authenticate with at the proxy server. |
|
1288 | Optional. User name to authenticate with at the proxy server. | |
1282 |
|
1289 | |||
1283 | ``always`` |
|
1290 | ``always`` | |
1284 | Optional. Always use the proxy, even for localhost and any entries |
|
1291 | Optional. Always use the proxy, even for localhost and any entries | |
1285 | in ``http_proxy.no``. (default: False) |
|
1292 | in ``http_proxy.no``. (default: False) | |
1286 |
|
1293 | |||
1287 | ``merge`` |
|
1294 | ``merge`` | |
1288 | --------- |
|
1295 | --------- | |
1289 |
|
1296 | |||
1290 | This section specifies behavior during merges and updates. |
|
1297 | This section specifies behavior during merges and updates. | |
1291 |
|
1298 | |||
1292 | ``checkignored`` |
|
1299 | ``checkignored`` | |
1293 | Controls behavior when an ignored file on disk has the same name as a tracked |
|
1300 | Controls behavior when an ignored file on disk has the same name as a tracked | |
1294 | file in the changeset being merged or updated to, and has different |
|
1301 | file in the changeset being merged or updated to, and has different | |
1295 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, |
|
1302 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, | |
1296 | abort on such files. With ``warn``, warn on such files and back them up as |
|
1303 | abort on such files. With ``warn``, warn on such files and back them up as | |
1297 | ``.orig``. With ``ignore``, don't print a warning and back them up as |
|
1304 | ``.orig``. With ``ignore``, don't print a warning and back them up as | |
1298 | ``.orig``. (default: ``abort``) |
|
1305 | ``.orig``. (default: ``abort``) | |
1299 |
|
1306 | |||
1300 | ``checkunknown`` |
|
1307 | ``checkunknown`` | |
1301 | Controls behavior when an unknown file that isn't ignored has the same name |
|
1308 | Controls behavior when an unknown file that isn't ignored has the same name | |
1302 | as a tracked file in the changeset being merged or updated to, and has |
|
1309 | as a tracked file in the changeset being merged or updated to, and has | |
1303 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1310 | different contents. Similar to ``merge.checkignored``, except for files that | |
1304 | are not ignored. (default: ``abort``) |
|
1311 | are not ignored. (default: ``abort``) | |
1305 |
|
1312 | |||
1306 | ``on-failure`` |
|
1313 | ``on-failure`` | |
1307 | When set to ``continue`` (the default), the merge process attempts to |
|
1314 | When set to ``continue`` (the default), the merge process attempts to | |
1308 | merge all unresolved files using the merge chosen tool, regardless of |
|
1315 | merge all unresolved files using the merge chosen tool, regardless of | |
1309 | whether previous file merge attempts during the process succeeded or not. |
|
1316 | whether previous file merge attempts during the process succeeded or not. | |
1310 | Setting this to ``prompt`` will prompt after any merge failure continue |
|
1317 | Setting this to ``prompt`` will prompt after any merge failure continue | |
1311 | or halt the merge process. Setting this to ``halt`` will automatically |
|
1318 | or halt the merge process. Setting this to ``halt`` will automatically | |
1312 | halt the merge process on any merge tool failure. The merge process |
|
1319 | halt the merge process on any merge tool failure. The merge process | |
1313 | can be restarted by using the ``resolve`` command. When a merge is |
|
1320 | can be restarted by using the ``resolve`` command. When a merge is | |
1314 | halted, the repository is left in a normal ``unresolved`` merge state. |
|
1321 | halted, the repository is left in a normal ``unresolved`` merge state. | |
1315 | (default: ``continue``) |
|
1322 | (default: ``continue``) | |
1316 |
|
1323 | |||
1317 | ``merge-patterns`` |
|
1324 | ``merge-patterns`` | |
1318 | ------------------ |
|
1325 | ------------------ | |
1319 |
|
1326 | |||
1320 | This section specifies merge tools to associate with particular file |
|
1327 | This section specifies merge tools to associate with particular file | |
1321 | patterns. Tools matched here will take precedence over the default |
|
1328 | patterns. Tools matched here will take precedence over the default | |
1322 | merge tool. Patterns are globs by default, rooted at the repository |
|
1329 | merge tool. Patterns are globs by default, rooted at the repository | |
1323 | root. |
|
1330 | root. | |
1324 |
|
1331 | |||
1325 | Example:: |
|
1332 | Example:: | |
1326 |
|
1333 | |||
1327 | [merge-patterns] |
|
1334 | [merge-patterns] | |
1328 | **.c = kdiff3 |
|
1335 | **.c = kdiff3 | |
1329 | **.jpg = myimgmerge |
|
1336 | **.jpg = myimgmerge | |
1330 |
|
1337 | |||
1331 | ``merge-tools`` |
|
1338 | ``merge-tools`` | |
1332 | --------------- |
|
1339 | --------------- | |
1333 |
|
1340 | |||
1334 | This section configures external merge tools to use for file-level |
|
1341 | This section configures external merge tools to use for file-level | |
1335 | merges. This section has likely been preconfigured at install time. |
|
1342 | merges. This section has likely been preconfigured at install time. | |
1336 | Use :hg:`config merge-tools` to check the existing configuration. |
|
1343 | Use :hg:`config merge-tools` to check the existing configuration. | |
1337 | Also see :hg:`help merge-tools` for more details. |
|
1344 | Also see :hg:`help merge-tools` for more details. | |
1338 |
|
1345 | |||
1339 | Example ``~/.hgrc``:: |
|
1346 | Example ``~/.hgrc``:: | |
1340 |
|
1347 | |||
1341 | [merge-tools] |
|
1348 | [merge-tools] | |
1342 | # Override stock tool location |
|
1349 | # Override stock tool location | |
1343 | kdiff3.executable = ~/bin/kdiff3 |
|
1350 | kdiff3.executable = ~/bin/kdiff3 | |
1344 | # Specify command line |
|
1351 | # Specify command line | |
1345 | kdiff3.args = $base $local $other -o $output |
|
1352 | kdiff3.args = $base $local $other -o $output | |
1346 | # Give higher priority |
|
1353 | # Give higher priority | |
1347 | kdiff3.priority = 1 |
|
1354 | kdiff3.priority = 1 | |
1348 |
|
1355 | |||
1349 | # Changing the priority of preconfigured tool |
|
1356 | # Changing the priority of preconfigured tool | |
1350 | meld.priority = 0 |
|
1357 | meld.priority = 0 | |
1351 |
|
1358 | |||
1352 | # Disable a preconfigured tool |
|
1359 | # Disable a preconfigured tool | |
1353 | vimdiff.disabled = yes |
|
1360 | vimdiff.disabled = yes | |
1354 |
|
1361 | |||
1355 | # Define new tool |
|
1362 | # Define new tool | |
1356 | myHtmlTool.args = -m $local $other $base $output |
|
1363 | myHtmlTool.args = -m $local $other $base $output | |
1357 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
1364 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | |
1358 | myHtmlTool.priority = 1 |
|
1365 | myHtmlTool.priority = 1 | |
1359 |
|
1366 | |||
1360 | Supported arguments: |
|
1367 | Supported arguments: | |
1361 |
|
1368 | |||
1362 | ``priority`` |
|
1369 | ``priority`` | |
1363 | The priority in which to evaluate this tool. |
|
1370 | The priority in which to evaluate this tool. | |
1364 | (default: 0) |
|
1371 | (default: 0) | |
1365 |
|
1372 | |||
1366 | ``executable`` |
|
1373 | ``executable`` | |
1367 | Either just the name of the executable or its pathname. |
|
1374 | Either just the name of the executable or its pathname. | |
1368 |
|
1375 | |||
1369 | .. container:: windows |
|
1376 | .. container:: windows | |
1370 |
|
1377 | |||
1371 | On Windows, the path can use environment variables with ${ProgramFiles} |
|
1378 | On Windows, the path can use environment variables with ${ProgramFiles} | |
1372 | syntax. |
|
1379 | syntax. | |
1373 |
|
1380 | |||
1374 | (default: the tool name) |
|
1381 | (default: the tool name) | |
1375 |
|
1382 | |||
1376 | ``args`` |
|
1383 | ``args`` | |
1377 | The arguments to pass to the tool executable. You can refer to the |
|
1384 | The arguments to pass to the tool executable. You can refer to the | |
1378 | files being merged as well as the output file through these |
|
1385 | files being merged as well as the output file through these | |
1379 | variables: ``$base``, ``$local``, ``$other``, ``$output``. |
|
1386 | variables: ``$base``, ``$local``, ``$other``, ``$output``. | |
1380 |
|
1387 | |||
1381 | The meaning of ``$local`` and ``$other`` can vary depending on which action is |
|
1388 | The meaning of ``$local`` and ``$other`` can vary depending on which action is | |
1382 | being performed. During an update or merge, ``$local`` represents the original |
|
1389 | being performed. During an update or merge, ``$local`` represents the original | |
1383 | state of the file, while ``$other`` represents the commit you are updating to or |
|
1390 | state of the file, while ``$other`` represents the commit you are updating to or | |
1384 | the commit you are merging with. During a rebase, ``$local`` represents the |
|
1391 | the commit you are merging with. During a rebase, ``$local`` represents the | |
1385 | destination of the rebase, and ``$other`` represents the commit being rebased. |
|
1392 | destination of the rebase, and ``$other`` represents the commit being rebased. | |
1386 |
|
1393 | |||
1387 | Some operations define custom labels to assist with identifying the revisions, |
|
1394 | Some operations define custom labels to assist with identifying the revisions, | |
1388 | accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom |
|
1395 | accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom | |
1389 | labels are not available, these will be ``local``, ``other``, and ``base``, |
|
1396 | labels are not available, these will be ``local``, ``other``, and ``base``, | |
1390 | respectively. |
|
1397 | respectively. | |
1391 | (default: ``$local $base $other``) |
|
1398 | (default: ``$local $base $other``) | |
1392 |
|
1399 | |||
1393 | ``premerge`` |
|
1400 | ``premerge`` | |
1394 | Attempt to run internal non-interactive 3-way merge tool before |
|
1401 | Attempt to run internal non-interactive 3-way merge tool before | |
1395 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1402 | launching external tool. Options are ``true``, ``false``, ``keep`` or | |
1396 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1403 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the | |
1397 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1404 | premerge fails. The ``keep-merge3`` will do the same but include information | |
1398 | about the base of the merge in the marker (see internal :merge3 in |
|
1405 | about the base of the merge in the marker (see internal :merge3 in | |
1399 | :hg:`help merge-tools`). |
|
1406 | :hg:`help merge-tools`). | |
1400 | (default: True) |
|
1407 | (default: True) | |
1401 |
|
1408 | |||
1402 | ``binary`` |
|
1409 | ``binary`` | |
1403 | This tool can merge binary files. (default: False, unless tool |
|
1410 | This tool can merge binary files. (default: False, unless tool | |
1404 | was selected by file pattern match) |
|
1411 | was selected by file pattern match) | |
1405 |
|
1412 | |||
1406 | ``symlink`` |
|
1413 | ``symlink`` | |
1407 | This tool can merge symlinks. (default: False) |
|
1414 | This tool can merge symlinks. (default: False) | |
1408 |
|
1415 | |||
1409 | ``check`` |
|
1416 | ``check`` | |
1410 | A list of merge success-checking options: |
|
1417 | A list of merge success-checking options: | |
1411 |
|
1418 | |||
1412 | ``changed`` |
|
1419 | ``changed`` | |
1413 | Ask whether merge was successful when the merged file shows no changes. |
|
1420 | Ask whether merge was successful when the merged file shows no changes. | |
1414 | ``conflicts`` |
|
1421 | ``conflicts`` | |
1415 | Check whether there are conflicts even though the tool reported success. |
|
1422 | Check whether there are conflicts even though the tool reported success. | |
1416 | ``prompt`` |
|
1423 | ``prompt`` | |
1417 | Always prompt for merge success, regardless of success reported by tool. |
|
1424 | Always prompt for merge success, regardless of success reported by tool. | |
1418 |
|
1425 | |||
1419 | ``fixeol`` |
|
1426 | ``fixeol`` | |
1420 | Attempt to fix up EOL changes caused by the merge tool. |
|
1427 | Attempt to fix up EOL changes caused by the merge tool. | |
1421 | (default: False) |
|
1428 | (default: False) | |
1422 |
|
1429 | |||
1423 | ``gui`` |
|
1430 | ``gui`` | |
1424 | This tool requires a graphical interface to run. (default: False) |
|
1431 | This tool requires a graphical interface to run. (default: False) | |
1425 |
|
1432 | |||
1426 | ``mergemarkers`` |
|
1433 | ``mergemarkers`` | |
1427 | Controls whether the labels passed via ``$labellocal``, ``$labelother``, and |
|
1434 | Controls whether the labels passed via ``$labellocal``, ``$labelother``, and | |
1428 | ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or |
|
1435 | ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or | |
1429 | ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict |
|
1436 | ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict | |
1430 | markers generated during premerge will be ``detailed`` if either this option or |
|
1437 | markers generated during premerge will be ``detailed`` if either this option or | |
1431 | the corresponding option in the ``[ui]`` section is ``detailed``. |
|
1438 | the corresponding option in the ``[ui]`` section is ``detailed``. | |
1432 | (default: ``basic``) |
|
1439 | (default: ``basic``) | |
1433 |
|
1440 | |||
1434 | ``mergemarkertemplate`` |
|
1441 | ``mergemarkertemplate`` | |
1435 | This setting can be used to override ``mergemarkertemplate`` from the ``[ui]`` |
|
1442 | This setting can be used to override ``mergemarkertemplate`` from the ``[ui]`` | |
1436 | section on a per-tool basis; this applies to the ``$label``-prefixed variables |
|
1443 | section on a per-tool basis; this applies to the ``$label``-prefixed variables | |
1437 | and to the conflict markers that are generated if ``premerge`` is ``keep` or |
|
1444 | and to the conflict markers that are generated if ``premerge`` is ``keep` or | |
1438 | ``keep-merge3``. See the corresponding variable in ``[ui]`` for more |
|
1445 | ``keep-merge3``. See the corresponding variable in ``[ui]`` for more | |
1439 | information. |
|
1446 | information. | |
1440 |
|
1447 | |||
1441 | .. container:: windows |
|
1448 | .. container:: windows | |
1442 |
|
1449 | |||
1443 | ``regkey`` |
|
1450 | ``regkey`` | |
1444 | Windows registry key which describes install location of this |
|
1451 | Windows registry key which describes install location of this | |
1445 | tool. Mercurial will search for this key first under |
|
1452 | tool. Mercurial will search for this key first under | |
1446 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1453 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. | |
1447 | (default: None) |
|
1454 | (default: None) | |
1448 |
|
1455 | |||
1449 | ``regkeyalt`` |
|
1456 | ``regkeyalt`` | |
1450 | An alternate Windows registry key to try if the first key is not |
|
1457 | An alternate Windows registry key to try if the first key is not | |
1451 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1458 | found. The alternate key uses the same ``regname`` and ``regappend`` | |
1452 | semantics of the primary key. The most common use for this key |
|
1459 | semantics of the primary key. The most common use for this key | |
1453 | is to search for 32bit applications on 64bit operating systems. |
|
1460 | is to search for 32bit applications on 64bit operating systems. | |
1454 | (default: None) |
|
1461 | (default: None) | |
1455 |
|
1462 | |||
1456 | ``regname`` |
|
1463 | ``regname`` | |
1457 | Name of value to read from specified registry key. |
|
1464 | Name of value to read from specified registry key. | |
1458 | (default: the unnamed (default) value) |
|
1465 | (default: the unnamed (default) value) | |
1459 |
|
1466 | |||
1460 | ``regappend`` |
|
1467 | ``regappend`` | |
1461 | String to append to the value read from the registry, typically |
|
1468 | String to append to the value read from the registry, typically | |
1462 | the executable name of the tool. |
|
1469 | the executable name of the tool. | |
1463 | (default: None) |
|
1470 | (default: None) | |
1464 |
|
1471 | |||
1465 | ``pager`` |
|
1472 | ``pager`` | |
1466 | --------- |
|
1473 | --------- | |
1467 |
|
1474 | |||
1468 | Setting used to control when to paginate and with what external tool. See |
|
1475 | Setting used to control when to paginate and with what external tool. See | |
1469 | :hg:`help pager` for details. |
|
1476 | :hg:`help pager` for details. | |
1470 |
|
1477 | |||
1471 | ``pager`` |
|
1478 | ``pager`` | |
1472 | Define the external tool used as pager. |
|
1479 | Define the external tool used as pager. | |
1473 |
|
1480 | |||
1474 | If no pager is set, Mercurial uses the environment variable $PAGER. |
|
1481 | If no pager is set, Mercurial uses the environment variable $PAGER. | |
1475 | If neither pager.pager, nor $PAGER is set, a default pager will be |
|
1482 | If neither pager.pager, nor $PAGER is set, a default pager will be | |
1476 | used, typically `less` on Unix and `more` on Windows. Example:: |
|
1483 | used, typically `less` on Unix and `more` on Windows. Example:: | |
1477 |
|
1484 | |||
1478 | [pager] |
|
1485 | [pager] | |
1479 | pager = less -FRX |
|
1486 | pager = less -FRX | |
1480 |
|
1487 | |||
1481 | ``ignore`` |
|
1488 | ``ignore`` | |
1482 | List of commands to disable the pager for. Example:: |
|
1489 | List of commands to disable the pager for. Example:: | |
1483 |
|
1490 | |||
1484 | [pager] |
|
1491 | [pager] | |
1485 | ignore = version, help, update |
|
1492 | ignore = version, help, update | |
1486 |
|
1493 | |||
1487 | ``patch`` |
|
1494 | ``patch`` | |
1488 | --------- |
|
1495 | --------- | |
1489 |
|
1496 | |||
1490 | Settings used when applying patches, for instance through the 'import' |
|
1497 | Settings used when applying patches, for instance through the 'import' | |
1491 | command or with Mercurial Queues extension. |
|
1498 | command or with Mercurial Queues extension. | |
1492 |
|
1499 | |||
1493 | ``eol`` |
|
1500 | ``eol`` | |
1494 | When set to 'strict' patch content and patched files end of lines |
|
1501 | When set to 'strict' patch content and patched files end of lines | |
1495 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1502 | are preserved. When set to ``lf`` or ``crlf``, both files end of | |
1496 | lines are ignored when patching and the result line endings are |
|
1503 | lines are ignored when patching and the result line endings are | |
1497 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1504 | normalized to either LF (Unix) or CRLF (Windows). When set to | |
1498 | ``auto``, end of lines are again ignored while patching but line |
|
1505 | ``auto``, end of lines are again ignored while patching but line | |
1499 | endings in patched files are normalized to their original setting |
|
1506 | endings in patched files are normalized to their original setting | |
1500 | on a per-file basis. If target file does not exist or has no end |
|
1507 | on a per-file basis. If target file does not exist or has no end | |
1501 | of line, patch line endings are preserved. |
|
1508 | of line, patch line endings are preserved. | |
1502 | (default: strict) |
|
1509 | (default: strict) | |
1503 |
|
1510 | |||
1504 | ``fuzz`` |
|
1511 | ``fuzz`` | |
1505 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1512 | The number of lines of 'fuzz' to allow when applying patches. This | |
1506 | controls how much context the patcher is allowed to ignore when |
|
1513 | controls how much context the patcher is allowed to ignore when | |
1507 | trying to apply a patch. |
|
1514 | trying to apply a patch. | |
1508 | (default: 2) |
|
1515 | (default: 2) | |
1509 |
|
1516 | |||
1510 | ``paths`` |
|
1517 | ``paths`` | |
1511 | --------- |
|
1518 | --------- | |
1512 |
|
1519 | |||
1513 | Assigns symbolic names and behavior to repositories. |
|
1520 | Assigns symbolic names and behavior to repositories. | |
1514 |
|
1521 | |||
1515 | Options are symbolic names defining the URL or directory that is the |
|
1522 | Options are symbolic names defining the URL or directory that is the | |
1516 | location of the repository. Example:: |
|
1523 | location of the repository. Example:: | |
1517 |
|
1524 | |||
1518 | [paths] |
|
1525 | [paths] | |
1519 | my_server = https://example.com/my_repo |
|
1526 | my_server = https://example.com/my_repo | |
1520 | local_path = /home/me/repo |
|
1527 | local_path = /home/me/repo | |
1521 |
|
1528 | |||
1522 | These symbolic names can be used from the command line. To pull |
|
1529 | These symbolic names can be used from the command line. To pull | |
1523 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: |
|
1530 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: | |
1524 | :hg:`push local_path`. |
|
1531 | :hg:`push local_path`. | |
1525 |
|
1532 | |||
1526 | Options containing colons (``:``) denote sub-options that can influence |
|
1533 | Options containing colons (``:``) denote sub-options that can influence | |
1527 | behavior for that specific path. Example:: |
|
1534 | behavior for that specific path. Example:: | |
1528 |
|
1535 | |||
1529 | [paths] |
|
1536 | [paths] | |
1530 | my_server = https://example.com/my_path |
|
1537 | my_server = https://example.com/my_path | |
1531 | my_server:pushurl = ssh://example.com/my_path |
|
1538 | my_server:pushurl = ssh://example.com/my_path | |
1532 |
|
1539 | |||
1533 | The following sub-options can be defined: |
|
1540 | The following sub-options can be defined: | |
1534 |
|
1541 | |||
1535 | ``pushurl`` |
|
1542 | ``pushurl`` | |
1536 | The URL to use for push operations. If not defined, the location |
|
1543 | The URL to use for push operations. If not defined, the location | |
1537 | defined by the path's main entry is used. |
|
1544 | defined by the path's main entry is used. | |
1538 |
|
1545 | |||
1539 | ``pushrev`` |
|
1546 | ``pushrev`` | |
1540 | A revset defining which revisions to push by default. |
|
1547 | A revset defining which revisions to push by default. | |
1541 |
|
1548 | |||
1542 | When :hg:`push` is executed without a ``-r`` argument, the revset |
|
1549 | When :hg:`push` is executed without a ``-r`` argument, the revset | |
1543 | defined by this sub-option is evaluated to determine what to push. |
|
1550 | defined by this sub-option is evaluated to determine what to push. | |
1544 |
|
1551 | |||
1545 | For example, a value of ``.`` will push the working directory's |
|
1552 | For example, a value of ``.`` will push the working directory's | |
1546 | revision by default. |
|
1553 | revision by default. | |
1547 |
|
1554 | |||
1548 | Revsets specifying bookmarks will not result in the bookmark being |
|
1555 | Revsets specifying bookmarks will not result in the bookmark being | |
1549 | pushed. |
|
1556 | pushed. | |
1550 |
|
1557 | |||
1551 | The following special named paths exist: |
|
1558 | The following special named paths exist: | |
1552 |
|
1559 | |||
1553 | ``default`` |
|
1560 | ``default`` | |
1554 | The URL or directory to use when no source or remote is specified. |
|
1561 | The URL or directory to use when no source or remote is specified. | |
1555 |
|
1562 | |||
1556 | :hg:`clone` will automatically define this path to the location the |
|
1563 | :hg:`clone` will automatically define this path to the location the | |
1557 | repository was cloned from. |
|
1564 | repository was cloned from. | |
1558 |
|
1565 | |||
1559 | ``default-push`` |
|
1566 | ``default-push`` | |
1560 | (deprecated) The URL or directory for the default :hg:`push` location. |
|
1567 | (deprecated) The URL or directory for the default :hg:`push` location. | |
1561 | ``default:pushurl`` should be used instead. |
|
1568 | ``default:pushurl`` should be used instead. | |
1562 |
|
1569 | |||
1563 | ``phases`` |
|
1570 | ``phases`` | |
1564 | ---------- |
|
1571 | ---------- | |
1565 |
|
1572 | |||
1566 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1573 | Specifies default handling of phases. See :hg:`help phases` for more | |
1567 | information about working with phases. |
|
1574 | information about working with phases. | |
1568 |
|
1575 | |||
1569 | ``publish`` |
|
1576 | ``publish`` | |
1570 | Controls draft phase behavior when working as a server. When true, |
|
1577 | Controls draft phase behavior when working as a server. When true, | |
1571 | pushed changesets are set to public in both client and server and |
|
1578 | pushed changesets are set to public in both client and server and | |
1572 | pulled or cloned changesets are set to public in the client. |
|
1579 | pulled or cloned changesets are set to public in the client. | |
1573 | (default: True) |
|
1580 | (default: True) | |
1574 |
|
1581 | |||
1575 | ``new-commit`` |
|
1582 | ``new-commit`` | |
1576 | Phase of newly-created commits. |
|
1583 | Phase of newly-created commits. | |
1577 | (default: draft) |
|
1584 | (default: draft) | |
1578 |
|
1585 | |||
1579 | ``checksubrepos`` |
|
1586 | ``checksubrepos`` | |
1580 | Check the phase of the current revision of each subrepository. Allowed |
|
1587 | Check the phase of the current revision of each subrepository. Allowed | |
1581 | values are "ignore", "follow" and "abort". For settings other than |
|
1588 | values are "ignore", "follow" and "abort". For settings other than | |
1582 | "ignore", the phase of the current revision of each subrepository is |
|
1589 | "ignore", the phase of the current revision of each subrepository is | |
1583 | checked before committing the parent repository. If any of those phases is |
|
1590 | checked before committing the parent repository. If any of those phases is | |
1584 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1591 | greater than the phase of the parent repository (e.g. if a subrepo is in a | |
1585 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1592 | "secret" phase while the parent repo is in "draft" phase), the commit is | |
1586 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1593 | either aborted (if checksubrepos is set to "abort") or the higher phase is | |
1587 | used for the parent repository commit (if set to "follow"). |
|
1594 | used for the parent repository commit (if set to "follow"). | |
1588 | (default: follow) |
|
1595 | (default: follow) | |
1589 |
|
1596 | |||
1590 |
|
1597 | |||
1591 | ``profiling`` |
|
1598 | ``profiling`` | |
1592 | ------------- |
|
1599 | ------------- | |
1593 |
|
1600 | |||
1594 | Specifies profiling type, format, and file output. Two profilers are |
|
1601 | Specifies profiling type, format, and file output. Two profilers are | |
1595 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1602 | supported: an instrumenting profiler (named ``ls``), and a sampling | |
1596 | profiler (named ``stat``). |
|
1603 | profiler (named ``stat``). | |
1597 |
|
1604 | |||
1598 | In this section description, 'profiling data' stands for the raw data |
|
1605 | In this section description, 'profiling data' stands for the raw data | |
1599 | collected during profiling, while 'profiling report' stands for a |
|
1606 | collected during profiling, while 'profiling report' stands for a | |
1600 | statistical text report generated from the profiling data. |
|
1607 | statistical text report generated from the profiling data. | |
1601 |
|
1608 | |||
1602 | ``enabled`` |
|
1609 | ``enabled`` | |
1603 | Enable the profiler. |
|
1610 | Enable the profiler. | |
1604 | (default: false) |
|
1611 | (default: false) | |
1605 |
|
1612 | |||
1606 | This is equivalent to passing ``--profile`` on the command line. |
|
1613 | This is equivalent to passing ``--profile`` on the command line. | |
1607 |
|
1614 | |||
1608 | ``type`` |
|
1615 | ``type`` | |
1609 | The type of profiler to use. |
|
1616 | The type of profiler to use. | |
1610 | (default: stat) |
|
1617 | (default: stat) | |
1611 |
|
1618 | |||
1612 | ``ls`` |
|
1619 | ``ls`` | |
1613 | Use Python's built-in instrumenting profiler. This profiler |
|
1620 | Use Python's built-in instrumenting profiler. This profiler | |
1614 | works on all platforms, but each line number it reports is the |
|
1621 | works on all platforms, but each line number it reports is the | |
1615 | first line of a function. This restriction makes it difficult to |
|
1622 | first line of a function. This restriction makes it difficult to | |
1616 | identify the expensive parts of a non-trivial function. |
|
1623 | identify the expensive parts of a non-trivial function. | |
1617 | ``stat`` |
|
1624 | ``stat`` | |
1618 | Use a statistical profiler, statprof. This profiler is most |
|
1625 | Use a statistical profiler, statprof. This profiler is most | |
1619 | useful for profiling commands that run for longer than about 0.1 |
|
1626 | useful for profiling commands that run for longer than about 0.1 | |
1620 | seconds. |
|
1627 | seconds. | |
1621 |
|
1628 | |||
1622 | ``format`` |
|
1629 | ``format`` | |
1623 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1630 | Profiling format. Specific to the ``ls`` instrumenting profiler. | |
1624 | (default: text) |
|
1631 | (default: text) | |
1625 |
|
1632 | |||
1626 | ``text`` |
|
1633 | ``text`` | |
1627 | Generate a profiling report. When saving to a file, it should be |
|
1634 | Generate a profiling report. When saving to a file, it should be | |
1628 | noted that only the report is saved, and the profiling data is |
|
1635 | noted that only the report is saved, and the profiling data is | |
1629 | not kept. |
|
1636 | not kept. | |
1630 | ``kcachegrind`` |
|
1637 | ``kcachegrind`` | |
1631 | Format profiling data for kcachegrind use: when saving to a |
|
1638 | Format profiling data for kcachegrind use: when saving to a | |
1632 | file, the generated file can directly be loaded into |
|
1639 | file, the generated file can directly be loaded into | |
1633 | kcachegrind. |
|
1640 | kcachegrind. | |
1634 |
|
1641 | |||
1635 | ``statformat`` |
|
1642 | ``statformat`` | |
1636 | Profiling format for the ``stat`` profiler. |
|
1643 | Profiling format for the ``stat`` profiler. | |
1637 | (default: hotpath) |
|
1644 | (default: hotpath) | |
1638 |
|
1645 | |||
1639 | ``hotpath`` |
|
1646 | ``hotpath`` | |
1640 | Show a tree-based display containing the hot path of execution (where |
|
1647 | Show a tree-based display containing the hot path of execution (where | |
1641 | most time was spent). |
|
1648 | most time was spent). | |
1642 | ``bymethod`` |
|
1649 | ``bymethod`` | |
1643 | Show a table of methods ordered by how frequently they are active. |
|
1650 | Show a table of methods ordered by how frequently they are active. | |
1644 | ``byline`` |
|
1651 | ``byline`` | |
1645 | Show a table of lines in files ordered by how frequently they are active. |
|
1652 | Show a table of lines in files ordered by how frequently they are active. | |
1646 | ``json`` |
|
1653 | ``json`` | |
1647 | Render profiling data as JSON. |
|
1654 | Render profiling data as JSON. | |
1648 |
|
1655 | |||
1649 | ``frequency`` |
|
1656 | ``frequency`` | |
1650 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1657 | Sampling frequency. Specific to the ``stat`` sampling profiler. | |
1651 | (default: 1000) |
|
1658 | (default: 1000) | |
1652 |
|
1659 | |||
1653 | ``output`` |
|
1660 | ``output`` | |
1654 | File path where profiling data or report should be saved. If the |
|
1661 | File path where profiling data or report should be saved. If the | |
1655 | file exists, it is replaced. (default: None, data is printed on |
|
1662 | file exists, it is replaced. (default: None, data is printed on | |
1656 | stderr) |
|
1663 | stderr) | |
1657 |
|
1664 | |||
1658 | ``sort`` |
|
1665 | ``sort`` | |
1659 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1666 | Sort field. Specific to the ``ls`` instrumenting profiler. | |
1660 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1667 | One of ``callcount``, ``reccallcount``, ``totaltime`` and | |
1661 | ``inlinetime``. |
|
1668 | ``inlinetime``. | |
1662 | (default: inlinetime) |
|
1669 | (default: inlinetime) | |
1663 |
|
1670 | |||
1664 | ``time-track`` |
|
1671 | ``time-track`` | |
1665 | Control if the stat profiler track ``cpu`` or ``real`` time. |
|
1672 | Control if the stat profiler track ``cpu`` or ``real`` time. | |
1666 | (default: ``cpu``) |
|
1673 | (default: ``cpu``) | |
1667 |
|
1674 | |||
1668 | ``limit`` |
|
1675 | ``limit`` | |
1669 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1676 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. | |
1670 | (default: 30) |
|
1677 | (default: 30) | |
1671 |
|
1678 | |||
1672 | ``nested`` |
|
1679 | ``nested`` | |
1673 | Show at most this number of lines of drill-down info after each main entry. |
|
1680 | Show at most this number of lines of drill-down info after each main entry. | |
1674 | This can help explain the difference between Total and Inline. |
|
1681 | This can help explain the difference between Total and Inline. | |
1675 | Specific to the ``ls`` instrumenting profiler. |
|
1682 | Specific to the ``ls`` instrumenting profiler. | |
1676 | (default: 0) |
|
1683 | (default: 0) | |
1677 |
|
1684 | |||
1678 | ``showmin`` |
|
1685 | ``showmin`` | |
1679 | Minimum fraction of samples an entry must have for it to be displayed. |
|
1686 | Minimum fraction of samples an entry must have for it to be displayed. | |
1680 | Can be specified as a float between ``0.0`` and ``1.0`` or can have a |
|
1687 | Can be specified as a float between ``0.0`` and ``1.0`` or can have a | |
1681 | ``%`` afterwards to allow values up to ``100``. e.g. ``5%``. |
|
1688 | ``%`` afterwards to allow values up to ``100``. e.g. ``5%``. | |
1682 |
|
1689 | |||
1683 | Only used by the ``stat`` profiler. |
|
1690 | Only used by the ``stat`` profiler. | |
1684 |
|
1691 | |||
1685 | For the ``hotpath`` format, default is ``0.05``. |
|
1692 | For the ``hotpath`` format, default is ``0.05``. | |
1686 | For the ``chrome`` format, default is ``0.005``. |
|
1693 | For the ``chrome`` format, default is ``0.005``. | |
1687 |
|
1694 | |||
1688 | The option is unused on other formats. |
|
1695 | The option is unused on other formats. | |
1689 |
|
1696 | |||
1690 | ``showmax`` |
|
1697 | ``showmax`` | |
1691 | Maximum fraction of samples an entry can have before it is ignored in |
|
1698 | Maximum fraction of samples an entry can have before it is ignored in | |
1692 | display. Values format is the same as ``showmin``. |
|
1699 | display. Values format is the same as ``showmin``. | |
1693 |
|
1700 | |||
1694 | Only used by the ``stat`` profiler. |
|
1701 | Only used by the ``stat`` profiler. | |
1695 |
|
1702 | |||
1696 | For the ``chrome`` format, default is ``0.999``. |
|
1703 | For the ``chrome`` format, default is ``0.999``. | |
1697 |
|
1704 | |||
1698 | The option is unused on other formats. |
|
1705 | The option is unused on other formats. | |
1699 |
|
1706 | |||
1700 | ``progress`` |
|
1707 | ``progress`` | |
1701 | ------------ |
|
1708 | ------------ | |
1702 |
|
1709 | |||
1703 | Mercurial commands can draw progress bars that are as informative as |
|
1710 | Mercurial commands can draw progress bars that are as informative as | |
1704 | possible. Some progress bars only offer indeterminate information, while others |
|
1711 | possible. Some progress bars only offer indeterminate information, while others | |
1705 | have a definite end point. |
|
1712 | have a definite end point. | |
1706 |
|
1713 | |||
1707 | ``delay`` |
|
1714 | ``delay`` | |
1708 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1715 | Number of seconds (float) before showing the progress bar. (default: 3) | |
1709 |
|
1716 | |||
1710 | ``changedelay`` |
|
1717 | ``changedelay`` | |
1711 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1718 | Minimum delay before showing a new topic. When set to less than 3 * refresh, | |
1712 | that value will be used instead. (default: 1) |
|
1719 | that value will be used instead. (default: 1) | |
1713 |
|
1720 | |||
1714 | ``estimateinterval`` |
|
1721 | ``estimateinterval`` | |
1715 | Maximum sampling interval in seconds for speed and estimated time |
|
1722 | Maximum sampling interval in seconds for speed and estimated time | |
1716 | calculation. (default: 60) |
|
1723 | calculation. (default: 60) | |
1717 |
|
1724 | |||
1718 | ``refresh`` |
|
1725 | ``refresh`` | |
1719 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1726 | Time in seconds between refreshes of the progress bar. (default: 0.1) | |
1720 |
|
1727 | |||
1721 | ``format`` |
|
1728 | ``format`` | |
1722 | Format of the progress bar. |
|
1729 | Format of the progress bar. | |
1723 |
|
1730 | |||
1724 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1731 | Valid entries for the format field are ``topic``, ``bar``, ``number``, | |
1725 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the |
|
1732 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the | |
1726 | last 20 characters of the item, but this can be changed by adding either |
|
1733 | last 20 characters of the item, but this can be changed by adding either | |
1727 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the |
|
1734 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the | |
1728 | first num characters. |
|
1735 | first num characters. | |
1729 |
|
1736 | |||
1730 | (default: topic bar number estimate) |
|
1737 | (default: topic bar number estimate) | |
1731 |
|
1738 | |||
1732 | ``width`` |
|
1739 | ``width`` | |
1733 | If set, the maximum width of the progress information (that is, min(width, |
|
1740 | If set, the maximum width of the progress information (that is, min(width, | |
1734 | term width) will be used). |
|
1741 | term width) will be used). | |
1735 |
|
1742 | |||
1736 | ``clear-complete`` |
|
1743 | ``clear-complete`` | |
1737 | Clear the progress bar after it's done. (default: True) |
|
1744 | Clear the progress bar after it's done. (default: True) | |
1738 |
|
1745 | |||
1739 | ``disable`` |
|
1746 | ``disable`` | |
1740 | If true, don't show a progress bar. |
|
1747 | If true, don't show a progress bar. | |
1741 |
|
1748 | |||
1742 | ``assume-tty`` |
|
1749 | ``assume-tty`` | |
1743 | If true, ALWAYS show a progress bar, unless disable is given. |
|
1750 | If true, ALWAYS show a progress bar, unless disable is given. | |
1744 |
|
1751 | |||
1745 | ``rebase`` |
|
1752 | ``rebase`` | |
1746 | ---------- |
|
1753 | ---------- | |
1747 |
|
1754 | |||
1748 | ``evolution.allowdivergence`` |
|
1755 | ``evolution.allowdivergence`` | |
1749 | Default to False, when True allow creating divergence when performing |
|
1756 | Default to False, when True allow creating divergence when performing | |
1750 | rebase of obsolete changesets. |
|
1757 | rebase of obsolete changesets. | |
1751 |
|
1758 | |||
1752 | ``revsetalias`` |
|
1759 | ``revsetalias`` | |
1753 | --------------- |
|
1760 | --------------- | |
1754 |
|
1761 | |||
1755 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1762 | Alias definitions for revsets. See :hg:`help revsets` for details. | |
1756 |
|
1763 | |||
1757 | ``server`` |
|
1764 | ``server`` | |
1758 | ---------- |
|
1765 | ---------- | |
1759 |
|
1766 | |||
1760 | Controls generic server settings. |
|
1767 | Controls generic server settings. | |
1761 |
|
1768 | |||
1762 | ``bookmarks-pushkey-compat`` |
|
1769 | ``bookmarks-pushkey-compat`` | |
1763 | Trigger pushkey hook when being pushed bookmark updates. This config exist |
|
1770 | Trigger pushkey hook when being pushed bookmark updates. This config exist | |
1764 | for compatibility purpose (default to True) |
|
1771 | for compatibility purpose (default to True) | |
1765 |
|
1772 | |||
1766 | If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark |
|
1773 | If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark | |
1767 | movement we recommend you migrate them to ``txnclose-bookmark`` and |
|
1774 | movement we recommend you migrate them to ``txnclose-bookmark`` and | |
1768 | ``pretxnclose-bookmark``. |
|
1775 | ``pretxnclose-bookmark``. | |
1769 |
|
1776 | |||
1770 | ``compressionengines`` |
|
1777 | ``compressionengines`` | |
1771 | List of compression engines and their relative priority to advertise |
|
1778 | List of compression engines and their relative priority to advertise | |
1772 | to clients. |
|
1779 | to clients. | |
1773 |
|
1780 | |||
1774 | The order of compression engines determines their priority, the first |
|
1781 | The order of compression engines determines their priority, the first | |
1775 | having the highest priority. If a compression engine is not listed |
|
1782 | having the highest priority. If a compression engine is not listed | |
1776 | here, it won't be advertised to clients. |
|
1783 | here, it won't be advertised to clients. | |
1777 |
|
1784 | |||
1778 | If not set (the default), built-in defaults are used. Run |
|
1785 | If not set (the default), built-in defaults are used. Run | |
1779 | :hg:`debuginstall` to list available compression engines and their |
|
1786 | :hg:`debuginstall` to list available compression engines and their | |
1780 | default wire protocol priority. |
|
1787 | default wire protocol priority. | |
1781 |
|
1788 | |||
1782 | Older Mercurial clients only support zlib compression and this setting |
|
1789 | Older Mercurial clients only support zlib compression and this setting | |
1783 | has no effect for legacy clients. |
|
1790 | has no effect for legacy clients. | |
1784 |
|
1791 | |||
1785 | ``uncompressed`` |
|
1792 | ``uncompressed`` | |
1786 | Whether to allow clients to clone a repository using the |
|
1793 | Whether to allow clients to clone a repository using the | |
1787 | uncompressed streaming protocol. This transfers about 40% more |
|
1794 | uncompressed streaming protocol. This transfers about 40% more | |
1788 | data than a regular clone, but uses less memory and CPU on both |
|
1795 | data than a regular clone, but uses less memory and CPU on both | |
1789 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1796 | server and client. Over a LAN (100 Mbps or better) or a very fast | |
1790 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1797 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a | |
1791 | regular clone. Over most WAN connections (anything slower than |
|
1798 | regular clone. Over most WAN connections (anything slower than | |
1792 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
1799 | about 6 Mbps), uncompressed streaming is slower, because of the | |
1793 | extra data transfer overhead. This mode will also temporarily hold |
|
1800 | extra data transfer overhead. This mode will also temporarily hold | |
1794 | the write lock while determining what data to transfer. |
|
1801 | the write lock while determining what data to transfer. | |
1795 | (default: True) |
|
1802 | (default: True) | |
1796 |
|
1803 | |||
1797 | ``uncompressedallowsecret`` |
|
1804 | ``uncompressedallowsecret`` | |
1798 | Whether to allow stream clones when the repository contains secret |
|
1805 | Whether to allow stream clones when the repository contains secret | |
1799 | changesets. (default: False) |
|
1806 | changesets. (default: False) | |
1800 |
|
1807 | |||
1801 | ``preferuncompressed`` |
|
1808 | ``preferuncompressed`` | |
1802 | When set, clients will try to use the uncompressed streaming |
|
1809 | When set, clients will try to use the uncompressed streaming | |
1803 | protocol. (default: False) |
|
1810 | protocol. (default: False) | |
1804 |
|
1811 | |||
1805 | ``disablefullbundle`` |
|
1812 | ``disablefullbundle`` | |
1806 | When set, servers will refuse attempts to do pull-based clones. |
|
1813 | When set, servers will refuse attempts to do pull-based clones. | |
1807 | If this option is set, ``preferuncompressed`` and/or clone bundles |
|
1814 | If this option is set, ``preferuncompressed`` and/or clone bundles | |
1808 | are highly recommended. Partial clones will still be allowed. |
|
1815 | are highly recommended. Partial clones will still be allowed. | |
1809 | (default: False) |
|
1816 | (default: False) | |
1810 |
|
1817 | |||
1811 | ``streamunbundle`` |
|
1818 | ``streamunbundle`` | |
1812 | When set, servers will apply data sent from the client directly, |
|
1819 | When set, servers will apply data sent from the client directly, | |
1813 | otherwise it will be written to a temporary file first. This option |
|
1820 | otherwise it will be written to a temporary file first. This option | |
1814 | effectively prevents concurrent pushes. |
|
1821 | effectively prevents concurrent pushes. | |
1815 |
|
1822 | |||
1816 | ``pullbundle`` |
|
1823 | ``pullbundle`` | |
1817 | When set, the server will check pullbundle.manifest for bundles |
|
1824 | When set, the server will check pullbundle.manifest for bundles | |
1818 | covering the requested heads and common nodes. The first matching |
|
1825 | covering the requested heads and common nodes. The first matching | |
1819 | entry will be streamed to the client. |
|
1826 | entry will be streamed to the client. | |
1820 |
|
1827 | |||
1821 | For HTTP transport, the stream will still use zlib compression |
|
1828 | For HTTP transport, the stream will still use zlib compression | |
1822 | for older clients. |
|
1829 | for older clients. | |
1823 |
|
1830 | |||
1824 | ``concurrent-push-mode`` |
|
1831 | ``concurrent-push-mode`` | |
1825 | Level of allowed race condition between two pushing clients. |
|
1832 | Level of allowed race condition between two pushing clients. | |
1826 |
|
1833 | |||
1827 | - 'strict': push is abort if another client touched the repository |
|
1834 | - 'strict': push is abort if another client touched the repository | |
1828 | while the push was preparing. (default) |
|
1835 | while the push was preparing. (default) | |
1829 | - 'check-related': push is only aborted if it affects head that got also |
|
1836 | - 'check-related': push is only aborted if it affects head that got also | |
1830 | affected while the push was preparing. |
|
1837 | affected while the push was preparing. | |
1831 |
|
1838 | |||
1832 | This requires compatible client (version 4.3 and later). Old client will |
|
1839 | This requires compatible client (version 4.3 and later). Old client will | |
1833 | use 'strict'. |
|
1840 | use 'strict'. | |
1834 |
|
1841 | |||
1835 | ``validate`` |
|
1842 | ``validate`` | |
1836 | Whether to validate the completeness of pushed changesets by |
|
1843 | Whether to validate the completeness of pushed changesets by | |
1837 | checking that all new file revisions specified in manifests are |
|
1844 | checking that all new file revisions specified in manifests are | |
1838 | present. (default: False) |
|
1845 | present. (default: False) | |
1839 |
|
1846 | |||
1840 | ``maxhttpheaderlen`` |
|
1847 | ``maxhttpheaderlen`` | |
1841 | Instruct HTTP clients not to send request headers longer than this |
|
1848 | Instruct HTTP clients not to send request headers longer than this | |
1842 | many bytes. (default: 1024) |
|
1849 | many bytes. (default: 1024) | |
1843 |
|
1850 | |||
1844 | ``bundle1`` |
|
1851 | ``bundle1`` | |
1845 | Whether to allow clients to push and pull using the legacy bundle1 |
|
1852 | Whether to allow clients to push and pull using the legacy bundle1 | |
1846 | exchange format. (default: True) |
|
1853 | exchange format. (default: True) | |
1847 |
|
1854 | |||
1848 | ``bundle1gd`` |
|
1855 | ``bundle1gd`` | |
1849 | Like ``bundle1`` but only used if the repository is using the |
|
1856 | Like ``bundle1`` but only used if the repository is using the | |
1850 | *generaldelta* storage format. (default: True) |
|
1857 | *generaldelta* storage format. (default: True) | |
1851 |
|
1858 | |||
1852 | ``bundle1.push`` |
|
1859 | ``bundle1.push`` | |
1853 | Whether to allow clients to push using the legacy bundle1 exchange |
|
1860 | Whether to allow clients to push using the legacy bundle1 exchange | |
1854 | format. (default: True) |
|
1861 | format. (default: True) | |
1855 |
|
1862 | |||
1856 | ``bundle1gd.push`` |
|
1863 | ``bundle1gd.push`` | |
1857 | Like ``bundle1.push`` but only used if the repository is using the |
|
1864 | Like ``bundle1.push`` but only used if the repository is using the | |
1858 | *generaldelta* storage format. (default: True) |
|
1865 | *generaldelta* storage format. (default: True) | |
1859 |
|
1866 | |||
1860 | ``bundle1.pull`` |
|
1867 | ``bundle1.pull`` | |
1861 | Whether to allow clients to pull using the legacy bundle1 exchange |
|
1868 | Whether to allow clients to pull using the legacy bundle1 exchange | |
1862 | format. (default: True) |
|
1869 | format. (default: True) | |
1863 |
|
1870 | |||
1864 | ``bundle1gd.pull`` |
|
1871 | ``bundle1gd.pull`` | |
1865 | Like ``bundle1.pull`` but only used if the repository is using the |
|
1872 | Like ``bundle1.pull`` but only used if the repository is using the | |
1866 | *generaldelta* storage format. (default: True) |
|
1873 | *generaldelta* storage format. (default: True) | |
1867 |
|
1874 | |||
1868 | Large repositories using the *generaldelta* storage format should |
|
1875 | Large repositories using the *generaldelta* storage format should | |
1869 | consider setting this option because converting *generaldelta* |
|
1876 | consider setting this option because converting *generaldelta* | |
1870 | repositories to the exchange format required by the bundle1 data |
|
1877 | repositories to the exchange format required by the bundle1 data | |
1871 | format can consume a lot of CPU. |
|
1878 | format can consume a lot of CPU. | |
1872 |
|
1879 | |||
1873 | ``zliblevel`` |
|
1880 | ``zliblevel`` | |
1874 | Integer between ``-1`` and ``9`` that controls the zlib compression level |
|
1881 | Integer between ``-1`` and ``9`` that controls the zlib compression level | |
1875 | for wire protocol commands that send zlib compressed output (notably the |
|
1882 | for wire protocol commands that send zlib compressed output (notably the | |
1876 | commands that send repository history data). |
|
1883 | commands that send repository history data). | |
1877 |
|
1884 | |||
1878 | The default (``-1``) uses the default zlib compression level, which is |
|
1885 | The default (``-1``) uses the default zlib compression level, which is | |
1879 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means |
|
1886 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means | |
1880 | maximum compression. |
|
1887 | maximum compression. | |
1881 |
|
1888 | |||
1882 | Setting this option allows server operators to make trade-offs between |
|
1889 | Setting this option allows server operators to make trade-offs between | |
1883 | bandwidth and CPU used. Lowering the compression lowers CPU utilization |
|
1890 | bandwidth and CPU used. Lowering the compression lowers CPU utilization | |
1884 | but sends more bytes to clients. |
|
1891 | but sends more bytes to clients. | |
1885 |
|
1892 | |||
1886 | This option only impacts the HTTP server. |
|
1893 | This option only impacts the HTTP server. | |
1887 |
|
1894 | |||
1888 | ``zstdlevel`` |
|
1895 | ``zstdlevel`` | |
1889 | Integer between ``1`` and ``22`` that controls the zstd compression level |
|
1896 | Integer between ``1`` and ``22`` that controls the zstd compression level | |
1890 | for wire protocol commands. ``1`` is the minimal amount of compression and |
|
1897 | for wire protocol commands. ``1`` is the minimal amount of compression and | |
1891 | ``22`` is the highest amount of compression. |
|
1898 | ``22`` is the highest amount of compression. | |
1892 |
|
1899 | |||
1893 | The default (``3``) should be significantly faster than zlib while likely |
|
1900 | The default (``3``) should be significantly faster than zlib while likely | |
1894 | delivering better compression ratios. |
|
1901 | delivering better compression ratios. | |
1895 |
|
1902 | |||
1896 | This option only impacts the HTTP server. |
|
1903 | This option only impacts the HTTP server. | |
1897 |
|
1904 | |||
1898 | See also ``server.zliblevel``. |
|
1905 | See also ``server.zliblevel``. | |
1899 |
|
1906 | |||
1900 | ``smtp`` |
|
1907 | ``smtp`` | |
1901 | -------- |
|
1908 | -------- | |
1902 |
|
1909 | |||
1903 | Configuration for extensions that need to send email messages. |
|
1910 | Configuration for extensions that need to send email messages. | |
1904 |
|
1911 | |||
1905 | ``host`` |
|
1912 | ``host`` | |
1906 | Host name of mail server, e.g. "mail.example.com". |
|
1913 | Host name of mail server, e.g. "mail.example.com". | |
1907 |
|
1914 | |||
1908 | ``port`` |
|
1915 | ``port`` | |
1909 | Optional. Port to connect to on mail server. (default: 465 if |
|
1916 | Optional. Port to connect to on mail server. (default: 465 if | |
1910 | ``tls`` is smtps; 25 otherwise) |
|
1917 | ``tls`` is smtps; 25 otherwise) | |
1911 |
|
1918 | |||
1912 | ``tls`` |
|
1919 | ``tls`` | |
1913 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
1920 | Optional. Method to enable TLS when connecting to mail server: starttls, | |
1914 | smtps or none. (default: none) |
|
1921 | smtps or none. (default: none) | |
1915 |
|
1922 | |||
1916 | ``username`` |
|
1923 | ``username`` | |
1917 | Optional. User name for authenticating with the SMTP server. |
|
1924 | Optional. User name for authenticating with the SMTP server. | |
1918 | (default: None) |
|
1925 | (default: None) | |
1919 |
|
1926 | |||
1920 | ``password`` |
|
1927 | ``password`` | |
1921 | Optional. Password for authenticating with the SMTP server. If not |
|
1928 | Optional. Password for authenticating with the SMTP server. If not | |
1922 | specified, interactive sessions will prompt the user for a |
|
1929 | specified, interactive sessions will prompt the user for a | |
1923 | password; non-interactive sessions will fail. (default: None) |
|
1930 | password; non-interactive sessions will fail. (default: None) | |
1924 |
|
1931 | |||
1925 | ``local_hostname`` |
|
1932 | ``local_hostname`` | |
1926 | Optional. The hostname that the sender can use to identify |
|
1933 | Optional. The hostname that the sender can use to identify | |
1927 | itself to the MTA. |
|
1934 | itself to the MTA. | |
1928 |
|
1935 | |||
1929 |
|
1936 | |||
1930 | ``subpaths`` |
|
1937 | ``subpaths`` | |
1931 | ------------ |
|
1938 | ------------ | |
1932 |
|
1939 | |||
1933 | Subrepository source URLs can go stale if a remote server changes name |
|
1940 | Subrepository source URLs can go stale if a remote server changes name | |
1934 | or becomes temporarily unavailable. This section lets you define |
|
1941 | or becomes temporarily unavailable. This section lets you define | |
1935 | rewrite rules of the form:: |
|
1942 | rewrite rules of the form:: | |
1936 |
|
1943 | |||
1937 | <pattern> = <replacement> |
|
1944 | <pattern> = <replacement> | |
1938 |
|
1945 | |||
1939 | where ``pattern`` is a regular expression matching a subrepository |
|
1946 | where ``pattern`` is a regular expression matching a subrepository | |
1940 | source URL and ``replacement`` is the replacement string used to |
|
1947 | source URL and ``replacement`` is the replacement string used to | |
1941 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
1948 | rewrite it. Groups can be matched in ``pattern`` and referenced in | |
1942 | ``replacements``. For instance:: |
|
1949 | ``replacements``. For instance:: | |
1943 |
|
1950 | |||
1944 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
1951 | http://server/(.*)-hg/ = http://hg.server/\1/ | |
1945 |
|
1952 | |||
1946 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
1953 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. | |
1947 |
|
1954 | |||
1948 | Relative subrepository paths are first made absolute, and the |
|
1955 | Relative subrepository paths are first made absolute, and the | |
1949 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` |
|
1956 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` | |
1950 | doesn't match the full path, an attempt is made to apply it on the |
|
1957 | doesn't match the full path, an attempt is made to apply it on the | |
1951 | relative path alone. The rules are applied in definition order. |
|
1958 | relative path alone. The rules are applied in definition order. | |
1952 |
|
1959 | |||
1953 | ``subrepos`` |
|
1960 | ``subrepos`` | |
1954 | ------------ |
|
1961 | ------------ | |
1955 |
|
1962 | |||
1956 | This section contains options that control the behavior of the |
|
1963 | This section contains options that control the behavior of the | |
1957 | subrepositories feature. See also :hg:`help subrepos`. |
|
1964 | subrepositories feature. See also :hg:`help subrepos`. | |
1958 |
|
1965 | |||
1959 | Security note: auditing in Mercurial is known to be insufficient to |
|
1966 | Security note: auditing in Mercurial is known to be insufficient to | |
1960 | prevent clone-time code execution with carefully constructed Git |
|
1967 | prevent clone-time code execution with carefully constructed Git | |
1961 | subrepos. It is unknown if a similar detect is present in Subversion |
|
1968 | subrepos. It is unknown if a similar detect is present in Subversion | |
1962 | subrepos. Both Git and Subversion subrepos are disabled by default |
|
1969 | subrepos. Both Git and Subversion subrepos are disabled by default | |
1963 | out of security concerns. These subrepo types can be enabled using |
|
1970 | out of security concerns. These subrepo types can be enabled using | |
1964 | the respective options below. |
|
1971 | the respective options below. | |
1965 |
|
1972 | |||
1966 | ``allowed`` |
|
1973 | ``allowed`` | |
1967 | Whether subrepositories are allowed in the working directory. |
|
1974 | Whether subrepositories are allowed in the working directory. | |
1968 |
|
1975 | |||
1969 | When false, commands involving subrepositories (like :hg:`update`) |
|
1976 | When false, commands involving subrepositories (like :hg:`update`) | |
1970 | will fail for all subrepository types. |
|
1977 | will fail for all subrepository types. | |
1971 | (default: true) |
|
1978 | (default: true) | |
1972 |
|
1979 | |||
1973 | ``hg:allowed`` |
|
1980 | ``hg:allowed`` | |
1974 | Whether Mercurial subrepositories are allowed in the working |
|
1981 | Whether Mercurial subrepositories are allowed in the working | |
1975 | directory. This option only has an effect if ``subrepos.allowed`` |
|
1982 | directory. This option only has an effect if ``subrepos.allowed`` | |
1976 | is true. |
|
1983 | is true. | |
1977 | (default: true) |
|
1984 | (default: true) | |
1978 |
|
1985 | |||
1979 | ``git:allowed`` |
|
1986 | ``git:allowed`` | |
1980 | Whether Git subrepositories are allowed in the working directory. |
|
1987 | Whether Git subrepositories are allowed in the working directory. | |
1981 | This option only has an effect if ``subrepos.allowed`` is true. |
|
1988 | This option only has an effect if ``subrepos.allowed`` is true. | |
1982 |
|
1989 | |||
1983 | See the security note above before enabling Git subrepos. |
|
1990 | See the security note above before enabling Git subrepos. | |
1984 | (default: false) |
|
1991 | (default: false) | |
1985 |
|
1992 | |||
1986 | ``svn:allowed`` |
|
1993 | ``svn:allowed`` | |
1987 | Whether Subversion subrepositories are allowed in the working |
|
1994 | Whether Subversion subrepositories are allowed in the working | |
1988 | directory. This option only has an effect if ``subrepos.allowed`` |
|
1995 | directory. This option only has an effect if ``subrepos.allowed`` | |
1989 | is true. |
|
1996 | is true. | |
1990 |
|
1997 | |||
1991 | See the security note above before enabling Subversion subrepos. |
|
1998 | See the security note above before enabling Subversion subrepos. | |
1992 | (default: false) |
|
1999 | (default: false) | |
1993 |
|
2000 | |||
1994 | ``templatealias`` |
|
2001 | ``templatealias`` | |
1995 | ----------------- |
|
2002 | ----------------- | |
1996 |
|
2003 | |||
1997 | Alias definitions for templates. See :hg:`help templates` for details. |
|
2004 | Alias definitions for templates. See :hg:`help templates` for details. | |
1998 |
|
2005 | |||
1999 | ``templates`` |
|
2006 | ``templates`` | |
2000 | ------------- |
|
2007 | ------------- | |
2001 |
|
2008 | |||
2002 | Use the ``[templates]`` section to define template strings. |
|
2009 | Use the ``[templates]`` section to define template strings. | |
2003 | See :hg:`help templates` for details. |
|
2010 | See :hg:`help templates` for details. | |
2004 |
|
2011 | |||
2005 | ``trusted`` |
|
2012 | ``trusted`` | |
2006 | ----------- |
|
2013 | ----------- | |
2007 |
|
2014 | |||
2008 | Mercurial will not use the settings in the |
|
2015 | Mercurial will not use the settings in the | |
2009 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
2016 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted | |
2010 | user or to a trusted group, as various hgrc features allow arbitrary |
|
2017 | user or to a trusted group, as various hgrc features allow arbitrary | |
2011 | commands to be run. This issue is often encountered when configuring |
|
2018 | commands to be run. This issue is often encountered when configuring | |
2012 | hooks or extensions for shared repositories or servers. However, |
|
2019 | hooks or extensions for shared repositories or servers. However, | |
2013 | the web interface will use some safe settings from the ``[web]`` |
|
2020 | the web interface will use some safe settings from the ``[web]`` | |
2014 | section. |
|
2021 | section. | |
2015 |
|
2022 | |||
2016 | This section specifies what users and groups are trusted. The |
|
2023 | This section specifies what users and groups are trusted. The | |
2017 | current user is always trusted. To trust everybody, list a user or a |
|
2024 | current user is always trusted. To trust everybody, list a user or a | |
2018 | group with name ``*``. These settings must be placed in an |
|
2025 | group with name ``*``. These settings must be placed in an | |
2019 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
2026 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the | |
2020 | user or service running Mercurial. |
|
2027 | user or service running Mercurial. | |
2021 |
|
2028 | |||
2022 | ``users`` |
|
2029 | ``users`` | |
2023 | Comma-separated list of trusted users. |
|
2030 | Comma-separated list of trusted users. | |
2024 |
|
2031 | |||
2025 | ``groups`` |
|
2032 | ``groups`` | |
2026 | Comma-separated list of trusted groups. |
|
2033 | Comma-separated list of trusted groups. | |
2027 |
|
2034 | |||
2028 |
|
2035 | |||
2029 | ``ui`` |
|
2036 | ``ui`` | |
2030 | ------ |
|
2037 | ------ | |
2031 |
|
2038 | |||
2032 | User interface controls. |
|
2039 | User interface controls. | |
2033 |
|
2040 | |||
2034 | ``archivemeta`` |
|
2041 | ``archivemeta`` | |
2035 | Whether to include the .hg_archival.txt file containing meta data |
|
2042 | Whether to include the .hg_archival.txt file containing meta data | |
2036 | (hashes for the repository base and for tip) in archives created |
|
2043 | (hashes for the repository base and for tip) in archives created | |
2037 | by the :hg:`archive` command or downloaded via hgweb. |
|
2044 | by the :hg:`archive` command or downloaded via hgweb. | |
2038 | (default: True) |
|
2045 | (default: True) | |
2039 |
|
2046 | |||
2040 | ``askusername`` |
|
2047 | ``askusername`` | |
2041 | Whether to prompt for a username when committing. If True, and |
|
2048 | Whether to prompt for a username when committing. If True, and | |
2042 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
2049 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will | |
2043 | be prompted to enter a username. If no username is entered, the |
|
2050 | be prompted to enter a username. If no username is entered, the | |
2044 | default ``USER@HOST`` is used instead. |
|
2051 | default ``USER@HOST`` is used instead. | |
2045 | (default: False) |
|
2052 | (default: False) | |
2046 |
|
2053 | |||
2047 | ``clonebundles`` |
|
2054 | ``clonebundles`` | |
2048 | Whether the "clone bundles" feature is enabled. |
|
2055 | Whether the "clone bundles" feature is enabled. | |
2049 |
|
2056 | |||
2050 | When enabled, :hg:`clone` may download and apply a server-advertised |
|
2057 | When enabled, :hg:`clone` may download and apply a server-advertised | |
2051 | bundle file from a URL instead of using the normal exchange mechanism. |
|
2058 | bundle file from a URL instead of using the normal exchange mechanism. | |
2052 |
|
2059 | |||
2053 | This can likely result in faster and more reliable clones. |
|
2060 | This can likely result in faster and more reliable clones. | |
2054 |
|
2061 | |||
2055 | (default: True) |
|
2062 | (default: True) | |
2056 |
|
2063 | |||
2057 | ``clonebundlefallback`` |
|
2064 | ``clonebundlefallback`` | |
2058 | Whether failure to apply an advertised "clone bundle" from a server |
|
2065 | Whether failure to apply an advertised "clone bundle" from a server | |
2059 | should result in fallback to a regular clone. |
|
2066 | should result in fallback to a regular clone. | |
2060 |
|
2067 | |||
2061 | This is disabled by default because servers advertising "clone |
|
2068 | This is disabled by default because servers advertising "clone | |
2062 | bundles" often do so to reduce server load. If advertised bundles |
|
2069 | bundles" often do so to reduce server load. If advertised bundles | |
2063 | start mass failing and clients automatically fall back to a regular |
|
2070 | start mass failing and clients automatically fall back to a regular | |
2064 | clone, this would add significant and unexpected load to the server |
|
2071 | clone, this would add significant and unexpected load to the server | |
2065 | since the server is expecting clone operations to be offloaded to |
|
2072 | since the server is expecting clone operations to be offloaded to | |
2066 | pre-generated bundles. Failing fast (the default behavior) ensures |
|
2073 | pre-generated bundles. Failing fast (the default behavior) ensures | |
2067 | clients don't overwhelm the server when "clone bundle" application |
|
2074 | clients don't overwhelm the server when "clone bundle" application | |
2068 | fails. |
|
2075 | fails. | |
2069 |
|
2076 | |||
2070 | (default: False) |
|
2077 | (default: False) | |
2071 |
|
2078 | |||
2072 | ``clonebundleprefers`` |
|
2079 | ``clonebundleprefers`` | |
2073 | Defines preferences for which "clone bundles" to use. |
|
2080 | Defines preferences for which "clone bundles" to use. | |
2074 |
|
2081 | |||
2075 | Servers advertising "clone bundles" may advertise multiple available |
|
2082 | Servers advertising "clone bundles" may advertise multiple available | |
2076 | bundles. Each bundle may have different attributes, such as the bundle |
|
2083 | bundles. Each bundle may have different attributes, such as the bundle | |
2077 | type and compression format. This option is used to prefer a particular |
|
2084 | type and compression format. This option is used to prefer a particular | |
2078 | bundle over another. |
|
2085 | bundle over another. | |
2079 |
|
2086 | |||
2080 | The following keys are defined by Mercurial: |
|
2087 | The following keys are defined by Mercurial: | |
2081 |
|
2088 | |||
2082 | BUNDLESPEC |
|
2089 | BUNDLESPEC | |
2083 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. |
|
2090 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. | |
2084 | e.g. ``gzip-v2`` or ``bzip2-v1``. |
|
2091 | e.g. ``gzip-v2`` or ``bzip2-v1``. | |
2085 |
|
2092 | |||
2086 | COMPRESSION |
|
2093 | COMPRESSION | |
2087 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. |
|
2094 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. | |
2088 |
|
2095 | |||
2089 | Server operators may define custom keys. |
|
2096 | Server operators may define custom keys. | |
2090 |
|
2097 | |||
2091 | Example values: ``COMPRESSION=bzip2``, |
|
2098 | Example values: ``COMPRESSION=bzip2``, | |
2092 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. |
|
2099 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. | |
2093 |
|
2100 | |||
2094 | By default, the first bundle advertised by the server is used. |
|
2101 | By default, the first bundle advertised by the server is used. | |
2095 |
|
2102 | |||
2096 | ``color`` |
|
2103 | ``color`` | |
2097 | When to colorize output. Possible value are Boolean ("yes" or "no"), or |
|
2104 | When to colorize output. Possible value are Boolean ("yes" or "no"), or | |
2098 | "debug", or "always". (default: "yes"). "yes" will use color whenever it |
|
2105 | "debug", or "always". (default: "yes"). "yes" will use color whenever it | |
2099 | seems possible. See :hg:`help color` for details. |
|
2106 | seems possible. See :hg:`help color` for details. | |
2100 |
|
2107 | |||
2101 | ``commitsubrepos`` |
|
2108 | ``commitsubrepos`` | |
2102 | Whether to commit modified subrepositories when committing the |
|
2109 | Whether to commit modified subrepositories when committing the | |
2103 | parent repository. If False and one subrepository has uncommitted |
|
2110 | parent repository. If False and one subrepository has uncommitted | |
2104 | changes, abort the commit. |
|
2111 | changes, abort the commit. | |
2105 | (default: False) |
|
2112 | (default: False) | |
2106 |
|
2113 | |||
2107 | ``debug`` |
|
2114 | ``debug`` | |
2108 | Print debugging information. (default: False) |
|
2115 | Print debugging information. (default: False) | |
2109 |
|
2116 | |||
2110 | ``editor`` |
|
2117 | ``editor`` | |
2111 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) |
|
2118 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) | |
2112 |
|
2119 | |||
2113 | ``fallbackencoding`` |
|
2120 | ``fallbackencoding`` | |
2114 | Encoding to try if it's not possible to decode the changelog using |
|
2121 | Encoding to try if it's not possible to decode the changelog using | |
2115 | UTF-8. (default: ISO-8859-1) |
|
2122 | UTF-8. (default: ISO-8859-1) | |
2116 |
|
2123 | |||
2117 | ``graphnodetemplate`` |
|
2124 | ``graphnodetemplate`` | |
2118 | The template used to print changeset nodes in an ASCII revision graph. |
|
2125 | The template used to print changeset nodes in an ASCII revision graph. | |
2119 | (default: ``{graphnode}``) |
|
2126 | (default: ``{graphnode}``) | |
2120 |
|
2127 | |||
2121 | ``ignore`` |
|
2128 | ``ignore`` | |
2122 | A file to read per-user ignore patterns from. This file should be |
|
2129 | A file to read per-user ignore patterns from. This file should be | |
2123 | in the same format as a repository-wide .hgignore file. Filenames |
|
2130 | in the same format as a repository-wide .hgignore file. Filenames | |
2124 | are relative to the repository root. This option supports hook syntax, |
|
2131 | are relative to the repository root. This option supports hook syntax, | |
2125 | so if you want to specify multiple ignore files, you can do so by |
|
2132 | so if you want to specify multiple ignore files, you can do so by | |
2126 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
2133 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
2127 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
2134 | of the ignore file format, see the ``hgignore(5)`` man page. | |
2128 |
|
2135 | |||
2129 | ``interactive`` |
|
2136 | ``interactive`` | |
2130 | Allow to prompt the user. (default: True) |
|
2137 | Allow to prompt the user. (default: True) | |
2131 |
|
2138 | |||
2132 | ``interface`` |
|
2139 | ``interface`` | |
2133 | Select the default interface for interactive features (default: text). |
|
2140 | Select the default interface for interactive features (default: text). | |
2134 | Possible values are 'text' and 'curses'. |
|
2141 | Possible values are 'text' and 'curses'. | |
2135 |
|
2142 | |||
2136 | ``interface.chunkselector`` |
|
2143 | ``interface.chunkselector`` | |
2137 | Select the interface for change recording (e.g. :hg:`commit -i`). |
|
2144 | Select the interface for change recording (e.g. :hg:`commit -i`). | |
2138 | Possible values are 'text' and 'curses'. |
|
2145 | Possible values are 'text' and 'curses'. | |
2139 | This config overrides the interface specified by ui.interface. |
|
2146 | This config overrides the interface specified by ui.interface. | |
2140 |
|
2147 | |||
2141 | ``large-file-limit`` |
|
2148 | ``large-file-limit`` | |
2142 | Largest file size that gives no memory use warning. |
|
2149 | Largest file size that gives no memory use warning. | |
2143 | Possible values are integers or 0 to disable the check. |
|
2150 | Possible values are integers or 0 to disable the check. | |
2144 | (default: 10000000) |
|
2151 | (default: 10000000) | |
2145 |
|
2152 | |||
2146 | ``logtemplate`` |
|
2153 | ``logtemplate`` | |
2147 | Template string for commands that print changesets. |
|
2154 | Template string for commands that print changesets. | |
2148 |
|
2155 | |||
2149 | ``merge`` |
|
2156 | ``merge`` | |
2150 | The conflict resolution program to use during a manual merge. |
|
2157 | The conflict resolution program to use during a manual merge. | |
2151 | For more information on merge tools see :hg:`help merge-tools`. |
|
2158 | For more information on merge tools see :hg:`help merge-tools`. | |
2152 | For configuring merge tools see the ``[merge-tools]`` section. |
|
2159 | For configuring merge tools see the ``[merge-tools]`` section. | |
2153 |
|
2160 | |||
2154 | ``mergemarkers`` |
|
2161 | ``mergemarkers`` | |
2155 | Sets the merge conflict marker label styling. The ``detailed`` |
|
2162 | Sets the merge conflict marker label styling. The ``detailed`` | |
2156 | style uses the ``mergemarkertemplate`` setting to style the labels. |
|
2163 | style uses the ``mergemarkertemplate`` setting to style the labels. | |
2157 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
2164 | The ``basic`` style just uses 'local' and 'other' as the marker label. | |
2158 | One of ``basic`` or ``detailed``. |
|
2165 | One of ``basic`` or ``detailed``. | |
2159 | (default: ``basic``) |
|
2166 | (default: ``basic``) | |
2160 |
|
2167 | |||
2161 | ``mergemarkertemplate`` |
|
2168 | ``mergemarkertemplate`` | |
2162 | The template used to print the commit description next to each conflict |
|
2169 | The template used to print the commit description next to each conflict | |
2163 | marker during merge conflicts. See :hg:`help templates` for the template |
|
2170 | marker during merge conflicts. See :hg:`help templates` for the template | |
2164 | format. |
|
2171 | format. | |
2165 |
|
2172 | |||
2166 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
2173 | Defaults to showing the hash, tags, branches, bookmarks, author, and | |
2167 | the first line of the commit description. |
|
2174 | the first line of the commit description. | |
2168 |
|
2175 | |||
2169 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
2176 | If you use non-ASCII characters in names for tags, branches, bookmarks, | |
2170 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
2177 | authors, and/or commit descriptions, you must pay attention to encodings of | |
2171 | managed files. At template expansion, non-ASCII characters use the encoding |
|
2178 | managed files. At template expansion, non-ASCII characters use the encoding | |
2172 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
2179 | specified by the ``--encoding`` global option, ``HGENCODING`` or other | |
2173 | environment variables that govern your locale. If the encoding of the merge |
|
2180 | environment variables that govern your locale. If the encoding of the merge | |
2174 | markers is different from the encoding of the merged files, |
|
2181 | markers is different from the encoding of the merged files, | |
2175 | serious problems may occur. |
|
2182 | serious problems may occur. | |
2176 |
|
2183 | |||
2177 | Can be overridden per-merge-tool, see the ``[merge-tools]`` section. |
|
2184 | Can be overridden per-merge-tool, see the ``[merge-tools]`` section. | |
2178 |
|
2185 | |||
2179 | ``origbackuppath`` |
|
2186 | ``origbackuppath`` | |
2180 | The path to a directory used to store generated .orig files. If the path is |
|
2187 | The path to a directory used to store generated .orig files. If the path is | |
2181 | not a directory, one will be created. If set, files stored in this |
|
2188 | not a directory, one will be created. If set, files stored in this | |
2182 | directory have the same name as the original file and do not have a .orig |
|
2189 | directory have the same name as the original file and do not have a .orig | |
2183 | suffix. |
|
2190 | suffix. | |
2184 |
|
2191 | |||
2185 | ``paginate`` |
|
2192 | ``paginate`` | |
2186 | Control the pagination of command output (default: True). See :hg:`help pager` |
|
2193 | Control the pagination of command output (default: True). See :hg:`help pager` | |
2187 | for details. |
|
2194 | for details. | |
2188 |
|
2195 | |||
2189 | ``patch`` |
|
2196 | ``patch`` | |
2190 | An optional external tool that ``hg import`` and some extensions |
|
2197 | An optional external tool that ``hg import`` and some extensions | |
2191 | will use for applying patches. By default Mercurial uses an |
|
2198 | will use for applying patches. By default Mercurial uses an | |
2192 | internal patch utility. The external tool must work as the common |
|
2199 | internal patch utility. The external tool must work as the common | |
2193 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
2200 | Unix ``patch`` program. In particular, it must accept a ``-p`` | |
2194 | argument to strip patch headers, a ``-d`` argument to specify the |
|
2201 | argument to strip patch headers, a ``-d`` argument to specify the | |
2195 | current directory, a file name to patch, and a patch file to take |
|
2202 | current directory, a file name to patch, and a patch file to take | |
2196 | from stdin. |
|
2203 | from stdin. | |
2197 |
|
2204 | |||
2198 | It is possible to specify a patch tool together with extra |
|
2205 | It is possible to specify a patch tool together with extra | |
2199 | arguments. For example, setting this option to ``patch --merge`` |
|
2206 | arguments. For example, setting this option to ``patch --merge`` | |
2200 | will use the ``patch`` program with its 2-way merge option. |
|
2207 | will use the ``patch`` program with its 2-way merge option. | |
2201 |
|
2208 | |||
2202 | ``portablefilenames`` |
|
2209 | ``portablefilenames`` | |
2203 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
2210 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. | |
2204 | (default: ``warn``) |
|
2211 | (default: ``warn``) | |
2205 |
|
2212 | |||
2206 | ``warn`` |
|
2213 | ``warn`` | |
2207 | Print a warning message on POSIX platforms, if a file with a non-portable |
|
2214 | Print a warning message on POSIX platforms, if a file with a non-portable | |
2208 | filename is added (e.g. a file with a name that can't be created on |
|
2215 | filename is added (e.g. a file with a name that can't be created on | |
2209 | Windows because it contains reserved parts like ``AUX``, reserved |
|
2216 | Windows because it contains reserved parts like ``AUX``, reserved | |
2210 | characters like ``:``, or would cause a case collision with an existing |
|
2217 | characters like ``:``, or would cause a case collision with an existing | |
2211 | file). |
|
2218 | file). | |
2212 |
|
2219 | |||
2213 | ``ignore`` |
|
2220 | ``ignore`` | |
2214 | Don't print a warning. |
|
2221 | Don't print a warning. | |
2215 |
|
2222 | |||
2216 | ``abort`` |
|
2223 | ``abort`` | |
2217 | The command is aborted. |
|
2224 | The command is aborted. | |
2218 |
|
2225 | |||
2219 | ``true`` |
|
2226 | ``true`` | |
2220 | Alias for ``warn``. |
|
2227 | Alias for ``warn``. | |
2221 |
|
2228 | |||
2222 | ``false`` |
|
2229 | ``false`` | |
2223 | Alias for ``ignore``. |
|
2230 | Alias for ``ignore``. | |
2224 |
|
2231 | |||
2225 | .. container:: windows |
|
2232 | .. container:: windows | |
2226 |
|
2233 | |||
2227 | On Windows, this configuration option is ignored and the command aborted. |
|
2234 | On Windows, this configuration option is ignored and the command aborted. | |
2228 |
|
2235 | |||
2229 | ``quiet`` |
|
2236 | ``quiet`` | |
2230 | Reduce the amount of output printed. |
|
2237 | Reduce the amount of output printed. | |
2231 | (default: False) |
|
2238 | (default: False) | |
2232 |
|
2239 | |||
2233 | ``remotecmd`` |
|
2240 | ``remotecmd`` | |
2234 | Remote command to use for clone/push/pull operations. |
|
2241 | Remote command to use for clone/push/pull operations. | |
2235 | (default: ``hg``) |
|
2242 | (default: ``hg``) | |
2236 |
|
2243 | |||
2237 | ``report_untrusted`` |
|
2244 | ``report_untrusted`` | |
2238 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
2245 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a | |
2239 | trusted user or group. |
|
2246 | trusted user or group. | |
2240 | (default: True) |
|
2247 | (default: True) | |
2241 |
|
2248 | |||
2242 | ``slash`` |
|
2249 | ``slash`` | |
2243 | (Deprecated. Use ``slashpath`` template filter instead.) |
|
2250 | (Deprecated. Use ``slashpath`` template filter instead.) | |
2244 |
|
2251 | |||
2245 | Display paths using a slash (``/``) as the path separator. This |
|
2252 | Display paths using a slash (``/``) as the path separator. This | |
2246 | only makes a difference on systems where the default path |
|
2253 | only makes a difference on systems where the default path | |
2247 | separator is not the slash character (e.g. Windows uses the |
|
2254 | separator is not the slash character (e.g. Windows uses the | |
2248 | backslash character (``\``)). |
|
2255 | backslash character (``\``)). | |
2249 | (default: False) |
|
2256 | (default: False) | |
2250 |
|
2257 | |||
2251 | ``statuscopies`` |
|
2258 | ``statuscopies`` | |
2252 | Display copies in the status command. |
|
2259 | Display copies in the status command. | |
2253 |
|
2260 | |||
2254 | ``ssh`` |
|
2261 | ``ssh`` | |
2255 | Command to use for SSH connections. (default: ``ssh``) |
|
2262 | Command to use for SSH connections. (default: ``ssh``) | |
2256 |
|
2263 | |||
2257 | ``ssherrorhint`` |
|
2264 | ``ssherrorhint`` | |
2258 | A hint shown to the user in the case of SSH error (e.g. |
|
2265 | A hint shown to the user in the case of SSH error (e.g. | |
2259 | ``Please see http://company/internalwiki/ssh.html``) |
|
2266 | ``Please see http://company/internalwiki/ssh.html``) | |
2260 |
|
2267 | |||
2261 | ``strict`` |
|
2268 | ``strict`` | |
2262 | Require exact command names, instead of allowing unambiguous |
|
2269 | Require exact command names, instead of allowing unambiguous | |
2263 | abbreviations. (default: False) |
|
2270 | abbreviations. (default: False) | |
2264 |
|
2271 | |||
2265 | ``style`` |
|
2272 | ``style`` | |
2266 | Name of style to use for command output. |
|
2273 | Name of style to use for command output. | |
2267 |
|
2274 | |||
2268 | ``supportcontact`` |
|
2275 | ``supportcontact`` | |
2269 | A URL where users should report a Mercurial traceback. Use this if you are a |
|
2276 | A URL where users should report a Mercurial traceback. Use this if you are a | |
2270 | large organisation with its own Mercurial deployment process and crash |
|
2277 | large organisation with its own Mercurial deployment process and crash | |
2271 | reports should be addressed to your internal support. |
|
2278 | reports should be addressed to your internal support. | |
2272 |
|
2279 | |||
2273 | ``textwidth`` |
|
2280 | ``textwidth`` | |
2274 | Maximum width of help text. A longer line generated by ``hg help`` or |
|
2281 | Maximum width of help text. A longer line generated by ``hg help`` or | |
2275 | ``hg subcommand --help`` will be broken after white space to get this |
|
2282 | ``hg subcommand --help`` will be broken after white space to get this | |
2276 | width or the terminal width, whichever comes first. |
|
2283 | width or the terminal width, whichever comes first. | |
2277 | A non-positive value will disable this and the terminal width will be |
|
2284 | A non-positive value will disable this and the terminal width will be | |
2278 | used. (default: 78) |
|
2285 | used. (default: 78) | |
2279 |
|
2286 | |||
2280 | ``timeout`` |
|
2287 | ``timeout`` | |
2281 | The timeout used when a lock is held (in seconds), a negative value |
|
2288 | The timeout used when a lock is held (in seconds), a negative value | |
2282 | means no timeout. (default: 600) |
|
2289 | means no timeout. (default: 600) | |
2283 |
|
2290 | |||
2284 | ``timeout.warn`` |
|
2291 | ``timeout.warn`` | |
2285 | Time (in seconds) before a warning is printed about held lock. A negative |
|
2292 | Time (in seconds) before a warning is printed about held lock. A negative | |
2286 | value means no warning. (default: 0) |
|
2293 | value means no warning. (default: 0) | |
2287 |
|
2294 | |||
2288 | ``traceback`` |
|
2295 | ``traceback`` | |
2289 | Mercurial always prints a traceback when an unknown exception |
|
2296 | Mercurial always prints a traceback when an unknown exception | |
2290 | occurs. Setting this to True will make Mercurial print a traceback |
|
2297 | occurs. Setting this to True will make Mercurial print a traceback | |
2291 | on all exceptions, even those recognized by Mercurial (such as |
|
2298 | on all exceptions, even those recognized by Mercurial (such as | |
2292 | IOError or MemoryError). (default: False) |
|
2299 | IOError or MemoryError). (default: False) | |
2293 |
|
2300 | |||
2294 | ``tweakdefaults`` |
|
2301 | ``tweakdefaults`` | |
2295 |
|
2302 | |||
2296 | By default Mercurial's behavior changes very little from release |
|
2303 | By default Mercurial's behavior changes very little from release | |
2297 | to release, but over time the recommended config settings |
|
2304 | to release, but over time the recommended config settings | |
2298 | shift. Enable this config to opt in to get automatic tweaks to |
|
2305 | shift. Enable this config to opt in to get automatic tweaks to | |
2299 | Mercurial's behavior over time. This config setting will have no |
|
2306 | Mercurial's behavior over time. This config setting will have no | |
2300 | effet if ``HGPLAIN` is set or ``HGPLAINEXCEPT`` is set and does |
|
2307 | effet if ``HGPLAIN` is set or ``HGPLAINEXCEPT`` is set and does | |
2301 | not include ``tweakdefaults``. (default: False) |
|
2308 | not include ``tweakdefaults``. (default: False) | |
2302 |
|
2309 | |||
2303 | ``username`` |
|
2310 | ``username`` | |
2304 | The committer of a changeset created when running "commit". |
|
2311 | The committer of a changeset created when running "commit". | |
2305 | Typically a person's name and email address, e.g. ``Fred Widget |
|
2312 | Typically a person's name and email address, e.g. ``Fred Widget | |
2306 | <fred@example.com>``. Environment variables in the |
|
2313 | <fred@example.com>``. Environment variables in the | |
2307 | username are expanded. |
|
2314 | username are expanded. | |
2308 |
|
2315 | |||
2309 | (default: ``$EMAIL`` or ``username@hostname``. If the username in |
|
2316 | (default: ``$EMAIL`` or ``username@hostname``. If the username in | |
2310 | hgrc is empty, e.g. if the system admin set ``username =`` in the |
|
2317 | hgrc is empty, e.g. if the system admin set ``username =`` in the | |
2311 | system hgrc, it has to be specified manually or in a different |
|
2318 | system hgrc, it has to be specified manually or in a different | |
2312 | hgrc file) |
|
2319 | hgrc file) | |
2313 |
|
2320 | |||
2314 | ``verbose`` |
|
2321 | ``verbose`` | |
2315 | Increase the amount of output printed. (default: False) |
|
2322 | Increase the amount of output printed. (default: False) | |
2316 |
|
2323 | |||
2317 |
|
2324 | |||
2318 | ``web`` |
|
2325 | ``web`` | |
2319 | ------- |
|
2326 | ------- | |
2320 |
|
2327 | |||
2321 | Web interface configuration. The settings in this section apply to |
|
2328 | Web interface configuration. The settings in this section apply to | |
2322 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
2329 | both the builtin webserver (started by :hg:`serve`) and the script you | |
2323 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
2330 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI | |
2324 | and WSGI). |
|
2331 | and WSGI). | |
2325 |
|
2332 | |||
2326 | The Mercurial webserver does no authentication (it does not prompt for |
|
2333 | The Mercurial webserver does no authentication (it does not prompt for | |
2327 | usernames and passwords to validate *who* users are), but it does do |
|
2334 | usernames and passwords to validate *who* users are), but it does do | |
2328 | authorization (it grants or denies access for *authenticated users* |
|
2335 | authorization (it grants or denies access for *authenticated users* | |
2329 | based on settings in this section). You must either configure your |
|
2336 | based on settings in this section). You must either configure your | |
2330 | webserver to do authentication for you, or disable the authorization |
|
2337 | webserver to do authentication for you, or disable the authorization | |
2331 | checks. |
|
2338 | checks. | |
2332 |
|
2339 | |||
2333 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
2340 | For a quick setup in a trusted environment, e.g., a private LAN, where | |
2334 | you want it to accept pushes from anybody, you can use the following |
|
2341 | you want it to accept pushes from anybody, you can use the following | |
2335 | command line:: |
|
2342 | command line:: | |
2336 |
|
2343 | |||
2337 | $ hg --config web.allow-push=* --config web.push_ssl=False serve |
|
2344 | $ hg --config web.allow-push=* --config web.push_ssl=False serve | |
2338 |
|
2345 | |||
2339 | Note that this will allow anybody to push anything to the server and |
|
2346 | Note that this will allow anybody to push anything to the server and | |
2340 | that this should not be used for public servers. |
|
2347 | that this should not be used for public servers. | |
2341 |
|
2348 | |||
2342 | The full set of options is: |
|
2349 | The full set of options is: | |
2343 |
|
2350 | |||
2344 | ``accesslog`` |
|
2351 | ``accesslog`` | |
2345 | Where to output the access log. (default: stdout) |
|
2352 | Where to output the access log. (default: stdout) | |
2346 |
|
2353 | |||
2347 | ``address`` |
|
2354 | ``address`` | |
2348 | Interface address to bind to. (default: all) |
|
2355 | Interface address to bind to. (default: all) | |
2349 |
|
2356 | |||
2350 | ``allow-archive`` |
|
2357 | ``allow-archive`` | |
2351 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
2358 | List of archive format (bz2, gz, zip) allowed for downloading. | |
2352 | (default: empty) |
|
2359 | (default: empty) | |
2353 |
|
2360 | |||
2354 | ``allowbz2`` |
|
2361 | ``allowbz2`` | |
2355 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
2362 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository | |
2356 | revisions. |
|
2363 | revisions. | |
2357 | (default: False) |
|
2364 | (default: False) | |
2358 |
|
2365 | |||
2359 | ``allowgz`` |
|
2366 | ``allowgz`` | |
2360 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
2367 | (DEPRECATED) Whether to allow .tar.gz downloading of repository | |
2361 | revisions. |
|
2368 | revisions. | |
2362 | (default: False) |
|
2369 | (default: False) | |
2363 |
|
2370 | |||
2364 | ``allow-pull`` |
|
2371 | ``allow-pull`` | |
2365 | Whether to allow pulling from the repository. (default: True) |
|
2372 | Whether to allow pulling from the repository. (default: True) | |
2366 |
|
2373 | |||
2367 | ``allow-push`` |
|
2374 | ``allow-push`` | |
2368 | Whether to allow pushing to the repository. If empty or not set, |
|
2375 | Whether to allow pushing to the repository. If empty or not set, | |
2369 | pushing is not allowed. If the special value ``*``, any remote |
|
2376 | pushing is not allowed. If the special value ``*``, any remote | |
2370 | user can push, including unauthenticated users. Otherwise, the |
|
2377 | user can push, including unauthenticated users. Otherwise, the | |
2371 | remote user must have been authenticated, and the authenticated |
|
2378 | remote user must have been authenticated, and the authenticated | |
2372 | user name must be present in this list. The contents of the |
|
2379 | user name must be present in this list. The contents of the | |
2373 | allow-push list are examined after the deny_push list. |
|
2380 | allow-push list are examined after the deny_push list. | |
2374 |
|
2381 | |||
2375 | ``allow_read`` |
|
2382 | ``allow_read`` | |
2376 | If the user has not already been denied repository access due to |
|
2383 | If the user has not already been denied repository access due to | |
2377 | the contents of deny_read, this list determines whether to grant |
|
2384 | the contents of deny_read, this list determines whether to grant | |
2378 | repository access to the user. If this list is not empty, and the |
|
2385 | repository access to the user. If this list is not empty, and the | |
2379 | user is unauthenticated or not present in the list, then access is |
|
2386 | user is unauthenticated or not present in the list, then access is | |
2380 | denied for the user. If the list is empty or not set, then access |
|
2387 | denied for the user. If the list is empty or not set, then access | |
2381 | is permitted to all users by default. Setting allow_read to the |
|
2388 | is permitted to all users by default. Setting allow_read to the | |
2382 | special value ``*`` is equivalent to it not being set (i.e. access |
|
2389 | special value ``*`` is equivalent to it not being set (i.e. access | |
2383 | is permitted to all users). The contents of the allow_read list are |
|
2390 | is permitted to all users). The contents of the allow_read list are | |
2384 | examined after the deny_read list. |
|
2391 | examined after the deny_read list. | |
2385 |
|
2392 | |||
2386 | ``allowzip`` |
|
2393 | ``allowzip`` | |
2387 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
2394 | (DEPRECATED) Whether to allow .zip downloading of repository | |
2388 | revisions. This feature creates temporary files. |
|
2395 | revisions. This feature creates temporary files. | |
2389 | (default: False) |
|
2396 | (default: False) | |
2390 |
|
2397 | |||
2391 | ``archivesubrepos`` |
|
2398 | ``archivesubrepos`` | |
2392 | Whether to recurse into subrepositories when archiving. |
|
2399 | Whether to recurse into subrepositories when archiving. | |
2393 | (default: False) |
|
2400 | (default: False) | |
2394 |
|
2401 | |||
2395 | ``baseurl`` |
|
2402 | ``baseurl`` | |
2396 | Base URL to use when publishing URLs in other locations, so |
|
2403 | Base URL to use when publishing URLs in other locations, so | |
2397 | third-party tools like email notification hooks can construct |
|
2404 | third-party tools like email notification hooks can construct | |
2398 | URLs. Example: ``http://hgserver/repos/``. |
|
2405 | URLs. Example: ``http://hgserver/repos/``. | |
2399 |
|
2406 | |||
2400 | ``cacerts`` |
|
2407 | ``cacerts`` | |
2401 | Path to file containing a list of PEM encoded certificate |
|
2408 | Path to file containing a list of PEM encoded certificate | |
2402 | authority certificates. Environment variables and ``~user`` |
|
2409 | authority certificates. Environment variables and ``~user`` | |
2403 | constructs are expanded in the filename. If specified on the |
|
2410 | constructs are expanded in the filename. If specified on the | |
2404 | client, then it will verify the identity of remote HTTPS servers |
|
2411 | client, then it will verify the identity of remote HTTPS servers | |
2405 | with these certificates. |
|
2412 | with these certificates. | |
2406 |
|
2413 | |||
2407 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
2414 | To disable SSL verification temporarily, specify ``--insecure`` from | |
2408 | command line. |
|
2415 | command line. | |
2409 |
|
2416 | |||
2410 | You can use OpenSSL's CA certificate file if your platform has |
|
2417 | You can use OpenSSL's CA certificate file if your platform has | |
2411 | one. On most Linux systems this will be |
|
2418 | one. On most Linux systems this will be | |
2412 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
2419 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to | |
2413 | generate this file manually. The form must be as follows:: |
|
2420 | generate this file manually. The form must be as follows:: | |
2414 |
|
2421 | |||
2415 | -----BEGIN CERTIFICATE----- |
|
2422 | -----BEGIN CERTIFICATE----- | |
2416 | ... (certificate in base64 PEM encoding) ... |
|
2423 | ... (certificate in base64 PEM encoding) ... | |
2417 | -----END CERTIFICATE----- |
|
2424 | -----END CERTIFICATE----- | |
2418 | -----BEGIN CERTIFICATE----- |
|
2425 | -----BEGIN CERTIFICATE----- | |
2419 | ... (certificate in base64 PEM encoding) ... |
|
2426 | ... (certificate in base64 PEM encoding) ... | |
2420 | -----END CERTIFICATE----- |
|
2427 | -----END CERTIFICATE----- | |
2421 |
|
2428 | |||
2422 | ``cache`` |
|
2429 | ``cache`` | |
2423 | Whether to support caching in hgweb. (default: True) |
|
2430 | Whether to support caching in hgweb. (default: True) | |
2424 |
|
2431 | |||
2425 | ``certificate`` |
|
2432 | ``certificate`` | |
2426 | Certificate to use when running :hg:`serve`. |
|
2433 | Certificate to use when running :hg:`serve`. | |
2427 |
|
2434 | |||
2428 | ``collapse`` |
|
2435 | ``collapse`` | |
2429 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
2436 | With ``descend`` enabled, repositories in subdirectories are shown at | |
2430 | a single level alongside repositories in the current path. With |
|
2437 | a single level alongside repositories in the current path. With | |
2431 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
2438 | ``collapse`` also enabled, repositories residing at a deeper level than | |
2432 | the current path are grouped behind navigable directory entries that |
|
2439 | the current path are grouped behind navigable directory entries that | |
2433 | lead to the locations of these repositories. In effect, this setting |
|
2440 | lead to the locations of these repositories. In effect, this setting | |
2434 | collapses each collection of repositories found within a subdirectory |
|
2441 | collapses each collection of repositories found within a subdirectory | |
2435 | into a single entry for that subdirectory. (default: False) |
|
2442 | into a single entry for that subdirectory. (default: False) | |
2436 |
|
2443 | |||
2437 | ``comparisoncontext`` |
|
2444 | ``comparisoncontext`` | |
2438 | Number of lines of context to show in side-by-side file comparison. If |
|
2445 | Number of lines of context to show in side-by-side file comparison. If | |
2439 | negative or the value ``full``, whole files are shown. (default: 5) |
|
2446 | negative or the value ``full``, whole files are shown. (default: 5) | |
2440 |
|
2447 | |||
2441 | This setting can be overridden by a ``context`` request parameter to the |
|
2448 | This setting can be overridden by a ``context`` request parameter to the | |
2442 | ``comparison`` command, taking the same values. |
|
2449 | ``comparison`` command, taking the same values. | |
2443 |
|
2450 | |||
2444 | ``contact`` |
|
2451 | ``contact`` | |
2445 | Name or email address of the person in charge of the repository. |
|
2452 | Name or email address of the person in charge of the repository. | |
2446 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) |
|
2453 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) | |
2447 |
|
2454 | |||
2448 | ``csp`` |
|
2455 | ``csp`` | |
2449 | Send a ``Content-Security-Policy`` HTTP header with this value. |
|
2456 | Send a ``Content-Security-Policy`` HTTP header with this value. | |
2450 |
|
2457 | |||
2451 | The value may contain a special string ``%nonce%``, which will be replaced |
|
2458 | The value may contain a special string ``%nonce%``, which will be replaced | |
2452 | by a randomly-generated one-time use value. If the value contains |
|
2459 | by a randomly-generated one-time use value. If the value contains | |
2453 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the |
|
2460 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the | |
2454 | one-time property of the nonce. This nonce will also be inserted into |
|
2461 | one-time property of the nonce. This nonce will also be inserted into | |
2455 | ``<script>`` elements containing inline JavaScript. |
|
2462 | ``<script>`` elements containing inline JavaScript. | |
2456 |
|
2463 | |||
2457 | Note: lots of HTML content sent by the server is derived from repository |
|
2464 | Note: lots of HTML content sent by the server is derived from repository | |
2458 | data. Please consider the potential for malicious repository data to |
|
2465 | data. Please consider the potential for malicious repository data to | |
2459 | "inject" itself into generated HTML content as part of your security |
|
2466 | "inject" itself into generated HTML content as part of your security | |
2460 | threat model. |
|
2467 | threat model. | |
2461 |
|
2468 | |||
2462 | ``deny_push`` |
|
2469 | ``deny_push`` | |
2463 | Whether to deny pushing to the repository. If empty or not set, |
|
2470 | Whether to deny pushing to the repository. If empty or not set, | |
2464 | push is not denied. If the special value ``*``, all remote users are |
|
2471 | push is not denied. If the special value ``*``, all remote users are | |
2465 | denied push. Otherwise, unauthenticated users are all denied, and |
|
2472 | denied push. Otherwise, unauthenticated users are all denied, and | |
2466 | any authenticated user name present in this list is also denied. The |
|
2473 | any authenticated user name present in this list is also denied. The | |
2467 | contents of the deny_push list are examined before the allow-push list. |
|
2474 | contents of the deny_push list are examined before the allow-push list. | |
2468 |
|
2475 | |||
2469 | ``deny_read`` |
|
2476 | ``deny_read`` | |
2470 | Whether to deny reading/viewing of the repository. If this list is |
|
2477 | Whether to deny reading/viewing of the repository. If this list is | |
2471 | not empty, unauthenticated users are all denied, and any |
|
2478 | not empty, unauthenticated users are all denied, and any | |
2472 | authenticated user name present in this list is also denied access to |
|
2479 | authenticated user name present in this list is also denied access to | |
2473 | the repository. If set to the special value ``*``, all remote users |
|
2480 | the repository. If set to the special value ``*``, all remote users | |
2474 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
2481 | are denied access (rarely needed ;). If deny_read is empty or not set, | |
2475 | the determination of repository access depends on the presence and |
|
2482 | the determination of repository access depends on the presence and | |
2476 | content of the allow_read list (see description). If both |
|
2483 | content of the allow_read list (see description). If both | |
2477 | deny_read and allow_read are empty or not set, then access is |
|
2484 | deny_read and allow_read are empty or not set, then access is | |
2478 | permitted to all users by default. If the repository is being |
|
2485 | permitted to all users by default. If the repository is being | |
2479 | served via hgwebdir, denied users will not be able to see it in |
|
2486 | served via hgwebdir, denied users will not be able to see it in | |
2480 | the list of repositories. The contents of the deny_read list have |
|
2487 | the list of repositories. The contents of the deny_read list have | |
2481 | priority over (are examined before) the contents of the allow_read |
|
2488 | priority over (are examined before) the contents of the allow_read | |
2482 | list. |
|
2489 | list. | |
2483 |
|
2490 | |||
2484 | ``descend`` |
|
2491 | ``descend`` | |
2485 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
2492 | hgwebdir indexes will not descend into subdirectories. Only repositories | |
2486 | directly in the current path will be shown (other repositories are still |
|
2493 | directly in the current path will be shown (other repositories are still | |
2487 | available from the index corresponding to their containing path). |
|
2494 | available from the index corresponding to their containing path). | |
2488 |
|
2495 | |||
2489 | ``description`` |
|
2496 | ``description`` | |
2490 | Textual description of the repository's purpose or contents. |
|
2497 | Textual description of the repository's purpose or contents. | |
2491 | (default: "unknown") |
|
2498 | (default: "unknown") | |
2492 |
|
2499 | |||
2493 | ``encoding`` |
|
2500 | ``encoding`` | |
2494 | Character encoding name. (default: the current locale charset) |
|
2501 | Character encoding name. (default: the current locale charset) | |
2495 | Example: "UTF-8". |
|
2502 | Example: "UTF-8". | |
2496 |
|
2503 | |||
2497 | ``errorlog`` |
|
2504 | ``errorlog`` | |
2498 | Where to output the error log. (default: stderr) |
|
2505 | Where to output the error log. (default: stderr) | |
2499 |
|
2506 | |||
2500 | ``guessmime`` |
|
2507 | ``guessmime`` | |
2501 | Control MIME types for raw download of file content. |
|
2508 | Control MIME types for raw download of file content. | |
2502 | Set to True to let hgweb guess the content type from the file |
|
2509 | Set to True to let hgweb guess the content type from the file | |
2503 | extension. This will serve HTML files as ``text/html`` and might |
|
2510 | extension. This will serve HTML files as ``text/html`` and might | |
2504 | allow cross-site scripting attacks when serving untrusted |
|
2511 | allow cross-site scripting attacks when serving untrusted | |
2505 | repositories. (default: False) |
|
2512 | repositories. (default: False) | |
2506 |
|
2513 | |||
2507 | ``hidden`` |
|
2514 | ``hidden`` | |
2508 | Whether to hide the repository in the hgwebdir index. |
|
2515 | Whether to hide the repository in the hgwebdir index. | |
2509 | (default: False) |
|
2516 | (default: False) | |
2510 |
|
2517 | |||
2511 | ``ipv6`` |
|
2518 | ``ipv6`` | |
2512 | Whether to use IPv6. (default: False) |
|
2519 | Whether to use IPv6. (default: False) | |
2513 |
|
2520 | |||
2514 | ``labels`` |
|
2521 | ``labels`` | |
2515 | List of string *labels* associated with the repository. |
|
2522 | List of string *labels* associated with the repository. | |
2516 |
|
2523 | |||
2517 | Labels are exposed as a template keyword and can be used to customize |
|
2524 | Labels are exposed as a template keyword and can be used to customize | |
2518 | output. e.g. the ``index`` template can group or filter repositories |
|
2525 | output. e.g. the ``index`` template can group or filter repositories | |
2519 | by labels and the ``summary`` template can display additional content |
|
2526 | by labels and the ``summary`` template can display additional content | |
2520 | if a specific label is present. |
|
2527 | if a specific label is present. | |
2521 |
|
2528 | |||
2522 | ``logoimg`` |
|
2529 | ``logoimg`` | |
2523 | File name of the logo image that some templates display on each page. |
|
2530 | File name of the logo image that some templates display on each page. | |
2524 | The file name is relative to ``staticurl``. That is, the full path to |
|
2531 | The file name is relative to ``staticurl``. That is, the full path to | |
2525 | the logo image is "staticurl/logoimg". |
|
2532 | the logo image is "staticurl/logoimg". | |
2526 | If unset, ``hglogo.png`` will be used. |
|
2533 | If unset, ``hglogo.png`` will be used. | |
2527 |
|
2534 | |||
2528 | ``logourl`` |
|
2535 | ``logourl`` | |
2529 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` |
|
2536 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` | |
2530 | will be used. |
|
2537 | will be used. | |
2531 |
|
2538 | |||
2532 | ``maxchanges`` |
|
2539 | ``maxchanges`` | |
2533 | Maximum number of changes to list on the changelog. (default: 10) |
|
2540 | Maximum number of changes to list on the changelog. (default: 10) | |
2534 |
|
2541 | |||
2535 | ``maxfiles`` |
|
2542 | ``maxfiles`` | |
2536 | Maximum number of files to list per changeset. (default: 10) |
|
2543 | Maximum number of files to list per changeset. (default: 10) | |
2537 |
|
2544 | |||
2538 | ``maxshortchanges`` |
|
2545 | ``maxshortchanges`` | |
2539 | Maximum number of changes to list on the shortlog, graph or filelog |
|
2546 | Maximum number of changes to list on the shortlog, graph or filelog | |
2540 | pages. (default: 60) |
|
2547 | pages. (default: 60) | |
2541 |
|
2548 | |||
2542 | ``name`` |
|
2549 | ``name`` | |
2543 | Repository name to use in the web interface. |
|
2550 | Repository name to use in the web interface. | |
2544 | (default: current working directory) |
|
2551 | (default: current working directory) | |
2545 |
|
2552 | |||
2546 | ``port`` |
|
2553 | ``port`` | |
2547 | Port to listen on. (default: 8000) |
|
2554 | Port to listen on. (default: 8000) | |
2548 |
|
2555 | |||
2549 | ``prefix`` |
|
2556 | ``prefix`` | |
2550 | Prefix path to serve from. (default: '' (server root)) |
|
2557 | Prefix path to serve from. (default: '' (server root)) | |
2551 |
|
2558 | |||
2552 | ``push_ssl`` |
|
2559 | ``push_ssl`` | |
2553 | Whether to require that inbound pushes be transported over SSL to |
|
2560 | Whether to require that inbound pushes be transported over SSL to | |
2554 | prevent password sniffing. (default: True) |
|
2561 | prevent password sniffing. (default: True) | |
2555 |
|
2562 | |||
2556 | ``refreshinterval`` |
|
2563 | ``refreshinterval`` | |
2557 | How frequently directory listings re-scan the filesystem for new |
|
2564 | How frequently directory listings re-scan the filesystem for new | |
2558 | repositories, in seconds. This is relevant when wildcards are used |
|
2565 | repositories, in seconds. This is relevant when wildcards are used | |
2559 | to define paths. Depending on how much filesystem traversal is |
|
2566 | to define paths. Depending on how much filesystem traversal is | |
2560 | required, refreshing may negatively impact performance. |
|
2567 | required, refreshing may negatively impact performance. | |
2561 |
|
2568 | |||
2562 | Values less than or equal to 0 always refresh. |
|
2569 | Values less than or equal to 0 always refresh. | |
2563 | (default: 20) |
|
2570 | (default: 20) | |
2564 |
|
2571 | |||
2565 | ``server-header`` |
|
2572 | ``server-header`` | |
2566 | Value for HTTP ``Server`` response header. |
|
2573 | Value for HTTP ``Server`` response header. | |
2567 |
|
2574 | |||
2568 | ``staticurl`` |
|
2575 | ``staticurl`` | |
2569 | Base URL to use for static files. If unset, static files (e.g. the |
|
2576 | Base URL to use for static files. If unset, static files (e.g. the | |
2570 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
2577 | hgicon.png favicon) will be served by the CGI script itself. Use | |
2571 | this setting to serve them directly with the HTTP server. |
|
2578 | this setting to serve them directly with the HTTP server. | |
2572 | Example: ``http://hgserver/static/``. |
|
2579 | Example: ``http://hgserver/static/``. | |
2573 |
|
2580 | |||
2574 | ``stripes`` |
|
2581 | ``stripes`` | |
2575 | How many lines a "zebra stripe" should span in multi-line output. |
|
2582 | How many lines a "zebra stripe" should span in multi-line output. | |
2576 | Set to 0 to disable. (default: 1) |
|
2583 | Set to 0 to disable. (default: 1) | |
2577 |
|
2584 | |||
2578 | ``style`` |
|
2585 | ``style`` | |
2579 | Which template map style to use. The available options are the names of |
|
2586 | Which template map style to use. The available options are the names of | |
2580 | subdirectories in the HTML templates path. (default: ``paper``) |
|
2587 | subdirectories in the HTML templates path. (default: ``paper``) | |
2581 | Example: ``monoblue``. |
|
2588 | Example: ``monoblue``. | |
2582 |
|
2589 | |||
2583 | ``templates`` |
|
2590 | ``templates`` | |
2584 | Where to find the HTML templates. The default path to the HTML templates |
|
2591 | Where to find the HTML templates. The default path to the HTML templates | |
2585 | can be obtained from ``hg debuginstall``. |
|
2592 | can be obtained from ``hg debuginstall``. | |
2586 |
|
2593 | |||
2587 | ``websub`` |
|
2594 | ``websub`` | |
2588 | ---------- |
|
2595 | ---------- | |
2589 |
|
2596 | |||
2590 | Web substitution filter definition. You can use this section to |
|
2597 | Web substitution filter definition. You can use this section to | |
2591 | define a set of regular expression substitution patterns which |
|
2598 | define a set of regular expression substitution patterns which | |
2592 | let you automatically modify the hgweb server output. |
|
2599 | let you automatically modify the hgweb server output. | |
2593 |
|
2600 | |||
2594 | The default hgweb templates only apply these substitution patterns |
|
2601 | The default hgweb templates only apply these substitution patterns | |
2595 | on the revision description fields. You can apply them anywhere |
|
2602 | on the revision description fields. You can apply them anywhere | |
2596 | you want when you create your own templates by adding calls to the |
|
2603 | you want when you create your own templates by adding calls to the | |
2597 | "websub" filter (usually after calling the "escape" filter). |
|
2604 | "websub" filter (usually after calling the "escape" filter). | |
2598 |
|
2605 | |||
2599 | This can be used, for example, to convert issue references to links |
|
2606 | This can be used, for example, to convert issue references to links | |
2600 | to your issue tracker, or to convert "markdown-like" syntax into |
|
2607 | to your issue tracker, or to convert "markdown-like" syntax into | |
2601 | HTML (see the examples below). |
|
2608 | HTML (see the examples below). | |
2602 |
|
2609 | |||
2603 | Each entry in this section names a substitution filter. |
|
2610 | Each entry in this section names a substitution filter. | |
2604 | The value of each entry defines the substitution expression itself. |
|
2611 | The value of each entry defines the substitution expression itself. | |
2605 | The websub expressions follow the old interhg extension syntax, |
|
2612 | The websub expressions follow the old interhg extension syntax, | |
2606 | which in turn imitates the Unix sed replacement syntax:: |
|
2613 | which in turn imitates the Unix sed replacement syntax:: | |
2607 |
|
2614 | |||
2608 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
2615 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] | |
2609 |
|
2616 | |||
2610 | You can use any separator other than "/". The final "i" is optional |
|
2617 | You can use any separator other than "/". The final "i" is optional | |
2611 | and indicates that the search must be case insensitive. |
|
2618 | and indicates that the search must be case insensitive. | |
2612 |
|
2619 | |||
2613 | Examples:: |
|
2620 | Examples:: | |
2614 |
|
2621 | |||
2615 | [websub] |
|
2622 | [websub] | |
2616 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
2623 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i | |
2617 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
2624 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ | |
2618 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
2625 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ | |
2619 |
|
2626 | |||
2620 | ``worker`` |
|
2627 | ``worker`` | |
2621 | ---------- |
|
2628 | ---------- | |
2622 |
|
2629 | |||
2623 | Parallel master/worker configuration. We currently perform working |
|
2630 | Parallel master/worker configuration. We currently perform working | |
2624 | directory updates in parallel on Unix-like systems, which greatly |
|
2631 | directory updates in parallel on Unix-like systems, which greatly | |
2625 | helps performance. |
|
2632 | helps performance. | |
2626 |
|
2633 | |||
2627 | ``enabled`` |
|
2634 | ``enabled`` | |
2628 | Whether to enable workers code to be used. |
|
2635 | Whether to enable workers code to be used. | |
2629 | (default: true) |
|
2636 | (default: true) | |
2630 |
|
2637 | |||
2631 | ``numcpus`` |
|
2638 | ``numcpus`` | |
2632 | Number of CPUs to use for parallel operations. A zero or |
|
2639 | Number of CPUs to use for parallel operations. A zero or | |
2633 | negative value is treated as ``use the default``. |
|
2640 | negative value is treated as ``use the default``. | |
2634 | (default: 4 or the number of CPUs on the system, whichever is larger) |
|
2641 | (default: 4 or the number of CPUs on the system, whichever is larger) | |
2635 |
|
2642 | |||
2636 | ``backgroundclose`` |
|
2643 | ``backgroundclose`` | |
2637 | Whether to enable closing file handles on background threads during certain |
|
2644 | Whether to enable closing file handles on background threads during certain | |
2638 | operations. Some platforms aren't very efficient at closing file |
|
2645 | operations. Some platforms aren't very efficient at closing file | |
2639 | handles that have been written or appended to. By performing file closing |
|
2646 | handles that have been written or appended to. By performing file closing | |
2640 | on background threads, file write rate can increase substantially. |
|
2647 | on background threads, file write rate can increase substantially. | |
2641 | (default: true on Windows, false elsewhere) |
|
2648 | (default: true on Windows, false elsewhere) | |
2642 |
|
2649 | |||
2643 | ``backgroundcloseminfilecount`` |
|
2650 | ``backgroundcloseminfilecount`` | |
2644 | Minimum number of files required to trigger background file closing. |
|
2651 | Minimum number of files required to trigger background file closing. | |
2645 | Operations not writing this many files won't start background close |
|
2652 | Operations not writing this many files won't start background close | |
2646 | threads. |
|
2653 | threads. | |
2647 | (default: 2048) |
|
2654 | (default: 2048) | |
2648 |
|
2655 | |||
2649 | ``backgroundclosemaxqueue`` |
|
2656 | ``backgroundclosemaxqueue`` | |
2650 | The maximum number of opened file handles waiting to be closed in the |
|
2657 | The maximum number of opened file handles waiting to be closed in the | |
2651 | background. This option only has an effect if ``backgroundclose`` is |
|
2658 | background. This option only has an effect if ``backgroundclose`` is | |
2652 | enabled. |
|
2659 | enabled. | |
2653 | (default: 384) |
|
2660 | (default: 384) | |
2654 |
|
2661 | |||
2655 | ``backgroundclosethreadcount`` |
|
2662 | ``backgroundclosethreadcount`` | |
2656 | Number of threads to process background file closes. Only relevant if |
|
2663 | Number of threads to process background file closes. Only relevant if | |
2657 | ``backgroundclose`` is enabled. |
|
2664 | ``backgroundclose`` is enabled. | |
2658 | (default: 4) |
|
2665 | (default: 4) |
@@ -1,281 +1,285 b'' | |||||
1 | # hook.py - hook support for mercurial |
|
1 | # hook.py - hook support for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import os |
|
10 | import os | |
11 | import sys |
|
11 | import sys | |
12 |
|
12 | |||
13 | from .i18n import _ |
|
13 | from .i18n import _ | |
14 | from . import ( |
|
14 | from . import ( | |
15 | demandimport, |
|
15 | demandimport, | |
16 | encoding, |
|
16 | encoding, | |
17 | error, |
|
17 | error, | |
18 | extensions, |
|
18 | extensions, | |
19 | pycompat, |
|
19 | pycompat, | |
20 | util, |
|
20 | util, | |
21 | ) |
|
21 | ) | |
22 | from .utils import ( |
|
22 | from .utils import ( | |
23 | procutil, |
|
23 | procutil, | |
24 | stringutil, |
|
24 | stringutil, | |
25 | ) |
|
25 | ) | |
26 |
|
26 | |||
27 | def pythonhook(ui, repo, htype, hname, funcname, args, throw): |
|
27 | def pythonhook(ui, repo, htype, hname, funcname, args, throw): | |
28 | '''call python hook. hook is callable object, looked up as |
|
28 | '''call python hook. hook is callable object, looked up as | |
29 | name in python module. if callable returns "true", hook |
|
29 | name in python module. if callable returns "true", hook | |
30 | fails, else passes. if hook raises exception, treated as |
|
30 | fails, else passes. if hook raises exception, treated as | |
31 | hook failure. exception propagates if throw is "true". |
|
31 | hook failure. exception propagates if throw is "true". | |
32 |
|
32 | |||
33 | reason for "true" meaning "hook failed" is so that |
|
33 | reason for "true" meaning "hook failed" is so that | |
34 | unmodified commands (e.g. mercurial.commands.update) can |
|
34 | unmodified commands (e.g. mercurial.commands.update) can | |
35 | be run as hooks without wrappers to convert return values.''' |
|
35 | be run as hooks without wrappers to convert return values.''' | |
36 |
|
36 | |||
37 | if callable(funcname): |
|
37 | if callable(funcname): | |
38 | obj = funcname |
|
38 | obj = funcname | |
39 | funcname = pycompat.sysbytes(obj.__module__ + r"." + obj.__name__) |
|
39 | funcname = pycompat.sysbytes(obj.__module__ + r"." + obj.__name__) | |
40 | else: |
|
40 | else: | |
41 | d = funcname.rfind('.') |
|
41 | d = funcname.rfind('.') | |
42 | if d == -1: |
|
42 | if d == -1: | |
43 | raise error.HookLoadError( |
|
43 | raise error.HookLoadError( | |
44 | _('%s hook is invalid: "%s" not in a module') |
|
44 | _('%s hook is invalid: "%s" not in a module') | |
45 | % (hname, funcname)) |
|
45 | % (hname, funcname)) | |
46 | modname = funcname[:d] |
|
46 | modname = funcname[:d] | |
47 | oldpaths = sys.path |
|
47 | oldpaths = sys.path | |
48 | if procutil.mainfrozen(): |
|
48 | if procutil.mainfrozen(): | |
49 | # binary installs require sys.path manipulation |
|
49 | # binary installs require sys.path manipulation | |
50 | modpath, modfile = os.path.split(modname) |
|
50 | modpath, modfile = os.path.split(modname) | |
51 | if modpath and modfile: |
|
51 | if modpath and modfile: | |
52 | sys.path = sys.path[:] + [modpath] |
|
52 | sys.path = sys.path[:] + [modpath] | |
53 | modname = modfile |
|
53 | modname = modfile | |
54 | with demandimport.deactivated(): |
|
54 | with demandimport.deactivated(): | |
55 | try: |
|
55 | try: | |
56 | obj = __import__(pycompat.sysstr(modname)) |
|
56 | obj = __import__(pycompat.sysstr(modname)) | |
57 | except (ImportError, SyntaxError): |
|
57 | except (ImportError, SyntaxError): | |
58 | e1 = sys.exc_info() |
|
58 | e1 = sys.exc_info() | |
59 | try: |
|
59 | try: | |
60 | # extensions are loaded with hgext_ prefix |
|
60 | # extensions are loaded with hgext_ prefix | |
61 | obj = __import__(r"hgext_%s" % pycompat.sysstr(modname)) |
|
61 | obj = __import__(r"hgext_%s" % pycompat.sysstr(modname)) | |
62 | except (ImportError, SyntaxError): |
|
62 | except (ImportError, SyntaxError): | |
63 | e2 = sys.exc_info() |
|
63 | e2 = sys.exc_info() | |
64 | if ui.tracebackflag: |
|
64 | if ui.tracebackflag: | |
65 | ui.warn(_('exception from first failed import ' |
|
65 | ui.warn(_('exception from first failed import ' | |
66 | 'attempt:\n')) |
|
66 | 'attempt:\n')) | |
67 | ui.traceback(e1) |
|
67 | ui.traceback(e1) | |
68 | if ui.tracebackflag: |
|
68 | if ui.tracebackflag: | |
69 | ui.warn(_('exception from second failed import ' |
|
69 | ui.warn(_('exception from second failed import ' | |
70 | 'attempt:\n')) |
|
70 | 'attempt:\n')) | |
71 | ui.traceback(e2) |
|
71 | ui.traceback(e2) | |
72 |
|
72 | |||
73 | if not ui.tracebackflag: |
|
73 | if not ui.tracebackflag: | |
74 | tracebackhint = _( |
|
74 | tracebackhint = _( | |
75 | 'run with --traceback for stack trace') |
|
75 | 'run with --traceback for stack trace') | |
76 | else: |
|
76 | else: | |
77 | tracebackhint = None |
|
77 | tracebackhint = None | |
78 | raise error.HookLoadError( |
|
78 | raise error.HookLoadError( | |
79 | _('%s hook is invalid: import of "%s" failed') % |
|
79 | _('%s hook is invalid: import of "%s" failed') % | |
80 | (hname, modname), hint=tracebackhint) |
|
80 | (hname, modname), hint=tracebackhint) | |
81 | sys.path = oldpaths |
|
81 | sys.path = oldpaths | |
82 | try: |
|
82 | try: | |
83 | for p in funcname.split('.')[1:]: |
|
83 | for p in funcname.split('.')[1:]: | |
84 | obj = getattr(obj, p) |
|
84 | obj = getattr(obj, p) | |
85 | except AttributeError: |
|
85 | except AttributeError: | |
86 | raise error.HookLoadError( |
|
86 | raise error.HookLoadError( | |
87 | _('%s hook is invalid: "%s" is not defined') |
|
87 | _('%s hook is invalid: "%s" is not defined') | |
88 | % (hname, funcname)) |
|
88 | % (hname, funcname)) | |
89 | if not callable(obj): |
|
89 | if not callable(obj): | |
90 | raise error.HookLoadError( |
|
90 | raise error.HookLoadError( | |
91 | _('%s hook is invalid: "%s" is not callable') |
|
91 | _('%s hook is invalid: "%s" is not callable') | |
92 | % (hname, funcname)) |
|
92 | % (hname, funcname)) | |
93 |
|
93 | |||
94 | ui.note(_("calling hook %s: %s\n") % (hname, funcname)) |
|
94 | ui.note(_("calling hook %s: %s\n") % (hname, funcname)) | |
95 | starttime = util.timer() |
|
95 | starttime = util.timer() | |
96 |
|
96 | |||
97 | try: |
|
97 | try: | |
98 | r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args)) |
|
98 | r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args)) | |
99 | except Exception as exc: |
|
99 | except Exception as exc: | |
100 | if isinstance(exc, error.Abort): |
|
100 | if isinstance(exc, error.Abort): | |
101 | ui.warn(_('error: %s hook failed: %s\n') % |
|
101 | ui.warn(_('error: %s hook failed: %s\n') % | |
102 | (hname, exc.args[0])) |
|
102 | (hname, exc.args[0])) | |
103 | else: |
|
103 | else: | |
104 | ui.warn(_('error: %s hook raised an exception: ' |
|
104 | ui.warn(_('error: %s hook raised an exception: ' | |
105 | '%s\n') % (hname, encoding.strtolocal(str(exc)))) |
|
105 | '%s\n') % (hname, encoding.strtolocal(str(exc)))) | |
106 | if throw: |
|
106 | if throw: | |
107 | raise |
|
107 | raise | |
108 | if not ui.tracebackflag: |
|
108 | if not ui.tracebackflag: | |
109 | ui.warn(_('(run with --traceback for stack trace)\n')) |
|
109 | ui.warn(_('(run with --traceback for stack trace)\n')) | |
110 | ui.traceback() |
|
110 | ui.traceback() | |
111 | return True, True |
|
111 | return True, True | |
112 | finally: |
|
112 | finally: | |
113 | duration = util.timer() - starttime |
|
113 | duration = util.timer() - starttime | |
114 | ui.log('pythonhook', 'pythonhook-%s: %s finished in %0.2f seconds\n', |
|
114 | ui.log('pythonhook', 'pythonhook-%s: %s finished in %0.2f seconds\n', | |
115 | htype, funcname, duration) |
|
115 | htype, funcname, duration) | |
116 | if r: |
|
116 | if r: | |
117 | if throw: |
|
117 | if throw: | |
118 | raise error.HookAbort(_('%s hook failed') % hname) |
|
118 | raise error.HookAbort(_('%s hook failed') % hname) | |
119 | ui.warn(_('warning: %s hook failed\n') % hname) |
|
119 | ui.warn(_('warning: %s hook failed\n') % hname) | |
120 | return r, False |
|
120 | return r, False | |
121 |
|
121 | |||
122 | def _exthook(ui, repo, htype, name, cmd, args, throw): |
|
122 | def _exthook(ui, repo, htype, name, cmd, args, throw): | |
123 | starttime = util.timer() |
|
123 | starttime = util.timer() | |
124 | env = {} |
|
124 | env = {} | |
125 |
|
125 | |||
126 | # make in-memory changes visible to external process |
|
126 | # make in-memory changes visible to external process | |
127 | if repo is not None: |
|
127 | if repo is not None: | |
128 | tr = repo.currenttransaction() |
|
128 | tr = repo.currenttransaction() | |
129 | repo.dirstate.write(tr) |
|
129 | repo.dirstate.write(tr) | |
130 | if tr and tr.writepending(): |
|
130 | if tr and tr.writepending(): | |
131 | env['HG_PENDING'] = repo.root |
|
131 | env['HG_PENDING'] = repo.root | |
132 | env['HG_HOOKTYPE'] = htype |
|
132 | env['HG_HOOKTYPE'] = htype | |
133 | env['HG_HOOKNAME'] = name |
|
133 | env['HG_HOOKNAME'] = name | |
134 |
|
134 | |||
135 | for k, v in args.iteritems(): |
|
135 | for k, v in args.iteritems(): | |
136 | if callable(v): |
|
136 | if callable(v): | |
137 | v = v() |
|
137 | v = v() | |
138 | if isinstance(v, (dict, list)): |
|
138 | if isinstance(v, (dict, list)): | |
139 | v = stringutil.pprint(v) |
|
139 | v = stringutil.pprint(v) | |
140 | env['HG_' + k.upper()] = v |
|
140 | env['HG_' + k.upper()] = v | |
141 |
|
141 | |||
142 | cmd = procutil.shelltonative(cmd, env) |
|
142 | if ui.configbool('hooks', 'tonative.%s' % name, pycompat.iswindows): | |
|
143 | ui.note(_('converting hook "%s" to native\n') % name) | |||
|
144 | cmd = procutil.shelltonative(cmd, env) | |||
143 |
|
145 | |||
144 | ui.note(_("running hook %s: %s\n") % (name, cmd)) |
|
146 | ui.note(_("running hook %s: %s\n") % (name, cmd)) | |
145 |
|
147 | |||
146 | if repo: |
|
148 | if repo: | |
147 | cwd = repo.root |
|
149 | cwd = repo.root | |
148 | else: |
|
150 | else: | |
149 | cwd = pycompat.getcwd() |
|
151 | cwd = pycompat.getcwd() | |
150 | r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,)) |
|
152 | r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,)) | |
151 |
|
153 | |||
152 | duration = util.timer() - starttime |
|
154 | duration = util.timer() - starttime | |
153 | ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n', |
|
155 | ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n', | |
154 | name, cmd, duration) |
|
156 | name, cmd, duration) | |
155 | if r: |
|
157 | if r: | |
156 | desc = procutil.explainexit(r) |
|
158 | desc = procutil.explainexit(r) | |
157 | if throw: |
|
159 | if throw: | |
158 | raise error.HookAbort(_('%s hook %s') % (name, desc)) |
|
160 | raise error.HookAbort(_('%s hook %s') % (name, desc)) | |
159 | ui.warn(_('warning: %s hook %s\n') % (name, desc)) |
|
161 | ui.warn(_('warning: %s hook %s\n') % (name, desc)) | |
160 | return r |
|
162 | return r | |
161 |
|
163 | |||
162 | # represent an untrusted hook command |
|
164 | # represent an untrusted hook command | |
163 | _fromuntrusted = object() |
|
165 | _fromuntrusted = object() | |
164 |
|
166 | |||
165 | def _allhooks(ui): |
|
167 | def _allhooks(ui): | |
166 | """return a list of (hook-id, cmd) pairs sorted by priority""" |
|
168 | """return a list of (hook-id, cmd) pairs sorted by priority""" | |
167 | hooks = _hookitems(ui) |
|
169 | hooks = _hookitems(ui) | |
168 | # Be careful in this section, propagating the real commands from untrusted |
|
170 | # Be careful in this section, propagating the real commands from untrusted | |
169 | # sources would create a security vulnerability, make sure anything altered |
|
171 | # sources would create a security vulnerability, make sure anything altered | |
170 | # in that section uses "_fromuntrusted" as its command. |
|
172 | # in that section uses "_fromuntrusted" as its command. | |
171 | untrustedhooks = _hookitems(ui, _untrusted=True) |
|
173 | untrustedhooks = _hookitems(ui, _untrusted=True) | |
172 | for name, value in untrustedhooks.items(): |
|
174 | for name, value in untrustedhooks.items(): | |
173 | trustedvalue = hooks.get(name, (None, None, name, _fromuntrusted)) |
|
175 | trustedvalue = hooks.get(name, (None, None, name, _fromuntrusted)) | |
174 | if value != trustedvalue: |
|
176 | if value != trustedvalue: | |
175 | (lp, lo, lk, lv) = trustedvalue |
|
177 | (lp, lo, lk, lv) = trustedvalue | |
176 | hooks[name] = (lp, lo, lk, _fromuntrusted) |
|
178 | hooks[name] = (lp, lo, lk, _fromuntrusted) | |
177 | # (end of the security sensitive section) |
|
179 | # (end of the security sensitive section) | |
178 | return [(k, v) for p, o, k, v in sorted(hooks.values())] |
|
180 | return [(k, v) for p, o, k, v in sorted(hooks.values())] | |
179 |
|
181 | |||
180 | def _hookitems(ui, _untrusted=False): |
|
182 | def _hookitems(ui, _untrusted=False): | |
181 | """return all hooks items ready to be sorted""" |
|
183 | """return all hooks items ready to be sorted""" | |
182 | hooks = {} |
|
184 | hooks = {} | |
183 | for name, cmd in ui.configitems('hooks', untrusted=_untrusted): |
|
185 | for name, cmd in ui.configitems('hooks', untrusted=_untrusted): | |
184 |
if |
|
186 | if name.startswith('priority.') or name.startswith('tonative.'): | |
185 | priority = ui.configint('hooks', 'priority.%s' % name, 0) |
|
187 | continue | |
186 | hooks[name] = (-priority, len(hooks), name, cmd) |
|
188 | ||
|
189 | priority = ui.configint('hooks', 'priority.%s' % name, 0) | |||
|
190 | hooks[name] = (-priority, len(hooks), name, cmd) | |||
187 | return hooks |
|
191 | return hooks | |
188 |
|
192 | |||
189 | _redirect = False |
|
193 | _redirect = False | |
190 | def redirect(state): |
|
194 | def redirect(state): | |
191 | global _redirect |
|
195 | global _redirect | |
192 | _redirect = state |
|
196 | _redirect = state | |
193 |
|
197 | |||
194 | def hashook(ui, htype): |
|
198 | def hashook(ui, htype): | |
195 | """return True if a hook is configured for 'htype'""" |
|
199 | """return True if a hook is configured for 'htype'""" | |
196 | if not ui.callhooks: |
|
200 | if not ui.callhooks: | |
197 | return False |
|
201 | return False | |
198 | for hname, cmd in _allhooks(ui): |
|
202 | for hname, cmd in _allhooks(ui): | |
199 | if hname.split('.')[0] == htype and cmd: |
|
203 | if hname.split('.')[0] == htype and cmd: | |
200 | return True |
|
204 | return True | |
201 | return False |
|
205 | return False | |
202 |
|
206 | |||
203 | def hook(ui, repo, htype, throw=False, **args): |
|
207 | def hook(ui, repo, htype, throw=False, **args): | |
204 | if not ui.callhooks: |
|
208 | if not ui.callhooks: | |
205 | return False |
|
209 | return False | |
206 |
|
210 | |||
207 | hooks = [] |
|
211 | hooks = [] | |
208 | for hname, cmd in _allhooks(ui): |
|
212 | for hname, cmd in _allhooks(ui): | |
209 | if hname.split('.')[0] == htype and cmd: |
|
213 | if hname.split('.')[0] == htype and cmd: | |
210 | hooks.append((hname, cmd)) |
|
214 | hooks.append((hname, cmd)) | |
211 |
|
215 | |||
212 | res = runhooks(ui, repo, htype, hooks, throw=throw, **args) |
|
216 | res = runhooks(ui, repo, htype, hooks, throw=throw, **args) | |
213 | r = False |
|
217 | r = False | |
214 | for hname, cmd in hooks: |
|
218 | for hname, cmd in hooks: | |
215 | r = res[hname][0] or r |
|
219 | r = res[hname][0] or r | |
216 | return r |
|
220 | return r | |
217 |
|
221 | |||
218 | def runhooks(ui, repo, htype, hooks, throw=False, **args): |
|
222 | def runhooks(ui, repo, htype, hooks, throw=False, **args): | |
219 | args = pycompat.byteskwargs(args) |
|
223 | args = pycompat.byteskwargs(args) | |
220 | res = {} |
|
224 | res = {} | |
221 | oldstdout = -1 |
|
225 | oldstdout = -1 | |
222 |
|
226 | |||
223 | try: |
|
227 | try: | |
224 | for hname, cmd in hooks: |
|
228 | for hname, cmd in hooks: | |
225 | if oldstdout == -1 and _redirect: |
|
229 | if oldstdout == -1 and _redirect: | |
226 | try: |
|
230 | try: | |
227 | stdoutno = procutil.stdout.fileno() |
|
231 | stdoutno = procutil.stdout.fileno() | |
228 | stderrno = procutil.stderr.fileno() |
|
232 | stderrno = procutil.stderr.fileno() | |
229 | # temporarily redirect stdout to stderr, if possible |
|
233 | # temporarily redirect stdout to stderr, if possible | |
230 | if stdoutno >= 0 and stderrno >= 0: |
|
234 | if stdoutno >= 0 and stderrno >= 0: | |
231 | procutil.stdout.flush() |
|
235 | procutil.stdout.flush() | |
232 | oldstdout = os.dup(stdoutno) |
|
236 | oldstdout = os.dup(stdoutno) | |
233 | os.dup2(stderrno, stdoutno) |
|
237 | os.dup2(stderrno, stdoutno) | |
234 | except (OSError, AttributeError): |
|
238 | except (OSError, AttributeError): | |
235 | # files seem to be bogus, give up on redirecting (WSGI, etc) |
|
239 | # files seem to be bogus, give up on redirecting (WSGI, etc) | |
236 | pass |
|
240 | pass | |
237 |
|
241 | |||
238 | if cmd is _fromuntrusted: |
|
242 | if cmd is _fromuntrusted: | |
239 | if throw: |
|
243 | if throw: | |
240 | raise error.HookAbort( |
|
244 | raise error.HookAbort( | |
241 | _('untrusted hook %s not executed') % hname, |
|
245 | _('untrusted hook %s not executed') % hname, | |
242 | hint = _("see 'hg help config.trusted'")) |
|
246 | hint = _("see 'hg help config.trusted'")) | |
243 | ui.warn(_('warning: untrusted hook %s not executed\n') % hname) |
|
247 | ui.warn(_('warning: untrusted hook %s not executed\n') % hname) | |
244 | r = 1 |
|
248 | r = 1 | |
245 | raised = False |
|
249 | raised = False | |
246 | elif callable(cmd): |
|
250 | elif callable(cmd): | |
247 | r, raised = pythonhook(ui, repo, htype, hname, cmd, args, |
|
251 | r, raised = pythonhook(ui, repo, htype, hname, cmd, args, | |
248 | throw) |
|
252 | throw) | |
249 | elif cmd.startswith('python:'): |
|
253 | elif cmd.startswith('python:'): | |
250 | if cmd.count(':') >= 2: |
|
254 | if cmd.count(':') >= 2: | |
251 | path, cmd = cmd[7:].rsplit(':', 1) |
|
255 | path, cmd = cmd[7:].rsplit(':', 1) | |
252 | path = util.expandpath(path) |
|
256 | path = util.expandpath(path) | |
253 | if repo: |
|
257 | if repo: | |
254 | path = os.path.join(repo.root, path) |
|
258 | path = os.path.join(repo.root, path) | |
255 | try: |
|
259 | try: | |
256 | mod = extensions.loadpath(path, 'hghook.%s' % hname) |
|
260 | mod = extensions.loadpath(path, 'hghook.%s' % hname) | |
257 | except Exception: |
|
261 | except Exception: | |
258 | ui.write(_("loading %s hook failed:\n") % hname) |
|
262 | ui.write(_("loading %s hook failed:\n") % hname) | |
259 | raise |
|
263 | raise | |
260 | hookfn = getattr(mod, cmd) |
|
264 | hookfn = getattr(mod, cmd) | |
261 | else: |
|
265 | else: | |
262 | hookfn = cmd[7:].strip() |
|
266 | hookfn = cmd[7:].strip() | |
263 | r, raised = pythonhook(ui, repo, htype, hname, hookfn, args, |
|
267 | r, raised = pythonhook(ui, repo, htype, hname, hookfn, args, | |
264 | throw) |
|
268 | throw) | |
265 | else: |
|
269 | else: | |
266 | r = _exthook(ui, repo, htype, hname, cmd, args, throw) |
|
270 | r = _exthook(ui, repo, htype, hname, cmd, args, throw) | |
267 | raised = False |
|
271 | raised = False | |
268 |
|
272 | |||
269 | res[hname] = r, raised |
|
273 | res[hname] = r, raised | |
270 | finally: |
|
274 | finally: | |
271 | # The stderr is fully buffered on Windows when connected to a pipe. |
|
275 | # The stderr is fully buffered on Windows when connected to a pipe. | |
272 | # A forcible flush is required to make small stderr data in the |
|
276 | # A forcible flush is required to make small stderr data in the | |
273 | # remote side available to the client immediately. |
|
277 | # remote side available to the client immediately. | |
274 | procutil.stderr.flush() |
|
278 | procutil.stderr.flush() | |
275 |
|
279 | |||
276 | if _redirect and oldstdout >= 0: |
|
280 | if _redirect and oldstdout >= 0: | |
277 | procutil.stdout.flush() # write hook output to stderr fd |
|
281 | procutil.stdout.flush() # write hook output to stderr fd | |
278 | os.dup2(oldstdout, stdoutno) |
|
282 | os.dup2(oldstdout, stdoutno) | |
279 | os.close(oldstdout) |
|
283 | os.close(oldstdout) | |
280 |
|
284 | |||
281 | return res |
|
285 | return res |
@@ -1,1277 +1,1279 b'' | |||||
1 | #testcases b2-pushkey b2-binary |
|
1 | #testcases b2-pushkey b2-binary | |
2 |
|
2 | |||
3 | #if b2-pushkey |
|
3 | #if b2-pushkey | |
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
5 | > [devel] | |
6 | > legacy.exchange=bookmarks |
|
6 | > legacy.exchange=bookmarks | |
7 | > EOF |
|
7 | > EOF | |
8 | #endif |
|
8 | #endif | |
9 |
|
9 | |||
10 | #require serve |
|
10 | #require serve | |
11 |
|
11 | |||
12 | $ cat << EOF >> $HGRCPATH |
|
12 | $ cat << EOF >> $HGRCPATH | |
13 | > [ui] |
|
13 | > [ui] | |
14 | > logtemplate={rev}:{node|short} {desc|firstline} |
|
14 | > logtemplate={rev}:{node|short} {desc|firstline} | |
15 | > [phases] |
|
15 | > [phases] | |
16 | > publish=False |
|
16 | > publish=False | |
17 | > [experimental] |
|
17 | > [experimental] | |
18 | > evolution.createmarkers=True |
|
18 | > evolution.createmarkers=True | |
19 | > evolution.exchange=True |
|
19 | > evolution.exchange=True | |
20 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 | $ cat > $TESTTMP/hook.sh <<'EOF' |
|
22 | $ cat > $TESTTMP/hook.sh <<'EOF' | |
23 | > echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE" |
|
23 | > echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE" | |
24 | > EOF |
|
24 | > EOF | |
25 | $ TESTHOOK="hooks.txnclose-bookmark.test=sh $TESTTMP/hook.sh" |
|
25 | $ TESTHOOK="hooks.txnclose-bookmark.test=sh $TESTTMP/hook.sh" | |
26 |
|
26 | |||
27 | initialize |
|
27 | initialize | |
28 |
|
28 | |||
29 | $ hg init a |
|
29 | $ hg init a | |
30 | $ cd a |
|
30 | $ cd a | |
31 | $ echo 'test' > test |
|
31 | $ echo 'test' > test | |
32 | $ hg commit -Am'test' |
|
32 | $ hg commit -Am'test' | |
33 | adding test |
|
33 | adding test | |
34 |
|
34 | |||
35 | set bookmarks |
|
35 | set bookmarks | |
36 |
|
36 | |||
37 | $ hg bookmark X |
|
37 | $ hg bookmark X | |
38 | $ hg bookmark Y |
|
38 | $ hg bookmark Y | |
39 | $ hg bookmark Z |
|
39 | $ hg bookmark Z | |
40 |
|
40 | |||
41 | import bookmark by name |
|
41 | import bookmark by name | |
42 |
|
42 | |||
43 | $ hg init ../b |
|
43 | $ hg init ../b | |
44 | $ cd ../b |
|
44 | $ cd ../b | |
45 | $ hg book Y |
|
45 | $ hg book Y | |
46 | $ hg book |
|
46 | $ hg book | |
47 | * Y -1:000000000000 |
|
47 | * Y -1:000000000000 | |
48 | $ hg pull ../a --config "$TESTHOOK" |
|
48 | $ hg pull ../a --config "$TESTHOOK" | |
49 | pulling from ../a |
|
49 | pulling from ../a | |
50 | requesting all changes |
|
50 | requesting all changes | |
51 | adding changesets |
|
51 | adding changesets | |
52 | adding manifests |
|
52 | adding manifests | |
53 | adding file changes |
|
53 | adding file changes | |
54 | added 1 changesets with 1 changes to 1 files |
|
54 | added 1 changesets with 1 changes to 1 files | |
55 | adding remote bookmark X |
|
55 | adding remote bookmark X | |
56 | updating bookmark Y |
|
56 | updating bookmark Y | |
57 | adding remote bookmark Z |
|
57 | adding remote bookmark Z | |
58 | new changesets 4e3505fd9583 |
|
58 | new changesets 4e3505fd9583 | |
59 | test-hook-bookmark: X: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
59 | test-hook-bookmark: X: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
60 | test-hook-bookmark: Y: 0000000000000000000000000000000000000000 -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
60 | test-hook-bookmark: Y: 0000000000000000000000000000000000000000 -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
61 | test-hook-bookmark: Z: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
61 | test-hook-bookmark: Z: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
62 | (run 'hg update' to get a working copy) |
|
62 | (run 'hg update' to get a working copy) | |
63 | $ hg bookmarks |
|
63 | $ hg bookmarks | |
64 | X 0:4e3505fd9583 |
|
64 | X 0:4e3505fd9583 | |
65 | * Y 0:4e3505fd9583 |
|
65 | * Y 0:4e3505fd9583 | |
66 | Z 0:4e3505fd9583 |
|
66 | Z 0:4e3505fd9583 | |
67 | $ hg debugpushkey ../a namespaces |
|
67 | $ hg debugpushkey ../a namespaces | |
68 | bookmarks |
|
68 | bookmarks | |
69 | namespaces |
|
69 | namespaces | |
70 | obsolete |
|
70 | obsolete | |
71 | phases |
|
71 | phases | |
72 | $ hg debugpushkey ../a bookmarks |
|
72 | $ hg debugpushkey ../a bookmarks | |
73 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
73 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
74 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
74 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
75 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
75 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
76 |
|
76 | |||
77 | delete the bookmark to re-pull it |
|
77 | delete the bookmark to re-pull it | |
78 |
|
78 | |||
79 | $ hg book -d X |
|
79 | $ hg book -d X | |
80 | $ hg pull -B X ../a |
|
80 | $ hg pull -B X ../a | |
81 | pulling from ../a |
|
81 | pulling from ../a | |
82 | no changes found |
|
82 | no changes found | |
83 | adding remote bookmark X |
|
83 | adding remote bookmark X | |
84 |
|
84 | |||
85 | finally no-op pull |
|
85 | finally no-op pull | |
86 |
|
86 | |||
87 | $ hg pull -B X ../a |
|
87 | $ hg pull -B X ../a | |
88 | pulling from ../a |
|
88 | pulling from ../a | |
89 | no changes found |
|
89 | no changes found | |
90 | $ hg bookmark |
|
90 | $ hg bookmark | |
91 | X 0:4e3505fd9583 |
|
91 | X 0:4e3505fd9583 | |
92 | * Y 0:4e3505fd9583 |
|
92 | * Y 0:4e3505fd9583 | |
93 | Z 0:4e3505fd9583 |
|
93 | Z 0:4e3505fd9583 | |
94 |
|
94 | |||
95 | export bookmark by name |
|
95 | export bookmark by name | |
96 |
|
96 | |||
97 | $ hg bookmark W |
|
97 | $ hg bookmark W | |
98 | $ hg bookmark foo |
|
98 | $ hg bookmark foo | |
99 | $ hg bookmark foobar |
|
99 | $ hg bookmark foobar | |
100 | $ hg push -B W ../a |
|
100 | $ hg push -B W ../a | |
101 | pushing to ../a |
|
101 | pushing to ../a | |
102 | searching for changes |
|
102 | searching for changes | |
103 | no changes found |
|
103 | no changes found | |
104 | exporting bookmark W |
|
104 | exporting bookmark W | |
105 | [1] |
|
105 | [1] | |
106 | $ hg -R ../a bookmarks |
|
106 | $ hg -R ../a bookmarks | |
107 | W -1:000000000000 |
|
107 | W -1:000000000000 | |
108 | X 0:4e3505fd9583 |
|
108 | X 0:4e3505fd9583 | |
109 | Y 0:4e3505fd9583 |
|
109 | Y 0:4e3505fd9583 | |
110 | * Z 0:4e3505fd9583 |
|
110 | * Z 0:4e3505fd9583 | |
111 |
|
111 | |||
112 | delete a remote bookmark |
|
112 | delete a remote bookmark | |
113 |
|
113 | |||
114 | $ hg book -d W |
|
114 | $ hg book -d W | |
115 |
|
115 | |||
116 | #if b2-pushkey |
|
116 | #if b2-pushkey | |
117 |
|
117 | |||
118 | $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes |
|
118 | $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes | |
119 | pushing to ../a |
|
119 | pushing to ../a | |
120 | query 1; heads |
|
120 | query 1; heads | |
121 | searching for changes |
|
121 | searching for changes | |
122 | all remote heads known locally |
|
122 | all remote heads known locally | |
123 | listing keys for "phases" |
|
123 | listing keys for "phases" | |
124 | checking for updated bookmarks |
|
124 | checking for updated bookmarks | |
125 | listing keys for "bookmarks" |
|
125 | listing keys for "bookmarks" | |
126 | no changes found |
|
126 | no changes found | |
127 | bundle2-output-bundle: "HG20", 4 parts total |
|
127 | bundle2-output-bundle: "HG20", 4 parts total | |
128 | bundle2-output: start emission of HG20 stream |
|
128 | bundle2-output: start emission of HG20 stream | |
129 | bundle2-output: bundle parameter: |
|
129 | bundle2-output: bundle parameter: | |
130 | bundle2-output: start of parts |
|
130 | bundle2-output: start of parts | |
131 | bundle2-output: bundle part: "replycaps" |
|
131 | bundle2-output: bundle part: "replycaps" | |
132 | bundle2-output-part: "replycaps" 222 bytes payload |
|
132 | bundle2-output-part: "replycaps" 222 bytes payload | |
133 | bundle2-output: part 0: "REPLYCAPS" |
|
133 | bundle2-output: part 0: "REPLYCAPS" | |
134 | bundle2-output: header chunk size: 16 |
|
134 | bundle2-output: header chunk size: 16 | |
135 | bundle2-output: payload chunk size: 222 |
|
135 | bundle2-output: payload chunk size: 222 | |
136 | bundle2-output: closing payload chunk |
|
136 | bundle2-output: closing payload chunk | |
137 | bundle2-output: bundle part: "check:bookmarks" |
|
137 | bundle2-output: bundle part: "check:bookmarks" | |
138 | bundle2-output-part: "check:bookmarks" 23 bytes payload |
|
138 | bundle2-output-part: "check:bookmarks" 23 bytes payload | |
139 | bundle2-output: part 1: "CHECK:BOOKMARKS" |
|
139 | bundle2-output: part 1: "CHECK:BOOKMARKS" | |
140 | bundle2-output: header chunk size: 22 |
|
140 | bundle2-output: header chunk size: 22 | |
141 | bundle2-output: payload chunk size: 23 |
|
141 | bundle2-output: payload chunk size: 23 | |
142 | bundle2-output: closing payload chunk |
|
142 | bundle2-output: closing payload chunk | |
143 | bundle2-output: bundle part: "check:phases" |
|
143 | bundle2-output: bundle part: "check:phases" | |
144 | bundle2-output-part: "check:phases" 48 bytes payload |
|
144 | bundle2-output-part: "check:phases" 48 bytes payload | |
145 | bundle2-output: part 2: "CHECK:PHASES" |
|
145 | bundle2-output: part 2: "CHECK:PHASES" | |
146 | bundle2-output: header chunk size: 19 |
|
146 | bundle2-output: header chunk size: 19 | |
147 | bundle2-output: payload chunk size: 48 |
|
147 | bundle2-output: payload chunk size: 48 | |
148 | bundle2-output: closing payload chunk |
|
148 | bundle2-output: closing payload chunk | |
149 | bundle2-output: bundle part: "pushkey" |
|
149 | bundle2-output: bundle part: "pushkey" | |
150 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
150 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
151 | bundle2-output: part 3: "PUSHKEY" |
|
151 | bundle2-output: part 3: "PUSHKEY" | |
152 | bundle2-output: header chunk size: 90 |
|
152 | bundle2-output: header chunk size: 90 | |
153 | bundle2-output: closing payload chunk |
|
153 | bundle2-output: closing payload chunk | |
154 | bundle2-output: end of bundle |
|
154 | bundle2-output: end of bundle | |
155 | bundle2-input: start processing of HG20 stream |
|
155 | bundle2-input: start processing of HG20 stream | |
156 | bundle2-input: reading bundle2 stream parameters |
|
156 | bundle2-input: reading bundle2 stream parameters | |
157 | bundle2-input-bundle: with-transaction |
|
157 | bundle2-input-bundle: with-transaction | |
158 | bundle2-input: start extraction of bundle2 parts |
|
158 | bundle2-input: start extraction of bundle2 parts | |
159 | bundle2-input: part header size: 16 |
|
159 | bundle2-input: part header size: 16 | |
160 | bundle2-input: part type: "REPLYCAPS" |
|
160 | bundle2-input: part type: "REPLYCAPS" | |
161 | bundle2-input: part id: "0" |
|
161 | bundle2-input: part id: "0" | |
162 | bundle2-input: part parameters: 0 |
|
162 | bundle2-input: part parameters: 0 | |
163 | bundle2-input: found a handler for part replycaps |
|
163 | bundle2-input: found a handler for part replycaps | |
164 | bundle2-input-part: "replycaps" supported |
|
164 | bundle2-input-part: "replycaps" supported | |
165 | bundle2-input: payload chunk size: 222 |
|
165 | bundle2-input: payload chunk size: 222 | |
166 | bundle2-input: payload chunk size: 0 |
|
166 | bundle2-input: payload chunk size: 0 | |
167 | bundle2-input-part: total payload size 222 |
|
167 | bundle2-input-part: total payload size 222 | |
168 | bundle2-input: part header size: 22 |
|
168 | bundle2-input: part header size: 22 | |
169 | bundle2-input: part type: "CHECK:BOOKMARKS" |
|
169 | bundle2-input: part type: "CHECK:BOOKMARKS" | |
170 | bundle2-input: part id: "1" |
|
170 | bundle2-input: part id: "1" | |
171 | bundle2-input: part parameters: 0 |
|
171 | bundle2-input: part parameters: 0 | |
172 | bundle2-input: found a handler for part check:bookmarks |
|
172 | bundle2-input: found a handler for part check:bookmarks | |
173 | bundle2-input-part: "check:bookmarks" supported |
|
173 | bundle2-input-part: "check:bookmarks" supported | |
174 | bundle2-input: payload chunk size: 23 |
|
174 | bundle2-input: payload chunk size: 23 | |
175 | bundle2-input: payload chunk size: 0 |
|
175 | bundle2-input: payload chunk size: 0 | |
176 | bundle2-input-part: total payload size 23 |
|
176 | bundle2-input-part: total payload size 23 | |
177 | bundle2-input: part header size: 19 |
|
177 | bundle2-input: part header size: 19 | |
178 | bundle2-input: part type: "CHECK:PHASES" |
|
178 | bundle2-input: part type: "CHECK:PHASES" | |
179 | bundle2-input: part id: "2" |
|
179 | bundle2-input: part id: "2" | |
180 | bundle2-input: part parameters: 0 |
|
180 | bundle2-input: part parameters: 0 | |
181 | bundle2-input: found a handler for part check:phases |
|
181 | bundle2-input: found a handler for part check:phases | |
182 | bundle2-input-part: "check:phases" supported |
|
182 | bundle2-input-part: "check:phases" supported | |
183 | bundle2-input: payload chunk size: 48 |
|
183 | bundle2-input: payload chunk size: 48 | |
184 | bundle2-input: payload chunk size: 0 |
|
184 | bundle2-input: payload chunk size: 0 | |
185 | bundle2-input-part: total payload size 48 |
|
185 | bundle2-input-part: total payload size 48 | |
186 | bundle2-input: part header size: 90 |
|
186 | bundle2-input: part header size: 90 | |
187 | bundle2-input: part type: "PUSHKEY" |
|
187 | bundle2-input: part type: "PUSHKEY" | |
188 | bundle2-input: part id: "3" |
|
188 | bundle2-input: part id: "3" | |
189 | bundle2-input: part parameters: 4 |
|
189 | bundle2-input: part parameters: 4 | |
190 | bundle2-input: found a handler for part pushkey |
|
190 | bundle2-input: found a handler for part pushkey | |
191 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
191 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
192 | pushing key for "bookmarks:W" |
|
192 | pushing key for "bookmarks:W" | |
193 | bundle2-input: payload chunk size: 0 |
|
193 | bundle2-input: payload chunk size: 0 | |
194 | bundle2-input: part header size: 0 |
|
194 | bundle2-input: part header size: 0 | |
195 | bundle2-input: end of bundle2 stream |
|
195 | bundle2-input: end of bundle2 stream | |
196 | bundle2-input-bundle: 3 parts total |
|
196 | bundle2-input-bundle: 3 parts total | |
|
197 | converting hook "txnclose-bookmark.test" to native (windows !) | |||
197 | running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh |
|
198 | running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh | |
198 | test-hook-bookmark: W: 0000000000000000000000000000000000000000 -> |
|
199 | test-hook-bookmark: W: 0000000000000000000000000000000000000000 -> | |
199 | bundle2-output-bundle: "HG20", 1 parts total |
|
200 | bundle2-output-bundle: "HG20", 1 parts total | |
200 | bundle2-output: start emission of HG20 stream |
|
201 | bundle2-output: start emission of HG20 stream | |
201 | bundle2-output: bundle parameter: |
|
202 | bundle2-output: bundle parameter: | |
202 | bundle2-output: start of parts |
|
203 | bundle2-output: start of parts | |
203 | bundle2-output: bundle part: "reply:pushkey" |
|
204 | bundle2-output: bundle part: "reply:pushkey" | |
204 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
205 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
205 | bundle2-output: part 0: "REPLY:PUSHKEY" |
|
206 | bundle2-output: part 0: "REPLY:PUSHKEY" | |
206 | bundle2-output: header chunk size: 43 |
|
207 | bundle2-output: header chunk size: 43 | |
207 | bundle2-output: closing payload chunk |
|
208 | bundle2-output: closing payload chunk | |
208 | bundle2-output: end of bundle |
|
209 | bundle2-output: end of bundle | |
209 | bundle2-input: start processing of HG20 stream |
|
210 | bundle2-input: start processing of HG20 stream | |
210 | bundle2-input: reading bundle2 stream parameters |
|
211 | bundle2-input: reading bundle2 stream parameters | |
211 | bundle2-input-bundle: no-transaction |
|
212 | bundle2-input-bundle: no-transaction | |
212 | bundle2-input: start extraction of bundle2 parts |
|
213 | bundle2-input: start extraction of bundle2 parts | |
213 | bundle2-input: part header size: 43 |
|
214 | bundle2-input: part header size: 43 | |
214 | bundle2-input: part type: "REPLY:PUSHKEY" |
|
215 | bundle2-input: part type: "REPLY:PUSHKEY" | |
215 | bundle2-input: part id: "0" |
|
216 | bundle2-input: part id: "0" | |
216 | bundle2-input: part parameters: 2 |
|
217 | bundle2-input: part parameters: 2 | |
217 | bundle2-input: found a handler for part reply:pushkey |
|
218 | bundle2-input: found a handler for part reply:pushkey | |
218 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
219 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
219 | bundle2-input: payload chunk size: 0 |
|
220 | bundle2-input: payload chunk size: 0 | |
220 | bundle2-input: part header size: 0 |
|
221 | bundle2-input: part header size: 0 | |
221 | bundle2-input: end of bundle2 stream |
|
222 | bundle2-input: end of bundle2 stream | |
222 | bundle2-input-bundle: 0 parts total |
|
223 | bundle2-input-bundle: 0 parts total | |
223 | deleting remote bookmark W |
|
224 | deleting remote bookmark W | |
224 | listing keys for "phases" |
|
225 | listing keys for "phases" | |
225 | [1] |
|
226 | [1] | |
226 |
|
227 | |||
227 | #endif |
|
228 | #endif | |
228 | #if b2-binary |
|
229 | #if b2-binary | |
229 |
|
230 | |||
230 | $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes |
|
231 | $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes | |
231 | pushing to ../a |
|
232 | pushing to ../a | |
232 | query 1; heads |
|
233 | query 1; heads | |
233 | searching for changes |
|
234 | searching for changes | |
234 | all remote heads known locally |
|
235 | all remote heads known locally | |
235 | listing keys for "phases" |
|
236 | listing keys for "phases" | |
236 | checking for updated bookmarks |
|
237 | checking for updated bookmarks | |
237 | listing keys for "bookmarks" |
|
238 | listing keys for "bookmarks" | |
238 | no changes found |
|
239 | no changes found | |
239 | bundle2-output-bundle: "HG20", 4 parts total |
|
240 | bundle2-output-bundle: "HG20", 4 parts total | |
240 | bundle2-output: start emission of HG20 stream |
|
241 | bundle2-output: start emission of HG20 stream | |
241 | bundle2-output: bundle parameter: |
|
242 | bundle2-output: bundle parameter: | |
242 | bundle2-output: start of parts |
|
243 | bundle2-output: start of parts | |
243 | bundle2-output: bundle part: "replycaps" |
|
244 | bundle2-output: bundle part: "replycaps" | |
244 | bundle2-output-part: "replycaps" 222 bytes payload |
|
245 | bundle2-output-part: "replycaps" 222 bytes payload | |
245 | bundle2-output: part 0: "REPLYCAPS" |
|
246 | bundle2-output: part 0: "REPLYCAPS" | |
246 | bundle2-output: header chunk size: 16 |
|
247 | bundle2-output: header chunk size: 16 | |
247 | bundle2-output: payload chunk size: 222 |
|
248 | bundle2-output: payload chunk size: 222 | |
248 | bundle2-output: closing payload chunk |
|
249 | bundle2-output: closing payload chunk | |
249 | bundle2-output: bundle part: "check:bookmarks" |
|
250 | bundle2-output: bundle part: "check:bookmarks" | |
250 | bundle2-output-part: "check:bookmarks" 23 bytes payload |
|
251 | bundle2-output-part: "check:bookmarks" 23 bytes payload | |
251 | bundle2-output: part 1: "CHECK:BOOKMARKS" |
|
252 | bundle2-output: part 1: "CHECK:BOOKMARKS" | |
252 | bundle2-output: header chunk size: 22 |
|
253 | bundle2-output: header chunk size: 22 | |
253 | bundle2-output: payload chunk size: 23 |
|
254 | bundle2-output: payload chunk size: 23 | |
254 | bundle2-output: closing payload chunk |
|
255 | bundle2-output: closing payload chunk | |
255 | bundle2-output: bundle part: "check:phases" |
|
256 | bundle2-output: bundle part: "check:phases" | |
256 | bundle2-output-part: "check:phases" 48 bytes payload |
|
257 | bundle2-output-part: "check:phases" 48 bytes payload | |
257 | bundle2-output: part 2: "CHECK:PHASES" |
|
258 | bundle2-output: part 2: "CHECK:PHASES" | |
258 | bundle2-output: header chunk size: 19 |
|
259 | bundle2-output: header chunk size: 19 | |
259 | bundle2-output: payload chunk size: 48 |
|
260 | bundle2-output: payload chunk size: 48 | |
260 | bundle2-output: closing payload chunk |
|
261 | bundle2-output: closing payload chunk | |
261 | bundle2-output: bundle part: "bookmarks" |
|
262 | bundle2-output: bundle part: "bookmarks" | |
262 | bundle2-output-part: "bookmarks" 23 bytes payload |
|
263 | bundle2-output-part: "bookmarks" 23 bytes payload | |
263 | bundle2-output: part 3: "BOOKMARKS" |
|
264 | bundle2-output: part 3: "BOOKMARKS" | |
264 | bundle2-output: header chunk size: 16 |
|
265 | bundle2-output: header chunk size: 16 | |
265 | bundle2-output: payload chunk size: 23 |
|
266 | bundle2-output: payload chunk size: 23 | |
266 | bundle2-output: closing payload chunk |
|
267 | bundle2-output: closing payload chunk | |
267 | bundle2-output: end of bundle |
|
268 | bundle2-output: end of bundle | |
268 | bundle2-input: start processing of HG20 stream |
|
269 | bundle2-input: start processing of HG20 stream | |
269 | bundle2-input: reading bundle2 stream parameters |
|
270 | bundle2-input: reading bundle2 stream parameters | |
270 | bundle2-input-bundle: with-transaction |
|
271 | bundle2-input-bundle: with-transaction | |
271 | bundle2-input: start extraction of bundle2 parts |
|
272 | bundle2-input: start extraction of bundle2 parts | |
272 | bundle2-input: part header size: 16 |
|
273 | bundle2-input: part header size: 16 | |
273 | bundle2-input: part type: "REPLYCAPS" |
|
274 | bundle2-input: part type: "REPLYCAPS" | |
274 | bundle2-input: part id: "0" |
|
275 | bundle2-input: part id: "0" | |
275 | bundle2-input: part parameters: 0 |
|
276 | bundle2-input: part parameters: 0 | |
276 | bundle2-input: found a handler for part replycaps |
|
277 | bundle2-input: found a handler for part replycaps | |
277 | bundle2-input-part: "replycaps" supported |
|
278 | bundle2-input-part: "replycaps" supported | |
278 | bundle2-input: payload chunk size: 222 |
|
279 | bundle2-input: payload chunk size: 222 | |
279 | bundle2-input: payload chunk size: 0 |
|
280 | bundle2-input: payload chunk size: 0 | |
280 | bundle2-input-part: total payload size 222 |
|
281 | bundle2-input-part: total payload size 222 | |
281 | bundle2-input: part header size: 22 |
|
282 | bundle2-input: part header size: 22 | |
282 | bundle2-input: part type: "CHECK:BOOKMARKS" |
|
283 | bundle2-input: part type: "CHECK:BOOKMARKS" | |
283 | bundle2-input: part id: "1" |
|
284 | bundle2-input: part id: "1" | |
284 | bundle2-input: part parameters: 0 |
|
285 | bundle2-input: part parameters: 0 | |
285 | bundle2-input: found a handler for part check:bookmarks |
|
286 | bundle2-input: found a handler for part check:bookmarks | |
286 | bundle2-input-part: "check:bookmarks" supported |
|
287 | bundle2-input-part: "check:bookmarks" supported | |
287 | bundle2-input: payload chunk size: 23 |
|
288 | bundle2-input: payload chunk size: 23 | |
288 | bundle2-input: payload chunk size: 0 |
|
289 | bundle2-input: payload chunk size: 0 | |
289 | bundle2-input-part: total payload size 23 |
|
290 | bundle2-input-part: total payload size 23 | |
290 | bundle2-input: part header size: 19 |
|
291 | bundle2-input: part header size: 19 | |
291 | bundle2-input: part type: "CHECK:PHASES" |
|
292 | bundle2-input: part type: "CHECK:PHASES" | |
292 | bundle2-input: part id: "2" |
|
293 | bundle2-input: part id: "2" | |
293 | bundle2-input: part parameters: 0 |
|
294 | bundle2-input: part parameters: 0 | |
294 | bundle2-input: found a handler for part check:phases |
|
295 | bundle2-input: found a handler for part check:phases | |
295 | bundle2-input-part: "check:phases" supported |
|
296 | bundle2-input-part: "check:phases" supported | |
296 | bundle2-input: payload chunk size: 48 |
|
297 | bundle2-input: payload chunk size: 48 | |
297 | bundle2-input: payload chunk size: 0 |
|
298 | bundle2-input: payload chunk size: 0 | |
298 | bundle2-input-part: total payload size 48 |
|
299 | bundle2-input-part: total payload size 48 | |
299 | bundle2-input: part header size: 16 |
|
300 | bundle2-input: part header size: 16 | |
300 | bundle2-input: part type: "BOOKMARKS" |
|
301 | bundle2-input: part type: "BOOKMARKS" | |
301 | bundle2-input: part id: "3" |
|
302 | bundle2-input: part id: "3" | |
302 | bundle2-input: part parameters: 0 |
|
303 | bundle2-input: part parameters: 0 | |
303 | bundle2-input: found a handler for part bookmarks |
|
304 | bundle2-input: found a handler for part bookmarks | |
304 | bundle2-input-part: "bookmarks" supported |
|
305 | bundle2-input-part: "bookmarks" supported | |
305 | bundle2-input: payload chunk size: 23 |
|
306 | bundle2-input: payload chunk size: 23 | |
306 | bundle2-input: payload chunk size: 0 |
|
307 | bundle2-input: payload chunk size: 0 | |
307 | bundle2-input-part: total payload size 23 |
|
308 | bundle2-input-part: total payload size 23 | |
308 | bundle2-input: part header size: 0 |
|
309 | bundle2-input: part header size: 0 | |
309 | bundle2-input: end of bundle2 stream |
|
310 | bundle2-input: end of bundle2 stream | |
310 | bundle2-input-bundle: 3 parts total |
|
311 | bundle2-input-bundle: 3 parts total | |
|
312 | converting hook "txnclose-bookmark.test" to native (windows !) | |||
311 | running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh |
|
313 | running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh | |
312 | test-hook-bookmark: W: 0000000000000000000000000000000000000000 -> |
|
314 | test-hook-bookmark: W: 0000000000000000000000000000000000000000 -> | |
313 | bundle2-output-bundle: "HG20", 0 parts total |
|
315 | bundle2-output-bundle: "HG20", 0 parts total | |
314 | bundle2-output: start emission of HG20 stream |
|
316 | bundle2-output: start emission of HG20 stream | |
315 | bundle2-output: bundle parameter: |
|
317 | bundle2-output: bundle parameter: | |
316 | bundle2-output: start of parts |
|
318 | bundle2-output: start of parts | |
317 | bundle2-output: end of bundle |
|
319 | bundle2-output: end of bundle | |
318 | bundle2-input: start processing of HG20 stream |
|
320 | bundle2-input: start processing of HG20 stream | |
319 | bundle2-input: reading bundle2 stream parameters |
|
321 | bundle2-input: reading bundle2 stream parameters | |
320 | bundle2-input-bundle: no-transaction |
|
322 | bundle2-input-bundle: no-transaction | |
321 | bundle2-input: start extraction of bundle2 parts |
|
323 | bundle2-input: start extraction of bundle2 parts | |
322 | bundle2-input: part header size: 0 |
|
324 | bundle2-input: part header size: 0 | |
323 | bundle2-input: end of bundle2 stream |
|
325 | bundle2-input: end of bundle2 stream | |
324 | bundle2-input-bundle: 0 parts total |
|
326 | bundle2-input-bundle: 0 parts total | |
325 | deleting remote bookmark W |
|
327 | deleting remote bookmark W | |
326 | listing keys for "phases" |
|
328 | listing keys for "phases" | |
327 | [1] |
|
329 | [1] | |
328 |
|
330 | |||
329 | #endif |
|
331 | #endif | |
330 |
|
332 | |||
331 | export the active bookmark |
|
333 | export the active bookmark | |
332 |
|
334 | |||
333 | $ hg bookmark V |
|
335 | $ hg bookmark V | |
334 | $ hg push -B . ../a |
|
336 | $ hg push -B . ../a | |
335 | pushing to ../a |
|
337 | pushing to ../a | |
336 | searching for changes |
|
338 | searching for changes | |
337 | no changes found |
|
339 | no changes found | |
338 | exporting bookmark V |
|
340 | exporting bookmark V | |
339 | [1] |
|
341 | [1] | |
340 |
|
342 | |||
341 | exporting the active bookmark with 'push -B .' |
|
343 | exporting the active bookmark with 'push -B .' | |
342 | demand that one of the bookmarks is activated |
|
344 | demand that one of the bookmarks is activated | |
343 |
|
345 | |||
344 | $ hg update -r default |
|
346 | $ hg update -r default | |
345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
346 | (leaving bookmark V) |
|
348 | (leaving bookmark V) | |
347 | $ hg push -B . ../a |
|
349 | $ hg push -B . ../a | |
348 | abort: no active bookmark |
|
350 | abort: no active bookmark | |
349 | [255] |
|
351 | [255] | |
350 | $ hg update -r V |
|
352 | $ hg update -r V | |
351 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
353 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
352 | (activating bookmark V) |
|
354 | (activating bookmark V) | |
353 |
|
355 | |||
354 | delete the bookmark |
|
356 | delete the bookmark | |
355 |
|
357 | |||
356 | $ hg book -d V |
|
358 | $ hg book -d V | |
357 | $ hg push -B V ../a |
|
359 | $ hg push -B V ../a | |
358 | pushing to ../a |
|
360 | pushing to ../a | |
359 | searching for changes |
|
361 | searching for changes | |
360 | no changes found |
|
362 | no changes found | |
361 | deleting remote bookmark V |
|
363 | deleting remote bookmark V | |
362 | [1] |
|
364 | [1] | |
363 | $ hg up foobar |
|
365 | $ hg up foobar | |
364 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
366 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
365 | (activating bookmark foobar) |
|
367 | (activating bookmark foobar) | |
366 |
|
368 | |||
367 | push/pull name that doesn't exist |
|
369 | push/pull name that doesn't exist | |
368 |
|
370 | |||
369 | $ hg push -B badname ../a |
|
371 | $ hg push -B badname ../a | |
370 | pushing to ../a |
|
372 | pushing to ../a | |
371 | searching for changes |
|
373 | searching for changes | |
372 | bookmark badname does not exist on the local or remote repository! |
|
374 | bookmark badname does not exist on the local or remote repository! | |
373 | no changes found |
|
375 | no changes found | |
374 | [2] |
|
376 | [2] | |
375 | $ hg pull -B anotherbadname ../a |
|
377 | $ hg pull -B anotherbadname ../a | |
376 | pulling from ../a |
|
378 | pulling from ../a | |
377 | abort: remote bookmark anotherbadname not found! |
|
379 | abort: remote bookmark anotherbadname not found! | |
378 | [255] |
|
380 | [255] | |
379 |
|
381 | |||
380 | divergent bookmarks |
|
382 | divergent bookmarks | |
381 |
|
383 | |||
382 | $ cd ../a |
|
384 | $ cd ../a | |
383 | $ echo c1 > f1 |
|
385 | $ echo c1 > f1 | |
384 | $ hg ci -Am1 |
|
386 | $ hg ci -Am1 | |
385 | adding f1 |
|
387 | adding f1 | |
386 | $ hg book -f @ |
|
388 | $ hg book -f @ | |
387 | $ hg book -f X |
|
389 | $ hg book -f X | |
388 | $ hg book |
|
390 | $ hg book | |
389 | @ 1:0d2164f0ce0d |
|
391 | @ 1:0d2164f0ce0d | |
390 | * X 1:0d2164f0ce0d |
|
392 | * X 1:0d2164f0ce0d | |
391 | Y 0:4e3505fd9583 |
|
393 | Y 0:4e3505fd9583 | |
392 | Z 1:0d2164f0ce0d |
|
394 | Z 1:0d2164f0ce0d | |
393 |
|
395 | |||
394 | $ cd ../b |
|
396 | $ cd ../b | |
395 | $ hg up |
|
397 | $ hg up | |
396 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
398 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
397 | updating bookmark foobar |
|
399 | updating bookmark foobar | |
398 | $ echo c2 > f2 |
|
400 | $ echo c2 > f2 | |
399 | $ hg ci -Am2 |
|
401 | $ hg ci -Am2 | |
400 | adding f2 |
|
402 | adding f2 | |
401 | $ hg book -if @ |
|
403 | $ hg book -if @ | |
402 | $ hg book -if X |
|
404 | $ hg book -if X | |
403 | $ hg book |
|
405 | $ hg book | |
404 | @ 1:9b140be10808 |
|
406 | @ 1:9b140be10808 | |
405 | X 1:9b140be10808 |
|
407 | X 1:9b140be10808 | |
406 | Y 0:4e3505fd9583 |
|
408 | Y 0:4e3505fd9583 | |
407 | Z 0:4e3505fd9583 |
|
409 | Z 0:4e3505fd9583 | |
408 | foo -1:000000000000 |
|
410 | foo -1:000000000000 | |
409 | * foobar 1:9b140be10808 |
|
411 | * foobar 1:9b140be10808 | |
410 |
|
412 | |||
411 | $ hg pull --config paths.foo=../a foo --config "$TESTHOOK" |
|
413 | $ hg pull --config paths.foo=../a foo --config "$TESTHOOK" | |
412 | pulling from $TESTTMP/a |
|
414 | pulling from $TESTTMP/a | |
413 | searching for changes |
|
415 | searching for changes | |
414 | adding changesets |
|
416 | adding changesets | |
415 | adding manifests |
|
417 | adding manifests | |
416 | adding file changes |
|
418 | adding file changes | |
417 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
419 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
418 | divergent bookmark @ stored as @foo |
|
420 | divergent bookmark @ stored as @foo | |
419 | divergent bookmark X stored as X@foo |
|
421 | divergent bookmark X stored as X@foo | |
420 | updating bookmark Z |
|
422 | updating bookmark Z | |
421 | new changesets 0d2164f0ce0d |
|
423 | new changesets 0d2164f0ce0d | |
422 | test-hook-bookmark: @foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
424 | test-hook-bookmark: @foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
423 | test-hook-bookmark: X@foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
425 | test-hook-bookmark: X@foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
424 | test-hook-bookmark: Z: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
426 | test-hook-bookmark: Z: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
425 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
427 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
426 | $ hg book |
|
428 | $ hg book | |
427 | @ 1:9b140be10808 |
|
429 | @ 1:9b140be10808 | |
428 | @foo 2:0d2164f0ce0d |
|
430 | @foo 2:0d2164f0ce0d | |
429 | X 1:9b140be10808 |
|
431 | X 1:9b140be10808 | |
430 | X@foo 2:0d2164f0ce0d |
|
432 | X@foo 2:0d2164f0ce0d | |
431 | Y 0:4e3505fd9583 |
|
433 | Y 0:4e3505fd9583 | |
432 | Z 2:0d2164f0ce0d |
|
434 | Z 2:0d2164f0ce0d | |
433 | foo -1:000000000000 |
|
435 | foo -1:000000000000 | |
434 | * foobar 1:9b140be10808 |
|
436 | * foobar 1:9b140be10808 | |
435 |
|
437 | |||
436 | (test that too many divergence of bookmark) |
|
438 | (test that too many divergence of bookmark) | |
437 |
|
439 | |||
438 | $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done |
|
440 | $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done | |
439 | $ hg pull ../a |
|
441 | $ hg pull ../a | |
440 | pulling from ../a |
|
442 | pulling from ../a | |
441 | searching for changes |
|
443 | searching for changes | |
442 | no changes found |
|
444 | no changes found | |
443 | warning: failed to assign numbered name to divergent bookmark X |
|
445 | warning: failed to assign numbered name to divergent bookmark X | |
444 | divergent bookmark @ stored as @1 |
|
446 | divergent bookmark @ stored as @1 | |
445 | $ hg bookmarks | grep '^ X' | grep -v ':000000000000' |
|
447 | $ hg bookmarks | grep '^ X' | grep -v ':000000000000' | |
446 | X 1:9b140be10808 |
|
448 | X 1:9b140be10808 | |
447 | X@foo 2:0d2164f0ce0d |
|
449 | X@foo 2:0d2164f0ce0d | |
448 |
|
450 | |||
449 | (test that remotely diverged bookmarks are reused if they aren't changed) |
|
451 | (test that remotely diverged bookmarks are reused if they aren't changed) | |
450 |
|
452 | |||
451 | $ hg bookmarks | grep '^ @' |
|
453 | $ hg bookmarks | grep '^ @' | |
452 | @ 1:9b140be10808 |
|
454 | @ 1:9b140be10808 | |
453 | @1 2:0d2164f0ce0d |
|
455 | @1 2:0d2164f0ce0d | |
454 | @foo 2:0d2164f0ce0d |
|
456 | @foo 2:0d2164f0ce0d | |
455 | $ hg pull ../a |
|
457 | $ hg pull ../a | |
456 | pulling from ../a |
|
458 | pulling from ../a | |
457 | searching for changes |
|
459 | searching for changes | |
458 | no changes found |
|
460 | no changes found | |
459 | warning: failed to assign numbered name to divergent bookmark X |
|
461 | warning: failed to assign numbered name to divergent bookmark X | |
460 | divergent bookmark @ stored as @1 |
|
462 | divergent bookmark @ stored as @1 | |
461 | $ hg bookmarks | grep '^ @' |
|
463 | $ hg bookmarks | grep '^ @' | |
462 | @ 1:9b140be10808 |
|
464 | @ 1:9b140be10808 | |
463 | @1 2:0d2164f0ce0d |
|
465 | @1 2:0d2164f0ce0d | |
464 | @foo 2:0d2164f0ce0d |
|
466 | @foo 2:0d2164f0ce0d | |
465 |
|
467 | |||
466 | $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done |
|
468 | $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done | |
467 | $ hg bookmarks -d "@1" |
|
469 | $ hg bookmarks -d "@1" | |
468 |
|
470 | |||
469 | $ hg push -f ../a |
|
471 | $ hg push -f ../a | |
470 | pushing to ../a |
|
472 | pushing to ../a | |
471 | searching for changes |
|
473 | searching for changes | |
472 | adding changesets |
|
474 | adding changesets | |
473 | adding manifests |
|
475 | adding manifests | |
474 | adding file changes |
|
476 | adding file changes | |
475 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
477 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
476 | $ hg -R ../a book |
|
478 | $ hg -R ../a book | |
477 | @ 1:0d2164f0ce0d |
|
479 | @ 1:0d2164f0ce0d | |
478 | * X 1:0d2164f0ce0d |
|
480 | * X 1:0d2164f0ce0d | |
479 | Y 0:4e3505fd9583 |
|
481 | Y 0:4e3505fd9583 | |
480 | Z 1:0d2164f0ce0d |
|
482 | Z 1:0d2164f0ce0d | |
481 |
|
483 | |||
482 | explicit pull should overwrite the local version (issue4439) |
|
484 | explicit pull should overwrite the local version (issue4439) | |
483 |
|
485 | |||
484 | $ hg update -r X |
|
486 | $ hg update -r X | |
485 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
487 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
486 | (activating bookmark X) |
|
488 | (activating bookmark X) | |
487 | $ hg pull --config paths.foo=../a foo -B . --config "$TESTHOOK" |
|
489 | $ hg pull --config paths.foo=../a foo -B . --config "$TESTHOOK" | |
488 | pulling from $TESTTMP/a |
|
490 | pulling from $TESTTMP/a | |
489 | no changes found |
|
491 | no changes found | |
490 | divergent bookmark @ stored as @foo |
|
492 | divergent bookmark @ stored as @foo | |
491 | importing bookmark X |
|
493 | importing bookmark X | |
492 | test-hook-bookmark: @foo: 0d2164f0ce0d8f1d6f94351eba04b794909be66c -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
494 | test-hook-bookmark: @foo: 0d2164f0ce0d8f1d6f94351eba04b794909be66c -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
493 | test-hook-bookmark: X: 9b140be1080824d768c5a4691a564088eede71f9 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
495 | test-hook-bookmark: X: 9b140be1080824d768c5a4691a564088eede71f9 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
494 |
|
496 | |||
495 | reinstall state for further testing: |
|
497 | reinstall state for further testing: | |
496 |
|
498 | |||
497 | $ hg book -fr 9b140be10808 X |
|
499 | $ hg book -fr 9b140be10808 X | |
498 |
|
500 | |||
499 | revsets should not ignore divergent bookmarks |
|
501 | revsets should not ignore divergent bookmarks | |
500 |
|
502 | |||
501 | $ hg bookmark -fr 1 Z |
|
503 | $ hg bookmark -fr 1 Z | |
502 | $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n' |
|
504 | $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n' | |
503 | 0:4e3505fd9583 Y |
|
505 | 0:4e3505fd9583 Y | |
504 | 1:9b140be10808 @ X Z foobar |
|
506 | 1:9b140be10808 @ X Z foobar | |
505 | 2:0d2164f0ce0d @foo X@foo |
|
507 | 2:0d2164f0ce0d @foo X@foo | |
506 | $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
508 | $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n' | |
507 | 2:0d2164f0ce0d @foo X@foo |
|
509 | 2:0d2164f0ce0d @foo X@foo | |
508 | $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
510 | $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n' | |
509 | 2:0d2164f0ce0d @foo X@foo |
|
511 | 2:0d2164f0ce0d @foo X@foo | |
510 |
|
512 | |||
511 | update a remote bookmark from a non-head to a head |
|
513 | update a remote bookmark from a non-head to a head | |
512 |
|
514 | |||
513 | $ hg up -q Y |
|
515 | $ hg up -q Y | |
514 | $ echo c3 > f2 |
|
516 | $ echo c3 > f2 | |
515 | $ hg ci -Am3 |
|
517 | $ hg ci -Am3 | |
516 | adding f2 |
|
518 | adding f2 | |
517 | created new head |
|
519 | created new head | |
518 | $ hg push ../a --config "$TESTHOOK" |
|
520 | $ hg push ../a --config "$TESTHOOK" | |
519 | pushing to ../a |
|
521 | pushing to ../a | |
520 | searching for changes |
|
522 | searching for changes | |
521 | adding changesets |
|
523 | adding changesets | |
522 | adding manifests |
|
524 | adding manifests | |
523 | adding file changes |
|
525 | adding file changes | |
524 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
526 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
525 | test-hook-bookmark: Y: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f |
|
527 | test-hook-bookmark: Y: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f | |
526 | updating bookmark Y |
|
528 | updating bookmark Y | |
527 | $ hg -R ../a book |
|
529 | $ hg -R ../a book | |
528 | @ 1:0d2164f0ce0d |
|
530 | @ 1:0d2164f0ce0d | |
529 | * X 1:0d2164f0ce0d |
|
531 | * X 1:0d2164f0ce0d | |
530 | Y 3:f6fc62dde3c0 |
|
532 | Y 3:f6fc62dde3c0 | |
531 | Z 1:0d2164f0ce0d |
|
533 | Z 1:0d2164f0ce0d | |
532 |
|
534 | |||
533 | update a bookmark in the middle of a client pulling changes |
|
535 | update a bookmark in the middle of a client pulling changes | |
534 |
|
536 | |||
535 | $ cd .. |
|
537 | $ cd .. | |
536 | $ hg clone -q a pull-race |
|
538 | $ hg clone -q a pull-race | |
537 |
|
539 | |||
538 | We want to use http because it is stateless and therefore more susceptible to |
|
540 | We want to use http because it is stateless and therefore more susceptible to | |
539 | race conditions |
|
541 | race conditions | |
540 |
|
542 | |||
541 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
543 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
542 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
544 | $ cat pull-race.pid >> $DAEMON_PIDS | |
543 |
|
545 | |||
544 | $ cat <<EOF > $TESTTMP/out_makecommit.sh |
|
546 | $ cat <<EOF > $TESTTMP/out_makecommit.sh | |
545 | > #!/bin/sh |
|
547 | > #!/bin/sh | |
546 | > hg ci -Am5 |
|
548 | > hg ci -Am5 | |
547 | > echo committed in pull-race |
|
549 | > echo committed in pull-race | |
548 | > EOF |
|
550 | > EOF | |
549 |
|
551 | |||
550 | $ hg clone -q http://localhost:$HGPORT/ pull-race2 --config "$TESTHOOK" |
|
552 | $ hg clone -q http://localhost:$HGPORT/ pull-race2 --config "$TESTHOOK" | |
551 | test-hook-bookmark: @: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
553 | test-hook-bookmark: @: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
552 | test-hook-bookmark: X: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
554 | test-hook-bookmark: X: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
553 | test-hook-bookmark: Y: -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f |
|
555 | test-hook-bookmark: Y: -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f | |
554 | test-hook-bookmark: Z: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c |
|
556 | test-hook-bookmark: Z: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c | |
555 | $ cd pull-race |
|
557 | $ cd pull-race | |
556 | $ hg up -q Y |
|
558 | $ hg up -q Y | |
557 | $ echo c4 > f2 |
|
559 | $ echo c4 > f2 | |
558 | $ hg ci -Am4 |
|
560 | $ hg ci -Am4 | |
559 | $ echo c5 > f3 |
|
561 | $ echo c5 > f3 | |
560 | $ cat <<EOF > .hg/hgrc |
|
562 | $ cat <<EOF > .hg/hgrc | |
561 | > [hooks] |
|
563 | > [hooks] | |
562 | > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh |
|
564 | > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh | |
563 | > EOF |
|
565 | > EOF | |
564 |
|
566 | |||
565 | (new config needs a server restart) |
|
567 | (new config needs a server restart) | |
566 |
|
568 | |||
567 | $ cd .. |
|
569 | $ cd .. | |
568 | $ killdaemons.py |
|
570 | $ killdaemons.py | |
569 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
571 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
570 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
572 | $ cat pull-race.pid >> $DAEMON_PIDS | |
571 | $ cd pull-race2 |
|
573 | $ cd pull-race2 | |
572 | $ hg -R $TESTTMP/pull-race book |
|
574 | $ hg -R $TESTTMP/pull-race book | |
573 | @ 1:0d2164f0ce0d |
|
575 | @ 1:0d2164f0ce0d | |
574 | X 1:0d2164f0ce0d |
|
576 | X 1:0d2164f0ce0d | |
575 | * Y 4:b0a5eff05604 |
|
577 | * Y 4:b0a5eff05604 | |
576 | Z 1:0d2164f0ce0d |
|
578 | Z 1:0d2164f0ce0d | |
577 | $ hg pull |
|
579 | $ hg pull | |
578 | pulling from http://localhost:$HGPORT/ |
|
580 | pulling from http://localhost:$HGPORT/ | |
579 | searching for changes |
|
581 | searching for changes | |
580 | adding changesets |
|
582 | adding changesets | |
581 | adding manifests |
|
583 | adding manifests | |
582 | adding file changes |
|
584 | adding file changes | |
583 | added 1 changesets with 1 changes to 1 files |
|
585 | added 1 changesets with 1 changes to 1 files | |
584 | updating bookmark Y |
|
586 | updating bookmark Y | |
585 | new changesets b0a5eff05604 |
|
587 | new changesets b0a5eff05604 | |
586 | (run 'hg update' to get a working copy) |
|
588 | (run 'hg update' to get a working copy) | |
587 | $ hg book |
|
589 | $ hg book | |
588 | * @ 1:0d2164f0ce0d |
|
590 | * @ 1:0d2164f0ce0d | |
589 | X 1:0d2164f0ce0d |
|
591 | X 1:0d2164f0ce0d | |
590 | Y 4:b0a5eff05604 |
|
592 | Y 4:b0a5eff05604 | |
591 | Z 1:0d2164f0ce0d |
|
593 | Z 1:0d2164f0ce0d | |
592 |
|
594 | |||
593 | Update a bookmark right after the initial lookup -B (issue4689) |
|
595 | Update a bookmark right after the initial lookup -B (issue4689) | |
594 |
|
596 | |||
595 | $ echo c6 > ../pull-race/f3 # to be committed during the race |
|
597 | $ echo c6 > ../pull-race/f3 # to be committed during the race | |
596 | $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh |
|
598 | $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh | |
597 | > #!/bin/sh |
|
599 | > #!/bin/sh | |
598 | > if hg st | grep -q M; then |
|
600 | > if hg st | grep -q M; then | |
599 | > hg commit -m race |
|
601 | > hg commit -m race | |
600 | > echo committed in pull-race |
|
602 | > echo committed in pull-race | |
601 | > else |
|
603 | > else | |
602 | > exit 0 |
|
604 | > exit 0 | |
603 | > fi |
|
605 | > fi | |
604 | > EOF |
|
606 | > EOF | |
605 | $ cat <<EOF > ../pull-race/.hg/hgrc |
|
607 | $ cat <<EOF > ../pull-race/.hg/hgrc | |
606 | > [hooks] |
|
608 | > [hooks] | |
607 | > # If anything to commit, commit it right after the first key listing used |
|
609 | > # If anything to commit, commit it right after the first key listing used | |
608 | > # during lookup. This makes the commit appear before the actual getbundle |
|
610 | > # during lookup. This makes the commit appear before the actual getbundle | |
609 | > # call. |
|
611 | > # call. | |
610 | > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh |
|
612 | > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh | |
611 | > EOF |
|
613 | > EOF | |
612 |
|
614 | |||
613 | (new config need server restart) |
|
615 | (new config need server restart) | |
614 |
|
616 | |||
615 | $ killdaemons.py |
|
617 | $ killdaemons.py | |
616 | $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log |
|
618 | $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log | |
617 | $ cat ../pull-race.pid >> $DAEMON_PIDS |
|
619 | $ cat ../pull-race.pid >> $DAEMON_PIDS | |
618 |
|
620 | |||
619 | $ hg -R $TESTTMP/pull-race book |
|
621 | $ hg -R $TESTTMP/pull-race book | |
620 | @ 1:0d2164f0ce0d |
|
622 | @ 1:0d2164f0ce0d | |
621 | X 1:0d2164f0ce0d |
|
623 | X 1:0d2164f0ce0d | |
622 | * Y 5:35d1ef0a8d1b |
|
624 | * Y 5:35d1ef0a8d1b | |
623 | Z 1:0d2164f0ce0d |
|
625 | Z 1:0d2164f0ce0d | |
624 | $ hg update -r Y |
|
626 | $ hg update -r Y | |
625 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
627 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
626 | (activating bookmark Y) |
|
628 | (activating bookmark Y) | |
627 | $ hg pull -B . |
|
629 | $ hg pull -B . | |
628 | pulling from http://localhost:$HGPORT/ |
|
630 | pulling from http://localhost:$HGPORT/ | |
629 | searching for changes |
|
631 | searching for changes | |
630 | adding changesets |
|
632 | adding changesets | |
631 | adding manifests |
|
633 | adding manifests | |
632 | adding file changes |
|
634 | adding file changes | |
633 | added 1 changesets with 1 changes to 1 files |
|
635 | added 1 changesets with 1 changes to 1 files | |
634 | updating bookmark Y |
|
636 | updating bookmark Y | |
635 | new changesets 35d1ef0a8d1b |
|
637 | new changesets 35d1ef0a8d1b | |
636 | (run 'hg update' to get a working copy) |
|
638 | (run 'hg update' to get a working copy) | |
637 | $ hg book |
|
639 | $ hg book | |
638 | @ 1:0d2164f0ce0d |
|
640 | @ 1:0d2164f0ce0d | |
639 | X 1:0d2164f0ce0d |
|
641 | X 1:0d2164f0ce0d | |
640 | * Y 5:35d1ef0a8d1b |
|
642 | * Y 5:35d1ef0a8d1b | |
641 | Z 1:0d2164f0ce0d |
|
643 | Z 1:0d2164f0ce0d | |
642 |
|
644 | |||
643 | (done with this section of the test) |
|
645 | (done with this section of the test) | |
644 |
|
646 | |||
645 | $ killdaemons.py |
|
647 | $ killdaemons.py | |
646 | $ cd ../b |
|
648 | $ cd ../b | |
647 |
|
649 | |||
648 | diverging a remote bookmark fails |
|
650 | diverging a remote bookmark fails | |
649 |
|
651 | |||
650 | $ hg up -q 4e3505fd9583 |
|
652 | $ hg up -q 4e3505fd9583 | |
651 | $ echo c4 > f2 |
|
653 | $ echo c4 > f2 | |
652 | $ hg ci -Am4 |
|
654 | $ hg ci -Am4 | |
653 | adding f2 |
|
655 | adding f2 | |
654 | created new head |
|
656 | created new head | |
655 | $ echo c5 > f2 |
|
657 | $ echo c5 > f2 | |
656 | $ hg ci -Am5 |
|
658 | $ hg ci -Am5 | |
657 | $ hg log -G |
|
659 | $ hg log -G | |
658 | @ 5:c922c0139ca0 5 |
|
660 | @ 5:c922c0139ca0 5 | |
659 | | |
|
661 | | | |
660 | o 4:4efff6d98829 4 |
|
662 | o 4:4efff6d98829 4 | |
661 | | |
|
663 | | | |
662 | | o 3:f6fc62dde3c0 3 |
|
664 | | o 3:f6fc62dde3c0 3 | |
663 | |/ |
|
665 | |/ | |
664 | | o 2:0d2164f0ce0d 1 |
|
666 | | o 2:0d2164f0ce0d 1 | |
665 | |/ |
|
667 | |/ | |
666 | | o 1:9b140be10808 2 |
|
668 | | o 1:9b140be10808 2 | |
667 | |/ |
|
669 | |/ | |
668 | o 0:4e3505fd9583 test |
|
670 | o 0:4e3505fd9583 test | |
669 |
|
671 | |||
670 |
|
672 | |||
671 | $ hg book -f Y |
|
673 | $ hg book -f Y | |
672 |
|
674 | |||
673 | $ cat <<EOF > ../a/.hg/hgrc |
|
675 | $ cat <<EOF > ../a/.hg/hgrc | |
674 | > [web] |
|
676 | > [web] | |
675 | > push_ssl = false |
|
677 | > push_ssl = false | |
676 | > allow_push = * |
|
678 | > allow_push = * | |
677 | > EOF |
|
679 | > EOF | |
678 |
|
680 | |||
679 | $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid |
|
681 | $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid | |
680 | $ cat ../hg2.pid >> $DAEMON_PIDS |
|
682 | $ cat ../hg2.pid >> $DAEMON_PIDS | |
681 |
|
683 | |||
682 | $ hg push http://localhost:$HGPORT2/ |
|
684 | $ hg push http://localhost:$HGPORT2/ | |
683 | pushing to http://localhost:$HGPORT2/ |
|
685 | pushing to http://localhost:$HGPORT2/ | |
684 | searching for changes |
|
686 | searching for changes | |
685 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
687 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! | |
686 | (merge or see 'hg help push' for details about pushing new heads) |
|
688 | (merge or see 'hg help push' for details about pushing new heads) | |
687 | [255] |
|
689 | [255] | |
688 | $ hg -R ../a book |
|
690 | $ hg -R ../a book | |
689 | @ 1:0d2164f0ce0d |
|
691 | @ 1:0d2164f0ce0d | |
690 | * X 1:0d2164f0ce0d |
|
692 | * X 1:0d2164f0ce0d | |
691 | Y 3:f6fc62dde3c0 |
|
693 | Y 3:f6fc62dde3c0 | |
692 | Z 1:0d2164f0ce0d |
|
694 | Z 1:0d2164f0ce0d | |
693 |
|
695 | |||
694 |
|
696 | |||
695 | Unrelated marker does not alter the decision |
|
697 | Unrelated marker does not alter the decision | |
696 |
|
698 | |||
697 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
699 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
698 | $ hg push http://localhost:$HGPORT2/ |
|
700 | $ hg push http://localhost:$HGPORT2/ | |
699 | pushing to http://localhost:$HGPORT2/ |
|
701 | pushing to http://localhost:$HGPORT2/ | |
700 | searching for changes |
|
702 | searching for changes | |
701 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
703 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! | |
702 | (merge or see 'hg help push' for details about pushing new heads) |
|
704 | (merge or see 'hg help push' for details about pushing new heads) | |
703 | [255] |
|
705 | [255] | |
704 | $ hg -R ../a book |
|
706 | $ hg -R ../a book | |
705 | @ 1:0d2164f0ce0d |
|
707 | @ 1:0d2164f0ce0d | |
706 | * X 1:0d2164f0ce0d |
|
708 | * X 1:0d2164f0ce0d | |
707 | Y 3:f6fc62dde3c0 |
|
709 | Y 3:f6fc62dde3c0 | |
708 | Z 1:0d2164f0ce0d |
|
710 | Z 1:0d2164f0ce0d | |
709 |
|
711 | |||
710 | Update to a successor works |
|
712 | Update to a successor works | |
711 |
|
713 | |||
712 | $ hg id --debug -r 3 |
|
714 | $ hg id --debug -r 3 | |
713 | f6fc62dde3c0771e29704af56ba4d8af77abcc2f |
|
715 | f6fc62dde3c0771e29704af56ba4d8af77abcc2f | |
714 | $ hg id --debug -r 4 |
|
716 | $ hg id --debug -r 4 | |
715 | 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
717 | 4efff6d98829d9c824c621afd6e3f01865f5439f | |
716 | $ hg id --debug -r 5 |
|
718 | $ hg id --debug -r 5 | |
717 | c922c0139ca03858f655e4a2af4dd02796a63969 tip Y |
|
719 | c922c0139ca03858f655e4a2af4dd02796a63969 tip Y | |
718 | $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc |
|
720 | $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc | |
719 | obsoleted 1 changesets |
|
721 | obsoleted 1 changesets | |
720 | $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
722 | $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f | |
721 | $ hg push http://localhost:$HGPORT2/ |
|
723 | $ hg push http://localhost:$HGPORT2/ | |
722 | pushing to http://localhost:$HGPORT2/ |
|
724 | pushing to http://localhost:$HGPORT2/ | |
723 | searching for changes |
|
725 | searching for changes | |
724 | remote: adding changesets |
|
726 | remote: adding changesets | |
725 | remote: adding manifests |
|
727 | remote: adding manifests | |
726 | remote: adding file changes |
|
728 | remote: adding file changes | |
727 | remote: added 2 changesets with 2 changes to 1 files (+1 heads) |
|
729 | remote: added 2 changesets with 2 changes to 1 files (+1 heads) | |
728 | remote: 2 new obsolescence markers |
|
730 | remote: 2 new obsolescence markers | |
729 | remote: obsoleted 1 changesets |
|
731 | remote: obsoleted 1 changesets | |
730 | updating bookmark Y |
|
732 | updating bookmark Y | |
731 | $ hg -R ../a book |
|
733 | $ hg -R ../a book | |
732 | @ 1:0d2164f0ce0d |
|
734 | @ 1:0d2164f0ce0d | |
733 | * X 1:0d2164f0ce0d |
|
735 | * X 1:0d2164f0ce0d | |
734 | Y 5:c922c0139ca0 |
|
736 | Y 5:c922c0139ca0 | |
735 | Z 1:0d2164f0ce0d |
|
737 | Z 1:0d2164f0ce0d | |
736 |
|
738 | |||
737 | hgweb |
|
739 | hgweb | |
738 |
|
740 | |||
739 | $ cat <<EOF > .hg/hgrc |
|
741 | $ cat <<EOF > .hg/hgrc | |
740 | > [web] |
|
742 | > [web] | |
741 | > push_ssl = false |
|
743 | > push_ssl = false | |
742 | > allow_push = * |
|
744 | > allow_push = * | |
743 | > EOF |
|
745 | > EOF | |
744 |
|
746 | |||
745 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log |
|
747 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log | |
746 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
748 | $ cat ../hg.pid >> $DAEMON_PIDS | |
747 | $ cd ../a |
|
749 | $ cd ../a | |
748 |
|
750 | |||
749 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces |
|
751 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces | |
750 | bookmarks |
|
752 | bookmarks | |
751 | namespaces |
|
753 | namespaces | |
752 | obsolete |
|
754 | obsolete | |
753 | phases |
|
755 | phases | |
754 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks |
|
756 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks | |
755 | @ 9b140be1080824d768c5a4691a564088eede71f9 |
|
757 | @ 9b140be1080824d768c5a4691a564088eede71f9 | |
756 | X 9b140be1080824d768c5a4691a564088eede71f9 |
|
758 | X 9b140be1080824d768c5a4691a564088eede71f9 | |
757 | Y c922c0139ca03858f655e4a2af4dd02796a63969 |
|
759 | Y c922c0139ca03858f655e4a2af4dd02796a63969 | |
758 | Z 9b140be1080824d768c5a4691a564088eede71f9 |
|
760 | Z 9b140be1080824d768c5a4691a564088eede71f9 | |
759 | foo 0000000000000000000000000000000000000000 |
|
761 | foo 0000000000000000000000000000000000000000 | |
760 | foobar 9b140be1080824d768c5a4691a564088eede71f9 |
|
762 | foobar 9b140be1080824d768c5a4691a564088eede71f9 | |
761 | $ hg out -B http://localhost:$HGPORT/ |
|
763 | $ hg out -B http://localhost:$HGPORT/ | |
762 | comparing with http://localhost:$HGPORT/ |
|
764 | comparing with http://localhost:$HGPORT/ | |
763 | searching for changed bookmarks |
|
765 | searching for changed bookmarks | |
764 | @ 0d2164f0ce0d |
|
766 | @ 0d2164f0ce0d | |
765 | X 0d2164f0ce0d |
|
767 | X 0d2164f0ce0d | |
766 | Z 0d2164f0ce0d |
|
768 | Z 0d2164f0ce0d | |
767 | foo |
|
769 | foo | |
768 | foobar |
|
770 | foobar | |
769 | $ hg push -B Z http://localhost:$HGPORT/ |
|
771 | $ hg push -B Z http://localhost:$HGPORT/ | |
770 | pushing to http://localhost:$HGPORT/ |
|
772 | pushing to http://localhost:$HGPORT/ | |
771 | searching for changes |
|
773 | searching for changes | |
772 | no changes found |
|
774 | no changes found | |
773 | updating bookmark Z |
|
775 | updating bookmark Z | |
774 | [1] |
|
776 | [1] | |
775 | $ hg book -d Z |
|
777 | $ hg book -d Z | |
776 | $ hg in -B http://localhost:$HGPORT/ |
|
778 | $ hg in -B http://localhost:$HGPORT/ | |
777 | comparing with http://localhost:$HGPORT/ |
|
779 | comparing with http://localhost:$HGPORT/ | |
778 | searching for changed bookmarks |
|
780 | searching for changed bookmarks | |
779 | @ 9b140be10808 |
|
781 | @ 9b140be10808 | |
780 | X 9b140be10808 |
|
782 | X 9b140be10808 | |
781 | Z 0d2164f0ce0d |
|
783 | Z 0d2164f0ce0d | |
782 | foo 000000000000 |
|
784 | foo 000000000000 | |
783 | foobar 9b140be10808 |
|
785 | foobar 9b140be10808 | |
784 | $ hg pull -B Z http://localhost:$HGPORT/ |
|
786 | $ hg pull -B Z http://localhost:$HGPORT/ | |
785 | pulling from http://localhost:$HGPORT/ |
|
787 | pulling from http://localhost:$HGPORT/ | |
786 | no changes found |
|
788 | no changes found | |
787 | divergent bookmark @ stored as @1 |
|
789 | divergent bookmark @ stored as @1 | |
788 | divergent bookmark X stored as X@1 |
|
790 | divergent bookmark X stored as X@1 | |
789 | adding remote bookmark Z |
|
791 | adding remote bookmark Z | |
790 | adding remote bookmark foo |
|
792 | adding remote bookmark foo | |
791 | adding remote bookmark foobar |
|
793 | adding remote bookmark foobar | |
792 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks |
|
794 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks | |
793 | requesting all changes |
|
795 | requesting all changes | |
794 | adding changesets |
|
796 | adding changesets | |
795 | adding manifests |
|
797 | adding manifests | |
796 | adding file changes |
|
798 | adding file changes | |
797 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
799 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
798 | 2 new obsolescence markers |
|
800 | 2 new obsolescence markers | |
799 | new changesets 4e3505fd9583:c922c0139ca0 |
|
801 | new changesets 4e3505fd9583:c922c0139ca0 | |
800 | updating to bookmark @ |
|
802 | updating to bookmark @ | |
801 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
803 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
802 | $ hg -R cloned-bookmarks bookmarks |
|
804 | $ hg -R cloned-bookmarks bookmarks | |
803 | * @ 1:9b140be10808 |
|
805 | * @ 1:9b140be10808 | |
804 | X 1:9b140be10808 |
|
806 | X 1:9b140be10808 | |
805 | Y 4:c922c0139ca0 |
|
807 | Y 4:c922c0139ca0 | |
806 | Z 2:0d2164f0ce0d |
|
808 | Z 2:0d2164f0ce0d | |
807 | foo -1:000000000000 |
|
809 | foo -1:000000000000 | |
808 | foobar 1:9b140be10808 |
|
810 | foobar 1:9b140be10808 | |
809 |
|
811 | |||
810 | $ cd .. |
|
812 | $ cd .. | |
811 |
|
813 | |||
812 | Test to show result of bookmarks comparison |
|
814 | Test to show result of bookmarks comparison | |
813 |
|
815 | |||
814 | $ mkdir bmcomparison |
|
816 | $ mkdir bmcomparison | |
815 | $ cd bmcomparison |
|
817 | $ cd bmcomparison | |
816 |
|
818 | |||
817 | $ hg init source |
|
819 | $ hg init source | |
818 | $ hg -R source debugbuilddag '+2*2*3*4' |
|
820 | $ hg -R source debugbuilddag '+2*2*3*4' | |
819 | $ hg -R source log -G --template '{rev}:{node|short}' |
|
821 | $ hg -R source log -G --template '{rev}:{node|short}' | |
820 | o 4:e7bd5218ca15 |
|
822 | o 4:e7bd5218ca15 | |
821 | | |
|
823 | | | |
822 | | o 3:6100d3090acf |
|
824 | | o 3:6100d3090acf | |
823 | |/ |
|
825 | |/ | |
824 | | o 2:fa942426a6fd |
|
826 | | o 2:fa942426a6fd | |
825 | |/ |
|
827 | |/ | |
826 | | o 1:66f7d451a68b |
|
828 | | o 1:66f7d451a68b | |
827 | |/ |
|
829 | |/ | |
828 | o 0:1ea73414a91b |
|
830 | o 0:1ea73414a91b | |
829 |
|
831 | |||
830 | $ hg -R source bookmarks -r 0 SAME |
|
832 | $ hg -R source bookmarks -r 0 SAME | |
831 | $ hg -R source bookmarks -r 0 ADV_ON_REPO1 |
|
833 | $ hg -R source bookmarks -r 0 ADV_ON_REPO1 | |
832 | $ hg -R source bookmarks -r 0 ADV_ON_REPO2 |
|
834 | $ hg -R source bookmarks -r 0 ADV_ON_REPO2 | |
833 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1 |
|
835 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1 | |
834 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2 |
|
836 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2 | |
835 | $ hg -R source bookmarks -r 1 DIVERGED |
|
837 | $ hg -R source bookmarks -r 1 DIVERGED | |
836 |
|
838 | |||
837 | $ hg clone -U source repo1 |
|
839 | $ hg clone -U source repo1 | |
838 |
|
840 | |||
839 | (test that incoming/outgoing exit with 1, if there is no bookmark to |
|
841 | (test that incoming/outgoing exit with 1, if there is no bookmark to | |
840 | be exchanged) |
|
842 | be exchanged) | |
841 |
|
843 | |||
842 | $ hg -R repo1 incoming -B |
|
844 | $ hg -R repo1 incoming -B | |
843 | comparing with $TESTTMP/bmcomparison/source |
|
845 | comparing with $TESTTMP/bmcomparison/source | |
844 | searching for changed bookmarks |
|
846 | searching for changed bookmarks | |
845 | no changed bookmarks found |
|
847 | no changed bookmarks found | |
846 | [1] |
|
848 | [1] | |
847 | $ hg -R repo1 outgoing -B |
|
849 | $ hg -R repo1 outgoing -B | |
848 | comparing with $TESTTMP/bmcomparison/source |
|
850 | comparing with $TESTTMP/bmcomparison/source | |
849 | searching for changed bookmarks |
|
851 | searching for changed bookmarks | |
850 | no changed bookmarks found |
|
852 | no changed bookmarks found | |
851 | [1] |
|
853 | [1] | |
852 |
|
854 | |||
853 | $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1 |
|
855 | $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1 | |
854 | $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1 |
|
856 | $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1 | |
855 | $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1 |
|
857 | $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1 | |
856 | $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED |
|
858 | $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED | |
857 | $ hg -R repo1 -q --config extensions.mq= strip 4 |
|
859 | $ hg -R repo1 -q --config extensions.mq= strip 4 | |
858 | $ hg -R repo1 log -G --template '{node|short} ({bookmarks})' |
|
860 | $ hg -R repo1 log -G --template '{node|short} ({bookmarks})' | |
859 | o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED) |
|
861 | o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED) | |
860 | | |
|
862 | | | |
861 | | o fa942426a6fd (ADV_ON_REPO1) |
|
863 | | o fa942426a6fd (ADV_ON_REPO1) | |
862 | |/ |
|
864 | |/ | |
863 | | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED) |
|
865 | | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED) | |
864 | |/ |
|
866 | |/ | |
865 | o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME) |
|
867 | o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME) | |
866 |
|
868 | |||
867 |
|
869 | |||
868 | $ hg clone -U source repo2 |
|
870 | $ hg clone -U source repo2 | |
869 | $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2 |
|
871 | $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2 | |
870 | $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2 |
|
872 | $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2 | |
871 | $ hg -R repo2 bookmarks -f -r 2 DIVERGED |
|
873 | $ hg -R repo2 bookmarks -f -r 2 DIVERGED | |
872 | $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2 |
|
874 | $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2 | |
873 | $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED |
|
875 | $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED | |
874 | $ hg -R repo2 -q --config extensions.mq= strip 3 |
|
876 | $ hg -R repo2 -q --config extensions.mq= strip 3 | |
875 | $ hg -R repo2 log -G --template '{node|short} ({bookmarks})' |
|
877 | $ hg -R repo2 log -G --template '{node|short} ({bookmarks})' | |
876 | o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED) |
|
878 | o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED) | |
877 | | |
|
879 | | | |
878 | | o fa942426a6fd (DIVERGED) |
|
880 | | o fa942426a6fd (DIVERGED) | |
879 | |/ |
|
881 | |/ | |
880 | | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2) |
|
882 | | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2) | |
881 | |/ |
|
883 | |/ | |
882 | o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME) |
|
884 | o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME) | |
883 |
|
885 | |||
884 |
|
886 | |||
885 | (test that difference of bookmarks between repositories are fully shown) |
|
887 | (test that difference of bookmarks between repositories are fully shown) | |
886 |
|
888 | |||
887 | $ hg -R repo1 incoming -B repo2 -v |
|
889 | $ hg -R repo1 incoming -B repo2 -v | |
888 | comparing with repo2 |
|
890 | comparing with repo2 | |
889 | searching for changed bookmarks |
|
891 | searching for changed bookmarks | |
890 | ADD_ON_REPO2 66f7d451a68b added |
|
892 | ADD_ON_REPO2 66f7d451a68b added | |
891 | ADV_ON_REPO2 66f7d451a68b advanced |
|
893 | ADV_ON_REPO2 66f7d451a68b advanced | |
892 | DIFF_ADV_ON_REPO2 e7bd5218ca15 changed |
|
894 | DIFF_ADV_ON_REPO2 e7bd5218ca15 changed | |
893 | DIFF_DIVERGED e7bd5218ca15 changed |
|
895 | DIFF_DIVERGED e7bd5218ca15 changed | |
894 | DIVERGED fa942426a6fd diverged |
|
896 | DIVERGED fa942426a6fd diverged | |
895 | $ hg -R repo1 outgoing -B repo2 -v |
|
897 | $ hg -R repo1 outgoing -B repo2 -v | |
896 | comparing with repo2 |
|
898 | comparing with repo2 | |
897 | searching for changed bookmarks |
|
899 | searching for changed bookmarks | |
898 | ADD_ON_REPO1 66f7d451a68b added |
|
900 | ADD_ON_REPO1 66f7d451a68b added | |
899 | ADD_ON_REPO2 deleted |
|
901 | ADD_ON_REPO2 deleted | |
900 | ADV_ON_REPO1 fa942426a6fd advanced |
|
902 | ADV_ON_REPO1 fa942426a6fd advanced | |
901 | DIFF_ADV_ON_REPO1 6100d3090acf advanced |
|
903 | DIFF_ADV_ON_REPO1 6100d3090acf advanced | |
902 | DIFF_ADV_ON_REPO2 1ea73414a91b changed |
|
904 | DIFF_ADV_ON_REPO2 1ea73414a91b changed | |
903 | DIFF_DIVERGED 6100d3090acf changed |
|
905 | DIFF_DIVERGED 6100d3090acf changed | |
904 | DIVERGED 66f7d451a68b diverged |
|
906 | DIVERGED 66f7d451a68b diverged | |
905 |
|
907 | |||
906 | $ hg -R repo2 incoming -B repo1 -v |
|
908 | $ hg -R repo2 incoming -B repo1 -v | |
907 | comparing with repo1 |
|
909 | comparing with repo1 | |
908 | searching for changed bookmarks |
|
910 | searching for changed bookmarks | |
909 | ADD_ON_REPO1 66f7d451a68b added |
|
911 | ADD_ON_REPO1 66f7d451a68b added | |
910 | ADV_ON_REPO1 fa942426a6fd advanced |
|
912 | ADV_ON_REPO1 fa942426a6fd advanced | |
911 | DIFF_ADV_ON_REPO1 6100d3090acf changed |
|
913 | DIFF_ADV_ON_REPO1 6100d3090acf changed | |
912 | DIFF_DIVERGED 6100d3090acf changed |
|
914 | DIFF_DIVERGED 6100d3090acf changed | |
913 | DIVERGED 66f7d451a68b diverged |
|
915 | DIVERGED 66f7d451a68b diverged | |
914 | $ hg -R repo2 outgoing -B repo1 -v |
|
916 | $ hg -R repo2 outgoing -B repo1 -v | |
915 | comparing with repo1 |
|
917 | comparing with repo1 | |
916 | searching for changed bookmarks |
|
918 | searching for changed bookmarks | |
917 | ADD_ON_REPO1 deleted |
|
919 | ADD_ON_REPO1 deleted | |
918 | ADD_ON_REPO2 66f7d451a68b added |
|
920 | ADD_ON_REPO2 66f7d451a68b added | |
919 | ADV_ON_REPO2 66f7d451a68b advanced |
|
921 | ADV_ON_REPO2 66f7d451a68b advanced | |
920 | DIFF_ADV_ON_REPO1 1ea73414a91b changed |
|
922 | DIFF_ADV_ON_REPO1 1ea73414a91b changed | |
921 | DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced |
|
923 | DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced | |
922 | DIFF_DIVERGED e7bd5218ca15 changed |
|
924 | DIFF_DIVERGED e7bd5218ca15 changed | |
923 | DIVERGED fa942426a6fd diverged |
|
925 | DIVERGED fa942426a6fd diverged | |
924 |
|
926 | |||
925 | $ cd .. |
|
927 | $ cd .. | |
926 |
|
928 | |||
927 | Pushing a bookmark should only push the changes required by that |
|
929 | Pushing a bookmark should only push the changes required by that | |
928 | bookmark, not all outgoing changes: |
|
930 | bookmark, not all outgoing changes: | |
929 | $ hg clone http://localhost:$HGPORT/ addmarks |
|
931 | $ hg clone http://localhost:$HGPORT/ addmarks | |
930 | requesting all changes |
|
932 | requesting all changes | |
931 | adding changesets |
|
933 | adding changesets | |
932 | adding manifests |
|
934 | adding manifests | |
933 | adding file changes |
|
935 | adding file changes | |
934 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
936 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
935 | 2 new obsolescence markers |
|
937 | 2 new obsolescence markers | |
936 | new changesets 4e3505fd9583:c922c0139ca0 |
|
938 | new changesets 4e3505fd9583:c922c0139ca0 | |
937 | updating to bookmark @ |
|
939 | updating to bookmark @ | |
938 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
940 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
939 | $ cd addmarks |
|
941 | $ cd addmarks | |
940 | $ echo foo > foo |
|
942 | $ echo foo > foo | |
941 | $ hg add foo |
|
943 | $ hg add foo | |
942 | $ hg commit -m 'add foo' |
|
944 | $ hg commit -m 'add foo' | |
943 | $ echo bar > bar |
|
945 | $ echo bar > bar | |
944 | $ hg add bar |
|
946 | $ hg add bar | |
945 | $ hg commit -m 'add bar' |
|
947 | $ hg commit -m 'add bar' | |
946 | $ hg co "tip^" |
|
948 | $ hg co "tip^" | |
947 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
949 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
948 | (leaving bookmark @) |
|
950 | (leaving bookmark @) | |
949 | $ hg book add-foo |
|
951 | $ hg book add-foo | |
950 | $ hg book -r tip add-bar |
|
952 | $ hg book -r tip add-bar | |
951 | Note: this push *must* push only a single changeset, as that's the point |
|
953 | Note: this push *must* push only a single changeset, as that's the point | |
952 | of this test. |
|
954 | of this test. | |
953 | $ hg push -B add-foo --traceback |
|
955 | $ hg push -B add-foo --traceback | |
954 | pushing to http://localhost:$HGPORT/ |
|
956 | pushing to http://localhost:$HGPORT/ | |
955 | searching for changes |
|
957 | searching for changes | |
956 | remote: adding changesets |
|
958 | remote: adding changesets | |
957 | remote: adding manifests |
|
959 | remote: adding manifests | |
958 | remote: adding file changes |
|
960 | remote: adding file changes | |
959 | remote: added 1 changesets with 1 changes to 1 files |
|
961 | remote: added 1 changesets with 1 changes to 1 files | |
960 | exporting bookmark add-foo |
|
962 | exporting bookmark add-foo | |
961 |
|
963 | |||
962 | pushing a new bookmark on a new head does not require -f if -B is specified |
|
964 | pushing a new bookmark on a new head does not require -f if -B is specified | |
963 |
|
965 | |||
964 | $ hg up -q X |
|
966 | $ hg up -q X | |
965 | $ hg book W |
|
967 | $ hg book W | |
966 | $ echo c5 > f2 |
|
968 | $ echo c5 > f2 | |
967 | $ hg ci -Am5 |
|
969 | $ hg ci -Am5 | |
968 | created new head |
|
970 | created new head | |
969 | $ hg push -B . |
|
971 | $ hg push -B . | |
970 | pushing to http://localhost:$HGPORT/ |
|
972 | pushing to http://localhost:$HGPORT/ | |
971 | searching for changes |
|
973 | searching for changes | |
972 | remote: adding changesets |
|
974 | remote: adding changesets | |
973 | remote: adding manifests |
|
975 | remote: adding manifests | |
974 | remote: adding file changes |
|
976 | remote: adding file changes | |
975 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
977 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
976 | exporting bookmark W |
|
978 | exporting bookmark W | |
977 | $ hg -R ../b id -r W |
|
979 | $ hg -R ../b id -r W | |
978 | cc978a373a53 tip W |
|
980 | cc978a373a53 tip W | |
979 |
|
981 | |||
980 | pushing an existing but divergent bookmark with -B still requires -f |
|
982 | pushing an existing but divergent bookmark with -B still requires -f | |
981 |
|
983 | |||
982 | $ hg clone -q . ../r |
|
984 | $ hg clone -q . ../r | |
983 | $ hg up -q X |
|
985 | $ hg up -q X | |
984 | $ echo 1 > f2 |
|
986 | $ echo 1 > f2 | |
985 | $ hg ci -qAml |
|
987 | $ hg ci -qAml | |
986 |
|
988 | |||
987 | $ cd ../r |
|
989 | $ cd ../r | |
988 | $ hg up -q X |
|
990 | $ hg up -q X | |
989 | $ echo 2 > f2 |
|
991 | $ echo 2 > f2 | |
990 | $ hg ci -qAmr |
|
992 | $ hg ci -qAmr | |
991 | $ hg push -B X |
|
993 | $ hg push -B X | |
992 | pushing to $TESTTMP/addmarks |
|
994 | pushing to $TESTTMP/addmarks | |
993 | searching for changes |
|
995 | searching for changes | |
994 | remote has heads on branch 'default' that are not known locally: a2a606d9ff1b |
|
996 | remote has heads on branch 'default' that are not known locally: a2a606d9ff1b | |
995 | abort: push creates new remote head 54694f811df9 with bookmark 'X'! |
|
997 | abort: push creates new remote head 54694f811df9 with bookmark 'X'! | |
996 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
998 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
997 | [255] |
|
999 | [255] | |
998 | $ cd ../addmarks |
|
1000 | $ cd ../addmarks | |
999 |
|
1001 | |||
1000 | Check summary output for incoming/outgoing bookmarks |
|
1002 | Check summary output for incoming/outgoing bookmarks | |
1001 |
|
1003 | |||
1002 | $ hg bookmarks -d X |
|
1004 | $ hg bookmarks -d X | |
1003 | $ hg bookmarks -d Y |
|
1005 | $ hg bookmarks -d Y | |
1004 | $ hg summary --remote | grep '^remote:' |
|
1006 | $ hg summary --remote | grep '^remote:' | |
1005 | remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob) |
|
1007 | remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob) | |
1006 |
|
1008 | |||
1007 | $ cd .. |
|
1009 | $ cd .. | |
1008 |
|
1010 | |||
1009 | pushing an unchanged bookmark should result in no changes |
|
1011 | pushing an unchanged bookmark should result in no changes | |
1010 |
|
1012 | |||
1011 | $ hg init unchanged-a |
|
1013 | $ hg init unchanged-a | |
1012 | $ hg init unchanged-b |
|
1014 | $ hg init unchanged-b | |
1013 | $ cd unchanged-a |
|
1015 | $ cd unchanged-a | |
1014 | $ echo initial > foo |
|
1016 | $ echo initial > foo | |
1015 | $ hg commit -A -m initial |
|
1017 | $ hg commit -A -m initial | |
1016 | adding foo |
|
1018 | adding foo | |
1017 | $ hg bookmark @ |
|
1019 | $ hg bookmark @ | |
1018 | $ hg push -B @ ../unchanged-b |
|
1020 | $ hg push -B @ ../unchanged-b | |
1019 | pushing to ../unchanged-b |
|
1021 | pushing to ../unchanged-b | |
1020 | searching for changes |
|
1022 | searching for changes | |
1021 | adding changesets |
|
1023 | adding changesets | |
1022 | adding manifests |
|
1024 | adding manifests | |
1023 | adding file changes |
|
1025 | adding file changes | |
1024 | added 1 changesets with 1 changes to 1 files |
|
1026 | added 1 changesets with 1 changes to 1 files | |
1025 | exporting bookmark @ |
|
1027 | exporting bookmark @ | |
1026 |
|
1028 | |||
1027 | $ hg push -B @ ../unchanged-b |
|
1029 | $ hg push -B @ ../unchanged-b | |
1028 | pushing to ../unchanged-b |
|
1030 | pushing to ../unchanged-b | |
1029 | searching for changes |
|
1031 | searching for changes | |
1030 | no changes found |
|
1032 | no changes found | |
1031 | [1] |
|
1033 | [1] | |
1032 |
|
1034 | |||
1033 | Pushing a really long bookmark should work fine (issue5165) |
|
1035 | Pushing a really long bookmark should work fine (issue5165) | |
1034 | =============================================== |
|
1036 | =============================================== | |
1035 |
|
1037 | |||
1036 | #if b2-binary |
|
1038 | #if b2-binary | |
1037 | >>> with open('longname', 'w') as f: |
|
1039 | >>> with open('longname', 'w') as f: | |
1038 | ... f.write('wat' * 100) and None |
|
1040 | ... f.write('wat' * 100) and None | |
1039 | $ hg book `cat longname` |
|
1041 | $ hg book `cat longname` | |
1040 | $ hg push -B `cat longname` ../unchanged-b |
|
1042 | $ hg push -B `cat longname` ../unchanged-b | |
1041 | pushing to ../unchanged-b |
|
1043 | pushing to ../unchanged-b | |
1042 | searching for changes |
|
1044 | searching for changes | |
1043 | no changes found |
|
1045 | no changes found | |
1044 | exporting bookmark (wat){100} (re) |
|
1046 | exporting bookmark (wat){100} (re) | |
1045 | [1] |
|
1047 | [1] | |
1046 | $ hg -R ../unchanged-b book --delete `cat longname` |
|
1048 | $ hg -R ../unchanged-b book --delete `cat longname` | |
1047 |
|
1049 | |||
1048 | Test again but forcing bundle2 exchange to make sure that doesn't regress. |
|
1050 | Test again but forcing bundle2 exchange to make sure that doesn't regress. | |
1049 |
|
1051 | |||
1050 | $ hg push -B `cat longname` ../unchanged-b --config devel.legacy.exchange=bundle1 |
|
1052 | $ hg push -B `cat longname` ../unchanged-b --config devel.legacy.exchange=bundle1 | |
1051 | pushing to ../unchanged-b |
|
1053 | pushing to ../unchanged-b | |
1052 | searching for changes |
|
1054 | searching for changes | |
1053 | no changes found |
|
1055 | no changes found | |
1054 | exporting bookmark (wat){100} (re) |
|
1056 | exporting bookmark (wat){100} (re) | |
1055 | [1] |
|
1057 | [1] | |
1056 | $ hg -R ../unchanged-b book --delete `cat longname` |
|
1058 | $ hg -R ../unchanged-b book --delete `cat longname` | |
1057 | $ hg book --delete `cat longname` |
|
1059 | $ hg book --delete `cat longname` | |
1058 | $ hg co @ |
|
1060 | $ hg co @ | |
1059 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1061 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1060 | (activating bookmark @) |
|
1062 | (activating bookmark @) | |
1061 | #endif |
|
1063 | #endif | |
1062 |
|
1064 | |||
1063 | Check hook preventing push (issue4455) |
|
1065 | Check hook preventing push (issue4455) | |
1064 | ====================================== |
|
1066 | ====================================== | |
1065 |
|
1067 | |||
1066 | $ hg bookmarks |
|
1068 | $ hg bookmarks | |
1067 | * @ 0:55482a6fb4b1 |
|
1069 | * @ 0:55482a6fb4b1 | |
1068 | $ hg log -G |
|
1070 | $ hg log -G | |
1069 | @ 0:55482a6fb4b1 initial |
|
1071 | @ 0:55482a6fb4b1 initial | |
1070 |
|
1072 | |||
1071 | $ hg init ../issue4455-dest |
|
1073 | $ hg init ../issue4455-dest | |
1072 | $ hg push ../issue4455-dest # changesets only |
|
1074 | $ hg push ../issue4455-dest # changesets only | |
1073 | pushing to ../issue4455-dest |
|
1075 | pushing to ../issue4455-dest | |
1074 | searching for changes |
|
1076 | searching for changes | |
1075 | adding changesets |
|
1077 | adding changesets | |
1076 | adding manifests |
|
1078 | adding manifests | |
1077 | adding file changes |
|
1079 | adding file changes | |
1078 | added 1 changesets with 1 changes to 1 files |
|
1080 | added 1 changesets with 1 changes to 1 files | |
1079 | $ cat >> .hg/hgrc << EOF |
|
1081 | $ cat >> .hg/hgrc << EOF | |
1080 | > [paths] |
|
1082 | > [paths] | |
1081 | > local=../issue4455-dest/ |
|
1083 | > local=../issue4455-dest/ | |
1082 | > ssh=ssh://user@dummy/issue4455-dest |
|
1084 | > ssh=ssh://user@dummy/issue4455-dest | |
1083 | > http=http://localhost:$HGPORT/ |
|
1085 | > http=http://localhost:$HGPORT/ | |
1084 | > [ui] |
|
1086 | > [ui] | |
1085 | > ssh=$PYTHON "$TESTDIR/dummyssh" |
|
1087 | > ssh=$PYTHON "$TESTDIR/dummyssh" | |
1086 | > EOF |
|
1088 | > EOF | |
1087 | $ cat >> ../issue4455-dest/.hg/hgrc << EOF |
|
1089 | $ cat >> ../issue4455-dest/.hg/hgrc << EOF | |
1088 | > [hooks] |
|
1090 | > [hooks] | |
1089 | > prepushkey=false |
|
1091 | > prepushkey=false | |
1090 | > [web] |
|
1092 | > [web] | |
1091 | > push_ssl = false |
|
1093 | > push_ssl = false | |
1092 | > allow_push = * |
|
1094 | > allow_push = * | |
1093 | > EOF |
|
1095 | > EOF | |
1094 | $ killdaemons.py |
|
1096 | $ killdaemons.py | |
1095 | $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log |
|
1097 | $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log | |
1096 | $ cat ../issue4455.pid >> $DAEMON_PIDS |
|
1098 | $ cat ../issue4455.pid >> $DAEMON_PIDS | |
1097 |
|
1099 | |||
1098 | Local push |
|
1100 | Local push | |
1099 | ---------- |
|
1101 | ---------- | |
1100 |
|
1102 | |||
1101 | #if b2-pushkey |
|
1103 | #if b2-pushkey | |
1102 |
|
1104 | |||
1103 | $ hg push -B @ local |
|
1105 | $ hg push -B @ local | |
1104 | pushing to $TESTTMP/issue4455-dest |
|
1106 | pushing to $TESTTMP/issue4455-dest | |
1105 | searching for changes |
|
1107 | searching for changes | |
1106 | no changes found |
|
1108 | no changes found | |
1107 | pushkey-abort: prepushkey hook exited with status 1 |
|
1109 | pushkey-abort: prepushkey hook exited with status 1 | |
1108 | abort: exporting bookmark @ failed! |
|
1110 | abort: exporting bookmark @ failed! | |
1109 | [255] |
|
1111 | [255] | |
1110 |
|
1112 | |||
1111 | #endif |
|
1113 | #endif | |
1112 | #if b2-binary |
|
1114 | #if b2-binary | |
1113 |
|
1115 | |||
1114 | $ hg push -B @ local |
|
1116 | $ hg push -B @ local | |
1115 | pushing to $TESTTMP/issue4455-dest |
|
1117 | pushing to $TESTTMP/issue4455-dest | |
1116 | searching for changes |
|
1118 | searching for changes | |
1117 | no changes found |
|
1119 | no changes found | |
1118 | abort: prepushkey hook exited with status 1 |
|
1120 | abort: prepushkey hook exited with status 1 | |
1119 | [255] |
|
1121 | [255] | |
1120 |
|
1122 | |||
1121 | #endif |
|
1123 | #endif | |
1122 |
|
1124 | |||
1123 | $ hg -R ../issue4455-dest/ bookmarks |
|
1125 | $ hg -R ../issue4455-dest/ bookmarks | |
1124 | no bookmarks set |
|
1126 | no bookmarks set | |
1125 |
|
1127 | |||
1126 | Using ssh |
|
1128 | Using ssh | |
1127 | --------- |
|
1129 | --------- | |
1128 |
|
1130 | |||
1129 | #if b2-pushkey |
|
1131 | #if b2-pushkey | |
1130 |
|
1132 | |||
1131 | $ hg push -B @ ssh # bundle2+ |
|
1133 | $ hg push -B @ ssh # bundle2+ | |
1132 | pushing to ssh://user@dummy/issue4455-dest |
|
1134 | pushing to ssh://user@dummy/issue4455-dest | |
1133 | searching for changes |
|
1135 | searching for changes | |
1134 | no changes found |
|
1136 | no changes found | |
1135 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
1137 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
1136 | abort: exporting bookmark @ failed! |
|
1138 | abort: exporting bookmark @ failed! | |
1137 | [255] |
|
1139 | [255] | |
1138 |
|
1140 | |||
1139 | $ hg -R ../issue4455-dest/ bookmarks |
|
1141 | $ hg -R ../issue4455-dest/ bookmarks | |
1140 | no bookmarks set |
|
1142 | no bookmarks set | |
1141 |
|
1143 | |||
1142 | $ hg push -B @ ssh --config devel.legacy.exchange=bundle1 |
|
1144 | $ hg push -B @ ssh --config devel.legacy.exchange=bundle1 | |
1143 | pushing to ssh://user@dummy/issue4455-dest |
|
1145 | pushing to ssh://user@dummy/issue4455-dest | |
1144 | searching for changes |
|
1146 | searching for changes | |
1145 | no changes found |
|
1147 | no changes found | |
1146 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
1148 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
1147 | exporting bookmark @ failed! |
|
1149 | exporting bookmark @ failed! | |
1148 | [1] |
|
1150 | [1] | |
1149 |
|
1151 | |||
1150 | #endif |
|
1152 | #endif | |
1151 | #if b2-binary |
|
1153 | #if b2-binary | |
1152 |
|
1154 | |||
1153 | $ hg push -B @ ssh # bundle2+ |
|
1155 | $ hg push -B @ ssh # bundle2+ | |
1154 | pushing to ssh://user@dummy/issue4455-dest |
|
1156 | pushing to ssh://user@dummy/issue4455-dest | |
1155 | searching for changes |
|
1157 | searching for changes | |
1156 | no changes found |
|
1158 | no changes found | |
1157 | remote: prepushkey hook exited with status 1 |
|
1159 | remote: prepushkey hook exited with status 1 | |
1158 | abort: push failed on remote |
|
1160 | abort: push failed on remote | |
1159 | [255] |
|
1161 | [255] | |
1160 |
|
1162 | |||
1161 | #endif |
|
1163 | #endif | |
1162 |
|
1164 | |||
1163 | $ hg -R ../issue4455-dest/ bookmarks |
|
1165 | $ hg -R ../issue4455-dest/ bookmarks | |
1164 | no bookmarks set |
|
1166 | no bookmarks set | |
1165 |
|
1167 | |||
1166 | Using http |
|
1168 | Using http | |
1167 | ---------- |
|
1169 | ---------- | |
1168 |
|
1170 | |||
1169 | #if b2-pushkey |
|
1171 | #if b2-pushkey | |
1170 | $ hg push -B @ http # bundle2+ |
|
1172 | $ hg push -B @ http # bundle2+ | |
1171 | pushing to http://localhost:$HGPORT/ |
|
1173 | pushing to http://localhost:$HGPORT/ | |
1172 | searching for changes |
|
1174 | searching for changes | |
1173 | no changes found |
|
1175 | no changes found | |
1174 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
1176 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
1175 | abort: exporting bookmark @ failed! |
|
1177 | abort: exporting bookmark @ failed! | |
1176 | [255] |
|
1178 | [255] | |
1177 |
|
1179 | |||
1178 | $ hg -R ../issue4455-dest/ bookmarks |
|
1180 | $ hg -R ../issue4455-dest/ bookmarks | |
1179 | no bookmarks set |
|
1181 | no bookmarks set | |
1180 |
|
1182 | |||
1181 | $ hg push -B @ http --config devel.legacy.exchange=bundle1 |
|
1183 | $ hg push -B @ http --config devel.legacy.exchange=bundle1 | |
1182 | pushing to http://localhost:$HGPORT/ |
|
1184 | pushing to http://localhost:$HGPORT/ | |
1183 | searching for changes |
|
1185 | searching for changes | |
1184 | no changes found |
|
1186 | no changes found | |
1185 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
1187 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
1186 | exporting bookmark @ failed! |
|
1188 | exporting bookmark @ failed! | |
1187 | [1] |
|
1189 | [1] | |
1188 |
|
1190 | |||
1189 | #endif |
|
1191 | #endif | |
1190 |
|
1192 | |||
1191 | #if b2-binary |
|
1193 | #if b2-binary | |
1192 |
|
1194 | |||
1193 | $ hg push -B @ ssh # bundle2+ |
|
1195 | $ hg push -B @ ssh # bundle2+ | |
1194 | pushing to ssh://user@dummy/issue4455-dest |
|
1196 | pushing to ssh://user@dummy/issue4455-dest | |
1195 | searching for changes |
|
1197 | searching for changes | |
1196 | no changes found |
|
1198 | no changes found | |
1197 | remote: prepushkey hook exited with status 1 |
|
1199 | remote: prepushkey hook exited with status 1 | |
1198 | abort: push failed on remote |
|
1200 | abort: push failed on remote | |
1199 | [255] |
|
1201 | [255] | |
1200 |
|
1202 | |||
1201 | #endif |
|
1203 | #endif | |
1202 |
|
1204 | |||
1203 | $ hg -R ../issue4455-dest/ bookmarks |
|
1205 | $ hg -R ../issue4455-dest/ bookmarks | |
1204 | no bookmarks set |
|
1206 | no bookmarks set | |
1205 |
|
1207 | |||
1206 | $ cd .. |
|
1208 | $ cd .. | |
1207 |
|
1209 | |||
1208 | Test that pre-pushkey compat for bookmark works as expected (issue5777) |
|
1210 | Test that pre-pushkey compat for bookmark works as expected (issue5777) | |
1209 |
|
1211 | |||
1210 | $ cat << EOF >> $HGRCPATH |
|
1212 | $ cat << EOF >> $HGRCPATH | |
1211 | > [ui] |
|
1213 | > [ui] | |
1212 | > ssh="$PYTHON" "$TESTDIR/dummyssh" |
|
1214 | > ssh="$PYTHON" "$TESTDIR/dummyssh" | |
1213 | > [server] |
|
1215 | > [server] | |
1214 | > bookmarks-pushkey-compat = yes |
|
1216 | > bookmarks-pushkey-compat = yes | |
1215 | > EOF |
|
1217 | > EOF | |
1216 |
|
1218 | |||
1217 | $ hg init server |
|
1219 | $ hg init server | |
1218 | $ echo foo > server/a |
|
1220 | $ echo foo > server/a | |
1219 | $ hg -R server book foo |
|
1221 | $ hg -R server book foo | |
1220 | $ hg -R server commit -Am a |
|
1222 | $ hg -R server commit -Am a | |
1221 | adding a |
|
1223 | adding a | |
1222 | $ hg clone ssh://user@dummy/server client |
|
1224 | $ hg clone ssh://user@dummy/server client | |
1223 | requesting all changes |
|
1225 | requesting all changes | |
1224 | adding changesets |
|
1226 | adding changesets | |
1225 | adding manifests |
|
1227 | adding manifests | |
1226 | adding file changes |
|
1228 | adding file changes | |
1227 | added 1 changesets with 1 changes to 1 files |
|
1229 | added 1 changesets with 1 changes to 1 files | |
1228 | new changesets 79513d0d7716 |
|
1230 | new changesets 79513d0d7716 | |
1229 | updating to branch default |
|
1231 | updating to branch default | |
1230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1232 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1231 |
|
1233 | |||
1232 | Forbid bookmark move on the server |
|
1234 | Forbid bookmark move on the server | |
1233 |
|
1235 | |||
1234 | $ cat << EOF >> $TESTDIR/no-bm-move.sh |
|
1236 | $ cat << EOF >> $TESTDIR/no-bm-move.sh | |
1235 | > #!/bin/sh |
|
1237 | > #!/bin/sh | |
1236 | > echo \$HG_NAMESPACE | grep -v bookmarks |
|
1238 | > echo \$HG_NAMESPACE | grep -v bookmarks | |
1237 | > EOF |
|
1239 | > EOF | |
1238 | $ cat << EOF >> server/.hg/hgrc |
|
1240 | $ cat << EOF >> server/.hg/hgrc | |
1239 | > [hooks] |
|
1241 | > [hooks] | |
1240 | > prepushkey.no-bm-move= sh $TESTDIR/no-bm-move.sh |
|
1242 | > prepushkey.no-bm-move= sh $TESTDIR/no-bm-move.sh | |
1241 | > EOF |
|
1243 | > EOF | |
1242 |
|
1244 | |||
1243 | pushing changeset is okay |
|
1245 | pushing changeset is okay | |
1244 |
|
1246 | |||
1245 | $ echo bar >> client/a |
|
1247 | $ echo bar >> client/a | |
1246 | $ hg -R client commit -m b |
|
1248 | $ hg -R client commit -m b | |
1247 | $ hg -R client push |
|
1249 | $ hg -R client push | |
1248 | pushing to ssh://user@dummy/server |
|
1250 | pushing to ssh://user@dummy/server | |
1249 | searching for changes |
|
1251 | searching for changes | |
1250 | remote: adding changesets |
|
1252 | remote: adding changesets | |
1251 | remote: adding manifests |
|
1253 | remote: adding manifests | |
1252 | remote: adding file changes |
|
1254 | remote: adding file changes | |
1253 | remote: added 1 changesets with 1 changes to 1 files |
|
1255 | remote: added 1 changesets with 1 changes to 1 files | |
1254 |
|
1256 | |||
1255 | attempt to move the bookmark is rejected |
|
1257 | attempt to move the bookmark is rejected | |
1256 |
|
1258 | |||
1257 | $ hg -R client book foo -r . |
|
1259 | $ hg -R client book foo -r . | |
1258 | moving bookmark 'foo' forward from 79513d0d7716 |
|
1260 | moving bookmark 'foo' forward from 79513d0d7716 | |
1259 |
|
1261 | |||
1260 | #if b2-pushkey |
|
1262 | #if b2-pushkey | |
1261 | $ hg -R client push |
|
1263 | $ hg -R client push | |
1262 | pushing to ssh://user@dummy/server |
|
1264 | pushing to ssh://user@dummy/server | |
1263 | searching for changes |
|
1265 | searching for changes | |
1264 | no changes found |
|
1266 | no changes found | |
1265 | remote: pushkey-abort: prepushkey.no-bm-move hook exited with status 1 |
|
1267 | remote: pushkey-abort: prepushkey.no-bm-move hook exited with status 1 | |
1266 | abort: updating bookmark foo failed! |
|
1268 | abort: updating bookmark foo failed! | |
1267 | [255] |
|
1269 | [255] | |
1268 | #endif |
|
1270 | #endif | |
1269 | #if b2-binary |
|
1271 | #if b2-binary | |
1270 | $ hg -R client push |
|
1272 | $ hg -R client push | |
1271 | pushing to ssh://user@dummy/server |
|
1273 | pushing to ssh://user@dummy/server | |
1272 | searching for changes |
|
1274 | searching for changes | |
1273 | no changes found |
|
1275 | no changes found | |
1274 | remote: prepushkey.no-bm-move hook exited with status 1 |
|
1276 | remote: prepushkey.no-bm-move hook exited with status 1 | |
1275 | abort: push failed on remote |
|
1277 | abort: push failed on remote | |
1276 | [255] |
|
1278 | [255] | |
1277 | #endif |
|
1279 | #endif |
@@ -1,1283 +1,1285 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | Setup: |
|
3 | Setup: | |
4 |
|
4 | |||
5 | $ echo a >> a |
|
5 | $ echo a >> a | |
6 | $ hg ci -Am 'base' |
|
6 | $ hg ci -Am 'base' | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | Refuse to amend public csets: |
|
9 | Refuse to amend public csets: | |
10 |
|
10 | |||
11 | $ hg phase -r . -p |
|
11 | $ hg phase -r . -p | |
12 | $ hg ci --amend |
|
12 | $ hg ci --amend | |
13 | abort: cannot amend public changesets |
|
13 | abort: cannot amend public changesets | |
14 | (see 'hg help phases' for details) |
|
14 | (see 'hg help phases' for details) | |
15 | [255] |
|
15 | [255] | |
16 | $ hg phase -r . -f -d |
|
16 | $ hg phase -r . -f -d | |
17 |
|
17 | |||
18 | $ echo a >> a |
|
18 | $ echo a >> a | |
19 | $ hg ci -Am 'base1' |
|
19 | $ hg ci -Am 'base1' | |
20 |
|
20 | |||
21 | Nothing to amend: |
|
21 | Nothing to amend: | |
22 |
|
22 | |||
23 | $ hg ci --amend -m 'base1' |
|
23 | $ hg ci --amend -m 'base1' | |
24 | nothing changed |
|
24 | nothing changed | |
25 | [1] |
|
25 | [1] | |
26 |
|
26 | |||
27 | $ cat >> $HGRCPATH <<EOF |
|
27 | $ cat >> $HGRCPATH <<EOF | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" |
|
29 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" | |
30 | > EOF |
|
30 | > EOF | |
31 |
|
31 | |||
32 | Amending changeset with changes in working dir: |
|
32 | Amending changeset with changes in working dir: | |
33 | (and check that --message does not trigger an editor) |
|
33 | (and check that --message does not trigger an editor) | |
34 |
|
34 | |||
35 | $ echo a >> a |
|
35 | $ echo a >> a | |
36 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' |
|
36 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' | |
37 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 |
|
37 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 | |
38 | 43f1ba15f28a tip |
|
38 | 43f1ba15f28a tip | |
39 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-5ab4f721-amend.hg |
|
39 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-5ab4f721-amend.hg | |
40 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH |
|
40 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |
41 | $ hg diff -c . |
|
41 | $ hg diff -c . | |
42 | diff -r ad120869acf0 -r 43f1ba15f28a a |
|
42 | diff -r ad120869acf0 -r 43f1ba15f28a a | |
43 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
43 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
44 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
44 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
45 | @@ -1,1 +1,3 @@ |
|
45 | @@ -1,1 +1,3 @@ | |
46 | a |
|
46 | a | |
47 | +a |
|
47 | +a | |
48 | +a |
|
48 | +a | |
49 | $ hg log |
|
49 | $ hg log | |
50 | changeset: 1:43f1ba15f28a |
|
50 | changeset: 1:43f1ba15f28a | |
51 | tag: tip |
|
51 | tag: tip | |
52 | user: test |
|
52 | user: test | |
53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: amend base1 |
|
54 | summary: amend base1 | |
55 |
|
55 | |||
56 | changeset: 0:ad120869acf0 |
|
56 | changeset: 0:ad120869acf0 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: base |
|
59 | summary: base | |
60 |
|
60 | |||
61 |
|
61 | |||
62 | Check proper abort for empty message |
|
62 | Check proper abort for empty message | |
63 |
|
63 | |||
64 | $ cat > editor.sh << '__EOF__' |
|
64 | $ cat > editor.sh << '__EOF__' | |
65 | > #!/bin/sh |
|
65 | > #!/bin/sh | |
66 | > echo "" > "$1" |
|
66 | > echo "" > "$1" | |
67 | > __EOF__ |
|
67 | > __EOF__ | |
68 |
|
68 | |||
69 | Update the existing file to ensure that the dirstate is not in pending state |
|
69 | Update the existing file to ensure that the dirstate is not in pending state | |
70 | (where the status of some files in the working copy is not known yet). This in |
|
70 | (where the status of some files in the working copy is not known yet). This in | |
71 | turn ensures that when the transaction is aborted due to an empty message during |
|
71 | turn ensures that when the transaction is aborted due to an empty message during | |
72 | the amend, there should be no rollback. |
|
72 | the amend, there should be no rollback. | |
73 | $ echo a >> a |
|
73 | $ echo a >> a | |
74 |
|
74 | |||
75 | $ echo b > b |
|
75 | $ echo b > b | |
76 | $ hg add b |
|
76 | $ hg add b | |
77 | $ hg summary |
|
77 | $ hg summary | |
78 | parent: 1:43f1ba15f28a tip |
|
78 | parent: 1:43f1ba15f28a tip | |
79 | amend base1 |
|
79 | amend base1 | |
80 | branch: default |
|
80 | branch: default | |
81 | commit: 1 modified, 1 added, 1 unknown |
|
81 | commit: 1 modified, 1 added, 1 unknown | |
82 | update: (current) |
|
82 | update: (current) | |
83 | phases: 2 draft |
|
83 | phases: 2 draft | |
84 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
84 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
85 | abort: empty commit message |
|
85 | abort: empty commit message | |
86 | [255] |
|
86 | [255] | |
87 | $ hg summary |
|
87 | $ hg summary | |
88 | parent: 1:43f1ba15f28a tip |
|
88 | parent: 1:43f1ba15f28a tip | |
89 | amend base1 |
|
89 | amend base1 | |
90 | branch: default |
|
90 | branch: default | |
91 | commit: 1 modified, 1 added, 1 unknown |
|
91 | commit: 1 modified, 1 added, 1 unknown | |
92 | update: (current) |
|
92 | update: (current) | |
93 | phases: 2 draft |
|
93 | phases: 2 draft | |
94 |
|
94 | |||
95 | Add new file along with modified existing file: |
|
95 | Add new file along with modified existing file: | |
96 | $ hg ci --amend -m 'amend base1 new file' |
|
96 | $ hg ci --amend -m 'amend base1 new file' | |
97 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-007467c2-amend.hg |
|
97 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-007467c2-amend.hg | |
98 |
|
98 | |||
99 | Remove file that was added in amended commit: |
|
99 | Remove file that was added in amended commit: | |
100 | (and test logfile option) |
|
100 | (and test logfile option) | |
101 | (and test that logfile option do not trigger an editor) |
|
101 | (and test that logfile option do not trigger an editor) | |
102 |
|
102 | |||
103 | $ hg rm b |
|
103 | $ hg rm b | |
104 | $ echo 'amend base1 remove new file' > ../logfile |
|
104 | $ echo 'amend base1 remove new file' > ../logfile | |
105 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile |
|
105 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile | |
106 | saved backup bundle to $TESTTMP/.hg/strip-backup/c16295aaf401-1ada9901-amend.hg |
|
106 | saved backup bundle to $TESTTMP/.hg/strip-backup/c16295aaf401-1ada9901-amend.hg | |
107 |
|
107 | |||
108 | $ hg cat b |
|
108 | $ hg cat b | |
109 | b: no such file in rev 47343646fa3d |
|
109 | b: no such file in rev 47343646fa3d | |
110 | [1] |
|
110 | [1] | |
111 |
|
111 | |||
112 | No changes, just a different message: |
|
112 | No changes, just a different message: | |
113 |
|
113 | |||
114 | $ hg ci -v --amend -m 'no changes, new message' |
|
114 | $ hg ci -v --amend -m 'no changes, new message' | |
115 | amending changeset 47343646fa3d |
|
115 | amending changeset 47343646fa3d | |
116 | copying changeset 47343646fa3d to ad120869acf0 |
|
116 | copying changeset 47343646fa3d to ad120869acf0 | |
117 | committing files: |
|
117 | committing files: | |
118 | a |
|
118 | a | |
119 | committing manifest |
|
119 | committing manifest | |
120 | committing changelog |
|
120 | committing changelog | |
121 | 1 changesets found |
|
121 | 1 changesets found | |
122 | uncompressed size of bundle content: |
|
122 | uncompressed size of bundle content: | |
123 | 254 (changelog) |
|
123 | 254 (changelog) | |
124 | 163 (manifests) |
|
124 | 163 (manifests) | |
125 | 131 a |
|
125 | 131 a | |
126 | saved backup bundle to $TESTTMP/.hg/strip-backup/47343646fa3d-c2758885-amend.hg |
|
126 | saved backup bundle to $TESTTMP/.hg/strip-backup/47343646fa3d-c2758885-amend.hg | |
127 | 1 changesets found |
|
127 | 1 changesets found | |
128 | uncompressed size of bundle content: |
|
128 | uncompressed size of bundle content: | |
129 | 250 (changelog) |
|
129 | 250 (changelog) | |
130 | 163 (manifests) |
|
130 | 163 (manifests) | |
131 | 131 a |
|
131 | 131 a | |
132 | adding branch |
|
132 | adding branch | |
133 | adding changesets |
|
133 | adding changesets | |
134 | adding manifests |
|
134 | adding manifests | |
135 | adding file changes |
|
135 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
136 | added 1 changesets with 1 changes to 1 files | |
137 | committed changeset 1:401431e913a1 |
|
137 | committed changeset 1:401431e913a1 | |
138 | $ hg diff -c . |
|
138 | $ hg diff -c . | |
139 | diff -r ad120869acf0 -r 401431e913a1 a |
|
139 | diff -r ad120869acf0 -r 401431e913a1 a | |
140 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
140 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
141 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
141 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
142 | @@ -1,1 +1,4 @@ |
|
142 | @@ -1,1 +1,4 @@ | |
143 | a |
|
143 | a | |
144 | +a |
|
144 | +a | |
145 | +a |
|
145 | +a | |
146 | +a |
|
146 | +a | |
147 | $ hg log |
|
147 | $ hg log | |
148 | changeset: 1:401431e913a1 |
|
148 | changeset: 1:401431e913a1 | |
149 | tag: tip |
|
149 | tag: tip | |
150 | user: test |
|
150 | user: test | |
151 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 | |
152 | summary: no changes, new message |
|
152 | summary: no changes, new message | |
153 |
|
153 | |||
154 | changeset: 0:ad120869acf0 |
|
154 | changeset: 0:ad120869acf0 | |
155 | user: test |
|
155 | user: test | |
156 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
157 | summary: base |
|
157 | summary: base | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | Disable default date on commit so when -d isn't given, the old date is preserved: |
|
160 | Disable default date on commit so when -d isn't given, the old date is preserved: | |
161 |
|
161 | |||
162 | $ echo '[defaults]' >> $HGRCPATH |
|
162 | $ echo '[defaults]' >> $HGRCPATH | |
163 | $ echo 'commit=' >> $HGRCPATH |
|
163 | $ echo 'commit=' >> $HGRCPATH | |
164 |
|
164 | |||
165 | Test -u/-d: |
|
165 | Test -u/-d: | |
166 |
|
166 | |||
167 | $ cat > .hg/checkeditform.sh <<EOF |
|
167 | $ cat > .hg/checkeditform.sh <<EOF | |
168 | > env | grep HGEDITFORM |
|
168 | > env | grep HGEDITFORM | |
169 | > true |
|
169 | > true | |
170 | > EOF |
|
170 | > EOF | |
171 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' |
|
171 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' | |
172 | HGEDITFORM=commit.amend.normal |
|
172 | HGEDITFORM=commit.amend.normal | |
173 | saved backup bundle to $TESTTMP/.hg/strip-backup/401431e913a1-5e8e532c-amend.hg |
|
173 | saved backup bundle to $TESTTMP/.hg/strip-backup/401431e913a1-5e8e532c-amend.hg | |
174 | $ echo a >> a |
|
174 | $ echo a >> a | |
175 | $ hg ci --amend -u foo -d '1 0' |
|
175 | $ hg ci --amend -u foo -d '1 0' | |
176 | saved backup bundle to $TESTTMP/.hg/strip-backup/d96b1d28ae33-677e0afb-amend.hg |
|
176 | saved backup bundle to $TESTTMP/.hg/strip-backup/d96b1d28ae33-677e0afb-amend.hg | |
177 | $ hg log -r . |
|
177 | $ hg log -r . | |
178 | changeset: 1:a9a13940fc03 |
|
178 | changeset: 1:a9a13940fc03 | |
179 | tag: tip |
|
179 | tag: tip | |
180 | user: foo |
|
180 | user: foo | |
181 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:01 1970 +0000 | |
182 | summary: no changes, new message |
|
182 | summary: no changes, new message | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | Open editor with old commit message if a message isn't given otherwise: |
|
185 | Open editor with old commit message if a message isn't given otherwise: | |
186 |
|
186 | |||
187 | $ cat > editor.sh << '__EOF__' |
|
187 | $ cat > editor.sh << '__EOF__' | |
188 | > #!/bin/sh |
|
188 | > #!/bin/sh | |
189 | > cat $1 |
|
189 | > cat $1 | |
190 | > echo "another precious commit message" > "$1" |
|
190 | > echo "another precious commit message" > "$1" | |
191 | > __EOF__ |
|
191 | > __EOF__ | |
192 |
|
192 | |||
193 | at first, test saving last-message.txt |
|
193 | at first, test saving last-message.txt | |
194 |
|
194 | |||
195 | $ cat > .hg/hgrc << '__EOF__' |
|
195 | $ cat > .hg/hgrc << '__EOF__' | |
196 | > [hooks] |
|
196 | > [hooks] | |
197 | > pretxncommit.test-saving-last-message = false |
|
197 | > pretxncommit.test-saving-last-message = false | |
198 | > __EOF__ |
|
198 | > __EOF__ | |
199 |
|
199 | |||
200 | $ rm -f .hg/last-message.txt |
|
200 | $ rm -f .hg/last-message.txt | |
201 | $ hg commit --amend -v -m "message given from command line" |
|
201 | $ hg commit --amend -v -m "message given from command line" | |
202 | amending changeset a9a13940fc03 |
|
202 | amending changeset a9a13940fc03 | |
203 | copying changeset a9a13940fc03 to ad120869acf0 |
|
203 | copying changeset a9a13940fc03 to ad120869acf0 | |
204 | committing files: |
|
204 | committing files: | |
205 | a |
|
205 | a | |
206 | committing manifest |
|
206 | committing manifest | |
207 | committing changelog |
|
207 | committing changelog | |
|
208 | converting hook "pretxncommit.test-saving-last-message" to native (windows !) | |||
208 | running hook pretxncommit.test-saving-last-message: false |
|
209 | running hook pretxncommit.test-saving-last-message: false | |
209 | transaction abort! |
|
210 | transaction abort! | |
210 | rollback completed |
|
211 | rollback completed | |
211 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
212 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
212 | [255] |
|
213 | [255] | |
213 | $ cat .hg/last-message.txt |
|
214 | $ cat .hg/last-message.txt | |
214 | message given from command line (no-eol) |
|
215 | message given from command line (no-eol) | |
215 |
|
216 | |||
216 | $ rm -f .hg/last-message.txt |
|
217 | $ rm -f .hg/last-message.txt | |
217 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
218 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
218 | amending changeset a9a13940fc03 |
|
219 | amending changeset a9a13940fc03 | |
219 | copying changeset a9a13940fc03 to ad120869acf0 |
|
220 | copying changeset a9a13940fc03 to ad120869acf0 | |
220 | no changes, new message |
|
221 | no changes, new message | |
221 |
|
222 | |||
222 |
|
223 | |||
223 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
224 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
224 | HG: Leave message empty to abort commit. |
|
225 | HG: Leave message empty to abort commit. | |
225 | HG: -- |
|
226 | HG: -- | |
226 | HG: user: foo |
|
227 | HG: user: foo | |
227 | HG: branch 'default' |
|
228 | HG: branch 'default' | |
228 | HG: changed a |
|
229 | HG: changed a | |
229 | committing files: |
|
230 | committing files: | |
230 | a |
|
231 | a | |
231 | committing manifest |
|
232 | committing manifest | |
232 | committing changelog |
|
233 | committing changelog | |
|
234 | converting hook "pretxncommit.test-saving-last-message" to native (windows !) | |||
233 | running hook pretxncommit.test-saving-last-message: false |
|
235 | running hook pretxncommit.test-saving-last-message: false | |
234 | transaction abort! |
|
236 | transaction abort! | |
235 | rollback completed |
|
237 | rollback completed | |
236 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
238 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
237 | [255] |
|
239 | [255] | |
238 |
|
240 | |||
239 | $ cat .hg/last-message.txt |
|
241 | $ cat .hg/last-message.txt | |
240 | another precious commit message |
|
242 | another precious commit message | |
241 |
|
243 | |||
242 | $ cat > .hg/hgrc << '__EOF__' |
|
244 | $ cat > .hg/hgrc << '__EOF__' | |
243 | > [hooks] |
|
245 | > [hooks] | |
244 | > pretxncommit.test-saving-last-message = |
|
246 | > pretxncommit.test-saving-last-message = | |
245 | > __EOF__ |
|
247 | > __EOF__ | |
246 |
|
248 | |||
247 | then, test editing custom commit message |
|
249 | then, test editing custom commit message | |
248 |
|
250 | |||
249 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
251 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
250 | amending changeset a9a13940fc03 |
|
252 | amending changeset a9a13940fc03 | |
251 | copying changeset a9a13940fc03 to ad120869acf0 |
|
253 | copying changeset a9a13940fc03 to ad120869acf0 | |
252 | no changes, new message |
|
254 | no changes, new message | |
253 |
|
255 | |||
254 |
|
256 | |||
255 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
257 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
256 | HG: Leave message empty to abort commit. |
|
258 | HG: Leave message empty to abort commit. | |
257 | HG: -- |
|
259 | HG: -- | |
258 | HG: user: foo |
|
260 | HG: user: foo | |
259 | HG: branch 'default' |
|
261 | HG: branch 'default' | |
260 | HG: changed a |
|
262 | HG: changed a | |
261 | committing files: |
|
263 | committing files: | |
262 | a |
|
264 | a | |
263 | committing manifest |
|
265 | committing manifest | |
264 | committing changelog |
|
266 | committing changelog | |
265 | 1 changesets found |
|
267 | 1 changesets found | |
266 | uncompressed size of bundle content: |
|
268 | uncompressed size of bundle content: | |
267 | 249 (changelog) |
|
269 | 249 (changelog) | |
268 | 163 (manifests) |
|
270 | 163 (manifests) | |
269 | 133 a |
|
271 | 133 a | |
270 | saved backup bundle to $TESTTMP/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg |
|
272 | saved backup bundle to $TESTTMP/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg | |
271 | 1 changesets found |
|
273 | 1 changesets found | |
272 | uncompressed size of bundle content: |
|
274 | uncompressed size of bundle content: | |
273 | 257 (changelog) |
|
275 | 257 (changelog) | |
274 | 163 (manifests) |
|
276 | 163 (manifests) | |
275 | 133 a |
|
277 | 133 a | |
276 | adding branch |
|
278 | adding branch | |
277 | adding changesets |
|
279 | adding changesets | |
278 | adding manifests |
|
280 | adding manifests | |
279 | adding file changes |
|
281 | adding file changes | |
280 | added 1 changesets with 1 changes to 1 files |
|
282 | added 1 changesets with 1 changes to 1 files | |
281 | committed changeset 1:64a124ba1b44 |
|
283 | committed changeset 1:64a124ba1b44 | |
282 |
|
284 | |||
283 | Same, but with changes in working dir (different code path): |
|
285 | Same, but with changes in working dir (different code path): | |
284 |
|
286 | |||
285 | $ echo a >> a |
|
287 | $ echo a >> a | |
286 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
288 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
287 | amending changeset 64a124ba1b44 |
|
289 | amending changeset 64a124ba1b44 | |
288 | another precious commit message |
|
290 | another precious commit message | |
289 |
|
291 | |||
290 |
|
292 | |||
291 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
293 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
292 | HG: Leave message empty to abort commit. |
|
294 | HG: Leave message empty to abort commit. | |
293 | HG: -- |
|
295 | HG: -- | |
294 | HG: user: foo |
|
296 | HG: user: foo | |
295 | HG: branch 'default' |
|
297 | HG: branch 'default' | |
296 | HG: changed a |
|
298 | HG: changed a | |
297 | committing files: |
|
299 | committing files: | |
298 | a |
|
300 | a | |
299 | committing manifest |
|
301 | committing manifest | |
300 | committing changelog |
|
302 | committing changelog | |
301 | 1 changesets found |
|
303 | 1 changesets found | |
302 | uncompressed size of bundle content: |
|
304 | uncompressed size of bundle content: | |
303 | 257 (changelog) |
|
305 | 257 (changelog) | |
304 | 163 (manifests) |
|
306 | 163 (manifests) | |
305 | 133 a |
|
307 | 133 a | |
306 | saved backup bundle to $TESTTMP/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg |
|
308 | saved backup bundle to $TESTTMP/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg | |
307 | 1 changesets found |
|
309 | 1 changesets found | |
308 | uncompressed size of bundle content: |
|
310 | uncompressed size of bundle content: | |
309 | 257 (changelog) |
|
311 | 257 (changelog) | |
310 | 163 (manifests) |
|
312 | 163 (manifests) | |
311 | 135 a |
|
313 | 135 a | |
312 | adding branch |
|
314 | adding branch | |
313 | adding changesets |
|
315 | adding changesets | |
314 | adding manifests |
|
316 | adding manifests | |
315 | adding file changes |
|
317 | adding file changes | |
316 | added 1 changesets with 1 changes to 1 files |
|
318 | added 1 changesets with 1 changes to 1 files | |
317 | committed changeset 1:7892795b8e38 |
|
319 | committed changeset 1:7892795b8e38 | |
318 |
|
320 | |||
319 | $ rm editor.sh |
|
321 | $ rm editor.sh | |
320 | $ hg log -r . |
|
322 | $ hg log -r . | |
321 | changeset: 1:7892795b8e38 |
|
323 | changeset: 1:7892795b8e38 | |
322 | tag: tip |
|
324 | tag: tip | |
323 | user: foo |
|
325 | user: foo | |
324 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
326 | date: Thu Jan 01 00:00:01 1970 +0000 | |
325 | summary: another precious commit message |
|
327 | summary: another precious commit message | |
326 |
|
328 | |||
327 |
|
329 | |||
328 | Moving bookmarks, preserve active bookmark: |
|
330 | Moving bookmarks, preserve active bookmark: | |
329 |
|
331 | |||
330 | $ hg book book1 |
|
332 | $ hg book book1 | |
331 | $ hg book book2 |
|
333 | $ hg book book2 | |
332 | $ hg ci --amend -m 'move bookmarks' |
|
334 | $ hg ci --amend -m 'move bookmarks' | |
333 | saved backup bundle to $TESTTMP/.hg/strip-backup/7892795b8e38-3fb46217-amend.hg |
|
335 | saved backup bundle to $TESTTMP/.hg/strip-backup/7892795b8e38-3fb46217-amend.hg | |
334 | $ hg book |
|
336 | $ hg book | |
335 | book1 1:8311f17e2616 |
|
337 | book1 1:8311f17e2616 | |
336 | * book2 1:8311f17e2616 |
|
338 | * book2 1:8311f17e2616 | |
337 | $ echo a >> a |
|
339 | $ echo a >> a | |
338 | $ hg ci --amend -m 'move bookmarks' |
|
340 | $ hg ci --amend -m 'move bookmarks' | |
339 | saved backup bundle to $TESTTMP/.hg/strip-backup/8311f17e2616-f0504fe3-amend.hg |
|
341 | saved backup bundle to $TESTTMP/.hg/strip-backup/8311f17e2616-f0504fe3-amend.hg | |
340 | $ hg book |
|
342 | $ hg book | |
341 | book1 1:a3b65065808c |
|
343 | book1 1:a3b65065808c | |
342 | * book2 1:a3b65065808c |
|
344 | * book2 1:a3b65065808c | |
343 |
|
345 | |||
344 | abort does not loose bookmarks |
|
346 | abort does not loose bookmarks | |
345 |
|
347 | |||
346 | $ cat > editor.sh << '__EOF__' |
|
348 | $ cat > editor.sh << '__EOF__' | |
347 | > #!/bin/sh |
|
349 | > #!/bin/sh | |
348 | > echo "" > "$1" |
|
350 | > echo "" > "$1" | |
349 | > __EOF__ |
|
351 | > __EOF__ | |
350 | $ echo a >> a |
|
352 | $ echo a >> a | |
351 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
353 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
352 | abort: empty commit message |
|
354 | abort: empty commit message | |
353 | [255] |
|
355 | [255] | |
354 | $ hg book |
|
356 | $ hg book | |
355 | book1 1:a3b65065808c |
|
357 | book1 1:a3b65065808c | |
356 | * book2 1:a3b65065808c |
|
358 | * book2 1:a3b65065808c | |
357 | $ hg revert -Caq |
|
359 | $ hg revert -Caq | |
358 | $ rm editor.sh |
|
360 | $ rm editor.sh | |
359 |
|
361 | |||
360 | $ echo '[defaults]' >> $HGRCPATH |
|
362 | $ echo '[defaults]' >> $HGRCPATH | |
361 | $ echo "commit=-d '0 0'" >> $HGRCPATH |
|
363 | $ echo "commit=-d '0 0'" >> $HGRCPATH | |
362 |
|
364 | |||
363 | Moving branches: |
|
365 | Moving branches: | |
364 |
|
366 | |||
365 | $ hg branch foo |
|
367 | $ hg branch foo | |
366 | marked working directory as branch foo |
|
368 | marked working directory as branch foo | |
367 | (branches are permanent and global, did you want a bookmark?) |
|
369 | (branches are permanent and global, did you want a bookmark?) | |
368 | $ echo a >> a |
|
370 | $ echo a >> a | |
369 | $ hg ci -m 'branch foo' |
|
371 | $ hg ci -m 'branch foo' | |
370 | $ hg branch default -f |
|
372 | $ hg branch default -f | |
371 | marked working directory as branch default |
|
373 | marked working directory as branch default | |
372 | $ hg ci --amend -m 'back to default' |
|
374 | $ hg ci --amend -m 'back to default' | |
373 | saved backup bundle to $TESTTMP/.hg/strip-backup/f8339a38efe1-c18453c9-amend.hg |
|
375 | saved backup bundle to $TESTTMP/.hg/strip-backup/f8339a38efe1-c18453c9-amend.hg | |
374 | $ hg branches |
|
376 | $ hg branches | |
375 | default 2:9c07515f2650 |
|
377 | default 2:9c07515f2650 | |
376 |
|
378 | |||
377 | Close branch: |
|
379 | Close branch: | |
378 |
|
380 | |||
379 | $ hg up -q 0 |
|
381 | $ hg up -q 0 | |
380 | $ echo b >> b |
|
382 | $ echo b >> b | |
381 | $ hg branch foo |
|
383 | $ hg branch foo | |
382 | marked working directory as branch foo |
|
384 | marked working directory as branch foo | |
383 | (branches are permanent and global, did you want a bookmark?) |
|
385 | (branches are permanent and global, did you want a bookmark?) | |
384 | $ hg ci -Am 'fork' |
|
386 | $ hg ci -Am 'fork' | |
385 | adding b |
|
387 | adding b | |
386 | $ echo b >> b |
|
388 | $ echo b >> b | |
387 | $ hg ci -mb |
|
389 | $ hg ci -mb | |
388 | $ hg ci --amend --close-branch -m 'closing branch foo' |
|
390 | $ hg ci --amend --close-branch -m 'closing branch foo' | |
389 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-54245dc7-amend.hg |
|
391 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-54245dc7-amend.hg | |
390 |
|
392 | |||
391 | Same thing, different code path: |
|
393 | Same thing, different code path: | |
392 |
|
394 | |||
393 | $ echo b >> b |
|
395 | $ echo b >> b | |
394 | $ hg ci -m 'reopen branch' |
|
396 | $ hg ci -m 'reopen branch' | |
395 | reopening closed branch head 4 |
|
397 | reopening closed branch head 4 | |
396 | $ echo b >> b |
|
398 | $ echo b >> b | |
397 | $ hg ci --amend --close-branch |
|
399 | $ hg ci --amend --close-branch | |
398 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-b900d9fa-amend.hg |
|
400 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-b900d9fa-amend.hg | |
399 | $ hg branches |
|
401 | $ hg branches | |
400 | default 2:9c07515f2650 |
|
402 | default 2:9c07515f2650 | |
401 |
|
403 | |||
402 | Refuse to amend during a merge: |
|
404 | Refuse to amend during a merge: | |
403 |
|
405 | |||
404 | $ hg up -q default |
|
406 | $ hg up -q default | |
405 | $ hg merge foo |
|
407 | $ hg merge foo | |
406 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
408 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
407 | (branch merge, don't forget to commit) |
|
409 | (branch merge, don't forget to commit) | |
408 | $ hg ci --amend |
|
410 | $ hg ci --amend | |
409 | abort: cannot amend while merging |
|
411 | abort: cannot amend while merging | |
410 | [255] |
|
412 | [255] | |
411 | $ hg ci -m 'merge' |
|
413 | $ hg ci -m 'merge' | |
412 |
|
414 | |||
413 | Refuse to amend if there is a merge conflict (issue5805): |
|
415 | Refuse to amend if there is a merge conflict (issue5805): | |
414 |
|
416 | |||
415 | $ hg up -q foo |
|
417 | $ hg up -q foo | |
416 | $ echo c > a |
|
418 | $ echo c > a | |
417 | $ hg up default -t :fail |
|
419 | $ hg up default -t :fail | |
418 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
420 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
419 | use 'hg resolve' to retry unresolved file merges |
|
421 | use 'hg resolve' to retry unresolved file merges | |
420 | [1] |
|
422 | [1] | |
421 | $ hg resolve -l |
|
423 | $ hg resolve -l | |
422 | U a |
|
424 | U a | |
423 |
|
425 | |||
424 | $ hg ci --amend |
|
426 | $ hg ci --amend | |
425 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
427 | abort: unresolved merge conflicts (see 'hg help resolve') | |
426 | [255] |
|
428 | [255] | |
427 |
|
429 | |||
428 | $ hg up -qC . |
|
430 | $ hg up -qC . | |
429 |
|
431 | |||
430 | Follow copies/renames: |
|
432 | Follow copies/renames: | |
431 |
|
433 | |||
432 | $ hg mv b c |
|
434 | $ hg mv b c | |
433 | $ hg ci -m 'b -> c' |
|
435 | $ hg ci -m 'b -> c' | |
434 | $ hg mv c d |
|
436 | $ hg mv c d | |
435 | $ hg ci --amend -m 'b -> d' |
|
437 | $ hg ci --amend -m 'b -> d' | |
436 | saved backup bundle to $TESTTMP/.hg/strip-backup/42f3f27a067d-f23cc9f7-amend.hg |
|
438 | saved backup bundle to $TESTTMP/.hg/strip-backup/42f3f27a067d-f23cc9f7-amend.hg | |
437 | $ hg st --rev '.^' --copies d |
|
439 | $ hg st --rev '.^' --copies d | |
438 | A d |
|
440 | A d | |
439 | b |
|
441 | b | |
440 | $ hg cp d e |
|
442 | $ hg cp d e | |
441 | $ hg ci -m 'e = d' |
|
443 | $ hg ci -m 'e = d' | |
442 | $ hg cp e f |
|
444 | $ hg cp e f | |
443 | $ hg ci --amend -m 'f = d' |
|
445 | $ hg ci --amend -m 'f = d' | |
444 | saved backup bundle to $TESTTMP/.hg/strip-backup/9198f73182d5-251d584a-amend.hg |
|
446 | saved backup bundle to $TESTTMP/.hg/strip-backup/9198f73182d5-251d584a-amend.hg | |
445 | $ hg st --rev '.^' --copies f |
|
447 | $ hg st --rev '.^' --copies f | |
446 | A f |
|
448 | A f | |
447 | d |
|
449 | d | |
448 |
|
450 | |||
449 | $ mv f f.orig |
|
451 | $ mv f f.orig | |
450 | $ hg rm -A f |
|
452 | $ hg rm -A f | |
451 | $ hg ci -m removef |
|
453 | $ hg ci -m removef | |
452 | $ hg cp a f |
|
454 | $ hg cp a f | |
453 | $ mv f.orig f |
|
455 | $ mv f.orig f | |
454 | $ hg ci --amend -m replacef |
|
456 | $ hg ci --amend -m replacef | |
455 | saved backup bundle to $TESTTMP/.hg/strip-backup/f0993ab6b482-eda301bf-amend.hg |
|
457 | saved backup bundle to $TESTTMP/.hg/strip-backup/f0993ab6b482-eda301bf-amend.hg | |
456 | $ hg st --change . --copies |
|
458 | $ hg st --change . --copies | |
457 | $ hg log -r . --template "{file_copies}\n" |
|
459 | $ hg log -r . --template "{file_copies}\n" | |
458 |
|
460 | |||
459 |
|
461 | |||
460 | Move added file (issue3410): |
|
462 | Move added file (issue3410): | |
461 |
|
463 | |||
462 | $ echo g >> g |
|
464 | $ echo g >> g | |
463 | $ hg ci -Am g |
|
465 | $ hg ci -Am g | |
464 | adding g |
|
466 | adding g | |
465 | $ hg mv g h |
|
467 | $ hg mv g h | |
466 | $ hg ci --amend |
|
468 | $ hg ci --amend | |
467 | saved backup bundle to $TESTTMP/.hg/strip-backup/58585e3f095c-0f5ebcda-amend.hg |
|
469 | saved backup bundle to $TESTTMP/.hg/strip-backup/58585e3f095c-0f5ebcda-amend.hg | |
468 | $ hg st --change . --copies h |
|
470 | $ hg st --change . --copies h | |
469 | A h |
|
471 | A h | |
470 | $ hg log -r . --template "{file_copies}\n" |
|
472 | $ hg log -r . --template "{file_copies}\n" | |
471 |
|
473 | |||
472 |
|
474 | |||
473 | Can't rollback an amend: |
|
475 | Can't rollback an amend: | |
474 |
|
476 | |||
475 | $ hg rollback |
|
477 | $ hg rollback | |
476 | no rollback information available |
|
478 | no rollback information available | |
477 | [1] |
|
479 | [1] | |
478 |
|
480 | |||
479 | Preserve extra dict (issue3430): |
|
481 | Preserve extra dict (issue3430): | |
480 |
|
482 | |||
481 | $ hg branch a |
|
483 | $ hg branch a | |
482 | marked working directory as branch a |
|
484 | marked working directory as branch a | |
483 | (branches are permanent and global, did you want a bookmark?) |
|
485 | (branches are permanent and global, did you want a bookmark?) | |
484 | $ echo a >> a |
|
486 | $ echo a >> a | |
485 | $ hg ci -ma |
|
487 | $ hg ci -ma | |
486 | $ hg ci --amend -m "a'" |
|
488 | $ hg ci --amend -m "a'" | |
487 | saved backup bundle to $TESTTMP/.hg/strip-backup/39a162f1d65e-9dfe13d8-amend.hg |
|
489 | saved backup bundle to $TESTTMP/.hg/strip-backup/39a162f1d65e-9dfe13d8-amend.hg | |
488 | $ hg log -r . --template "{branch}\n" |
|
490 | $ hg log -r . --template "{branch}\n" | |
489 | a |
|
491 | a | |
490 | $ hg ci --amend -m "a''" |
|
492 | $ hg ci --amend -m "a''" | |
491 | saved backup bundle to $TESTTMP/.hg/strip-backup/d5ca7b1ac72b-0b4c1a34-amend.hg |
|
493 | saved backup bundle to $TESTTMP/.hg/strip-backup/d5ca7b1ac72b-0b4c1a34-amend.hg | |
492 | $ hg log -r . --template "{branch}\n" |
|
494 | $ hg log -r . --template "{branch}\n" | |
493 | a |
|
495 | a | |
494 |
|
496 | |||
495 | Also preserve other entries in the dict that are in the old commit, |
|
497 | Also preserve other entries in the dict that are in the old commit, | |
496 | first graft something so there's an additional entry: |
|
498 | first graft something so there's an additional entry: | |
497 |
|
499 | |||
498 | $ hg up 0 -q |
|
500 | $ hg up 0 -q | |
499 | $ echo z > z |
|
501 | $ echo z > z | |
500 | $ hg ci -Am 'fork' |
|
502 | $ hg ci -Am 'fork' | |
501 | adding z |
|
503 | adding z | |
502 | created new head |
|
504 | created new head | |
503 | $ hg up 11 |
|
505 | $ hg up 11 | |
504 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
506 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
505 | $ hg graft 12 |
|
507 | $ hg graft 12 | |
506 | grafting 12:2647734878ef "fork" (tip) |
|
508 | grafting 12:2647734878ef "fork" (tip) | |
507 | $ hg ci --amend -m 'graft amend' |
|
509 | $ hg ci --amend -m 'graft amend' | |
508 | saved backup bundle to $TESTTMP/.hg/strip-backup/fe8c6f7957ca-25638666-amend.hg |
|
510 | saved backup bundle to $TESTTMP/.hg/strip-backup/fe8c6f7957ca-25638666-amend.hg | |
509 | $ hg log -r . --debug | grep extra |
|
511 | $ hg log -r . --debug | grep extra | |
510 | extra: amend_source=fe8c6f7957ca1665ed77496ed7a07657d469ac60 |
|
512 | extra: amend_source=fe8c6f7957ca1665ed77496ed7a07657d469ac60 | |
511 | extra: branch=a |
|
513 | extra: branch=a | |
512 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
|
514 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a | |
513 |
|
515 | |||
514 | Preserve phase |
|
516 | Preserve phase | |
515 |
|
517 | |||
516 | $ hg phase '.^::.' |
|
518 | $ hg phase '.^::.' | |
517 | 11: draft |
|
519 | 11: draft | |
518 | 13: draft |
|
520 | 13: draft | |
519 | $ hg phase --secret --force . |
|
521 | $ hg phase --secret --force . | |
520 | $ hg phase '.^::.' |
|
522 | $ hg phase '.^::.' | |
521 | 11: draft |
|
523 | 11: draft | |
522 | 13: secret |
|
524 | 13: secret | |
523 | $ hg commit --amend -m 'amend for phase' -q |
|
525 | $ hg commit --amend -m 'amend for phase' -q | |
524 | $ hg phase '.^::.' |
|
526 | $ hg phase '.^::.' | |
525 | 11: draft |
|
527 | 11: draft | |
526 | 13: secret |
|
528 | 13: secret | |
527 |
|
529 | |||
528 | Test amend with obsolete |
|
530 | Test amend with obsolete | |
529 | --------------------------- |
|
531 | --------------------------- | |
530 |
|
532 | |||
531 | Enable obsolete |
|
533 | Enable obsolete | |
532 |
|
534 | |||
533 | $ cat >> $HGRCPATH << EOF |
|
535 | $ cat >> $HGRCPATH << EOF | |
534 | > [experimental] |
|
536 | > [experimental] | |
535 | > evolution.createmarkers=True |
|
537 | > evolution.createmarkers=True | |
536 | > evolution.allowunstable=True |
|
538 | > evolution.allowunstable=True | |
537 | > EOF |
|
539 | > EOF | |
538 |
|
540 | |||
539 | Amend with no files changes |
|
541 | Amend with no files changes | |
540 |
|
542 | |||
541 | $ hg id -n |
|
543 | $ hg id -n | |
542 | 13 |
|
544 | 13 | |
543 | $ hg ci --amend -m 'babar' |
|
545 | $ hg ci --amend -m 'babar' | |
544 | $ hg id -n |
|
546 | $ hg id -n | |
545 | 14 |
|
547 | 14 | |
546 | $ hg log -Gl 3 --style=compact |
|
548 | $ hg log -Gl 3 --style=compact | |
547 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test |
|
549 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
548 | | babar |
|
550 | | babar | |
549 | | |
|
551 | | | |
550 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
552 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
551 | | | fork |
|
553 | | | fork | |
552 | | ~ |
|
554 | | ~ | |
553 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
555 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
554 | | a'' |
|
556 | | a'' | |
555 | ~ |
|
557 | ~ | |
556 | $ hg log -Gl 4 --hidden --style=compact |
|
558 | $ hg log -Gl 4 --hidden --style=compact | |
557 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test |
|
559 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
558 | | babar |
|
560 | | babar | |
559 | | |
|
561 | | | |
560 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test |
|
562 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
561 | |/ amend for phase |
|
563 | |/ amend for phase | |
562 | | |
|
564 | | | |
563 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
565 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
564 | | | fork |
|
566 | | | fork | |
565 | | ~ |
|
567 | | ~ | |
566 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
568 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
567 | | a'' |
|
569 | | a'' | |
568 | ~ |
|
570 | ~ | |
569 |
|
571 | |||
570 | Amend with files changes |
|
572 | Amend with files changes | |
571 |
|
573 | |||
572 | (note: the extra commit over 15 is a temporary junk I would be happy to get |
|
574 | (note: the extra commit over 15 is a temporary junk I would be happy to get | |
573 | ride of) |
|
575 | ride of) | |
574 |
|
576 | |||
575 | $ echo 'babar' >> a |
|
577 | $ echo 'babar' >> a | |
576 | $ hg commit --amend |
|
578 | $ hg commit --amend | |
577 | $ hg log -Gl 6 --hidden --style=compact |
|
579 | $ hg log -Gl 6 --hidden --style=compact | |
578 | @ 15[tip]:11 a5b42b49b0d5 1970-01-01 00:00 +0000 test |
|
580 | @ 15[tip]:11 a5b42b49b0d5 1970-01-01 00:00 +0000 test | |
579 | | babar |
|
581 | | babar | |
580 | | |
|
582 | | | |
581 | | x 14:11 682950e85999 1970-01-01 00:00 +0000 test |
|
583 | | x 14:11 682950e85999 1970-01-01 00:00 +0000 test | |
582 | |/ babar |
|
584 | |/ babar | |
583 | | |
|
585 | | | |
584 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test |
|
586 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
585 | |/ amend for phase |
|
587 | |/ amend for phase | |
586 | | |
|
588 | | | |
587 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
589 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
588 | | | fork |
|
590 | | | fork | |
589 | | ~ |
|
591 | | ~ | |
590 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
592 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
591 | | a'' |
|
593 | | a'' | |
592 | | |
|
594 | | | |
593 | o 10 5fa75032e226 1970-01-01 00:00 +0000 test |
|
595 | o 10 5fa75032e226 1970-01-01 00:00 +0000 test | |
594 | | g |
|
596 | | g | |
595 | ~ |
|
597 | ~ | |
596 |
|
598 | |||
597 |
|
599 | |||
598 | Test that amend does not make it easy to create obsolescence cycle |
|
600 | Test that amend does not make it easy to create obsolescence cycle | |
599 | --------------------------------------------------------------------- |
|
601 | --------------------------------------------------------------------- | |
600 |
|
602 | |||
601 | $ hg id -r 14 --hidden |
|
603 | $ hg id -r 14 --hidden | |
602 | 682950e85999 (a) |
|
604 | 682950e85999 (a) | |
603 | $ hg revert -ar 14 --hidden |
|
605 | $ hg revert -ar 14 --hidden | |
604 | reverting a |
|
606 | reverting a | |
605 | $ hg commit --amend |
|
607 | $ hg commit --amend | |
606 | $ hg id |
|
608 | $ hg id | |
607 | 37973c7e0b61 (a) tip |
|
609 | 37973c7e0b61 (a) tip | |
608 |
|
610 | |||
609 | Test that rewriting leaving instability behind is allowed |
|
611 | Test that rewriting leaving instability behind is allowed | |
610 | --------------------------------------------------------------------- |
|
612 | --------------------------------------------------------------------- | |
611 |
|
613 | |||
612 | $ hg up '.^' |
|
614 | $ hg up '.^' | |
613 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
615 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
614 | $ echo 'b' >> a |
|
616 | $ echo 'b' >> a | |
615 | $ hg log --style compact -r 'children(.)' |
|
617 | $ hg log --style compact -r 'children(.)' | |
616 | 16[tip]:11 37973c7e0b61 1970-01-01 00:00 +0000 test |
|
618 | 16[tip]:11 37973c7e0b61 1970-01-01 00:00 +0000 test | |
617 | babar |
|
619 | babar | |
618 |
|
620 | |||
619 | $ hg commit --amend |
|
621 | $ hg commit --amend | |
620 | 1 new orphan changesets |
|
622 | 1 new orphan changesets | |
621 | $ hg log -r 'orphan()' |
|
623 | $ hg log -r 'orphan()' | |
622 | changeset: 16:37973c7e0b61 |
|
624 | changeset: 16:37973c7e0b61 | |
623 | branch: a |
|
625 | branch: a | |
624 | parent: 11:0ddb275cfad1 |
|
626 | parent: 11:0ddb275cfad1 | |
625 | user: test |
|
627 | user: test | |
626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
628 | date: Thu Jan 01 00:00:00 1970 +0000 | |
627 | instability: orphan |
|
629 | instability: orphan | |
628 | summary: babar |
|
630 | summary: babar | |
629 |
|
631 | |||
630 |
|
632 | |||
631 | Amend a merge changeset (with renames and conflicts from the second parent): |
|
633 | Amend a merge changeset (with renames and conflicts from the second parent): | |
632 |
|
634 | |||
633 | $ hg up -q default |
|
635 | $ hg up -q default | |
634 | $ hg branch -q bar |
|
636 | $ hg branch -q bar | |
635 | $ hg cp a aa |
|
637 | $ hg cp a aa | |
636 | $ hg mv z zz |
|
638 | $ hg mv z zz | |
637 | $ echo cc > cc |
|
639 | $ echo cc > cc | |
638 | $ hg add cc |
|
640 | $ hg add cc | |
639 | $ hg ci -m aazzcc |
|
641 | $ hg ci -m aazzcc | |
640 | $ hg up -q default |
|
642 | $ hg up -q default | |
641 | $ echo a >> a |
|
643 | $ echo a >> a | |
642 | $ echo dd > cc |
|
644 | $ echo dd > cc | |
643 | $ hg add cc |
|
645 | $ hg add cc | |
644 | $ hg ci -m aa |
|
646 | $ hg ci -m aa | |
645 | $ hg merge -q bar |
|
647 | $ hg merge -q bar | |
646 | warning: conflicts while merging cc! (edit, then use 'hg resolve --mark') |
|
648 | warning: conflicts while merging cc! (edit, then use 'hg resolve --mark') | |
647 | [1] |
|
649 | [1] | |
648 | $ hg resolve -m cc |
|
650 | $ hg resolve -m cc | |
649 | (no more unresolved files) |
|
651 | (no more unresolved files) | |
650 | $ hg ci -m 'merge bar' |
|
652 | $ hg ci -m 'merge bar' | |
651 | $ hg log --config diff.git=1 -pr . |
|
653 | $ hg log --config diff.git=1 -pr . | |
652 | changeset: 20:163cfd7219f7 |
|
654 | changeset: 20:163cfd7219f7 | |
653 | tag: tip |
|
655 | tag: tip | |
654 | parent: 19:30d96aeaf27b |
|
656 | parent: 19:30d96aeaf27b | |
655 | parent: 18:1aa437659d19 |
|
657 | parent: 18:1aa437659d19 | |
656 | user: test |
|
658 | user: test | |
657 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
659 | date: Thu Jan 01 00:00:00 1970 +0000 | |
658 | summary: merge bar |
|
660 | summary: merge bar | |
659 |
|
661 | |||
660 | diff --git a/a b/aa |
|
662 | diff --git a/a b/aa | |
661 | copy from a |
|
663 | copy from a | |
662 | copy to aa |
|
664 | copy to aa | |
663 | diff --git a/cc b/cc |
|
665 | diff --git a/cc b/cc | |
664 | --- a/cc |
|
666 | --- a/cc | |
665 | +++ b/cc |
|
667 | +++ b/cc | |
666 | @@ -1,1 +1,5 @@ |
|
668 | @@ -1,1 +1,5 @@ | |
667 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
669 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
668 | dd |
|
670 | dd | |
669 | +======= |
|
671 | +======= | |
670 | +cc |
|
672 | +cc | |
671 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
673 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
672 | diff --git a/z b/zz |
|
674 | diff --git a/z b/zz | |
673 | rename from z |
|
675 | rename from z | |
674 | rename to zz |
|
676 | rename to zz | |
675 |
|
677 | |||
676 | $ hg debugrename aa |
|
678 | $ hg debugrename aa | |
677 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
679 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
678 | $ hg debugrename zz |
|
680 | $ hg debugrename zz | |
679 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
681 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
680 | $ hg debugrename cc |
|
682 | $ hg debugrename cc | |
681 | cc not renamed |
|
683 | cc not renamed | |
682 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit |
|
684 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit | |
683 | HGEDITFORM=commit.amend.merge |
|
685 | HGEDITFORM=commit.amend.merge | |
684 | $ hg log --config diff.git=1 -pr . |
|
686 | $ hg log --config diff.git=1 -pr . | |
685 | changeset: 21:bca52d4ed186 |
|
687 | changeset: 21:bca52d4ed186 | |
686 | tag: tip |
|
688 | tag: tip | |
687 | parent: 19:30d96aeaf27b |
|
689 | parent: 19:30d96aeaf27b | |
688 | parent: 18:1aa437659d19 |
|
690 | parent: 18:1aa437659d19 | |
689 | user: test |
|
691 | user: test | |
690 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
692 | date: Thu Jan 01 00:00:00 1970 +0000 | |
691 | summary: merge bar (amend message) |
|
693 | summary: merge bar (amend message) | |
692 |
|
694 | |||
693 | diff --git a/a b/aa |
|
695 | diff --git a/a b/aa | |
694 | copy from a |
|
696 | copy from a | |
695 | copy to aa |
|
697 | copy to aa | |
696 | diff --git a/cc b/cc |
|
698 | diff --git a/cc b/cc | |
697 | --- a/cc |
|
699 | --- a/cc | |
698 | +++ b/cc |
|
700 | +++ b/cc | |
699 | @@ -1,1 +1,5 @@ |
|
701 | @@ -1,1 +1,5 @@ | |
700 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
702 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
701 | dd |
|
703 | dd | |
702 | +======= |
|
704 | +======= | |
703 | +cc |
|
705 | +cc | |
704 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
706 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
705 | diff --git a/z b/zz |
|
707 | diff --git a/z b/zz | |
706 | rename from z |
|
708 | rename from z | |
707 | rename to zz |
|
709 | rename to zz | |
708 |
|
710 | |||
709 | $ hg debugrename aa |
|
711 | $ hg debugrename aa | |
710 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
712 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
711 | $ hg debugrename zz |
|
713 | $ hg debugrename zz | |
712 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
714 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
713 | $ hg debugrename cc |
|
715 | $ hg debugrename cc | |
714 | cc not renamed |
|
716 | cc not renamed | |
715 | $ hg mv zz z |
|
717 | $ hg mv zz z | |
716 | $ hg ci --amend -m 'merge bar (undo rename)' |
|
718 | $ hg ci --amend -m 'merge bar (undo rename)' | |
717 | $ hg log --config diff.git=1 -pr . |
|
719 | $ hg log --config diff.git=1 -pr . | |
718 | changeset: 22:12594a98ca3f |
|
720 | changeset: 22:12594a98ca3f | |
719 | tag: tip |
|
721 | tag: tip | |
720 | parent: 19:30d96aeaf27b |
|
722 | parent: 19:30d96aeaf27b | |
721 | parent: 18:1aa437659d19 |
|
723 | parent: 18:1aa437659d19 | |
722 | user: test |
|
724 | user: test | |
723 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
725 | date: Thu Jan 01 00:00:00 1970 +0000 | |
724 | summary: merge bar (undo rename) |
|
726 | summary: merge bar (undo rename) | |
725 |
|
727 | |||
726 | diff --git a/a b/aa |
|
728 | diff --git a/a b/aa | |
727 | copy from a |
|
729 | copy from a | |
728 | copy to aa |
|
730 | copy to aa | |
729 | diff --git a/cc b/cc |
|
731 | diff --git a/cc b/cc | |
730 | --- a/cc |
|
732 | --- a/cc | |
731 | +++ b/cc |
|
733 | +++ b/cc | |
732 | @@ -1,1 +1,5 @@ |
|
734 | @@ -1,1 +1,5 @@ | |
733 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
735 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
734 | dd |
|
736 | dd | |
735 | +======= |
|
737 | +======= | |
736 | +cc |
|
738 | +cc | |
737 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
739 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
738 |
|
740 | |||
739 | $ hg debugrename z |
|
741 | $ hg debugrename z | |
740 | z not renamed |
|
742 | z not renamed | |
741 |
|
743 | |||
742 | Amend a merge changeset (with renames during the merge): |
|
744 | Amend a merge changeset (with renames during the merge): | |
743 |
|
745 | |||
744 | $ hg up -q bar |
|
746 | $ hg up -q bar | |
745 | $ echo x > x |
|
747 | $ echo x > x | |
746 | $ hg add x |
|
748 | $ hg add x | |
747 | $ hg ci -m x |
|
749 | $ hg ci -m x | |
748 | $ hg up -q default |
|
750 | $ hg up -q default | |
749 | $ hg merge -q bar |
|
751 | $ hg merge -q bar | |
750 | $ hg mv aa aaa |
|
752 | $ hg mv aa aaa | |
751 | $ echo aa >> aaa |
|
753 | $ echo aa >> aaa | |
752 | $ hg ci -m 'merge bar again' |
|
754 | $ hg ci -m 'merge bar again' | |
753 | $ hg log --config diff.git=1 -pr . |
|
755 | $ hg log --config diff.git=1 -pr . | |
754 | changeset: 24:dffde028b388 |
|
756 | changeset: 24:dffde028b388 | |
755 | tag: tip |
|
757 | tag: tip | |
756 | parent: 22:12594a98ca3f |
|
758 | parent: 22:12594a98ca3f | |
757 | parent: 23:4c94d5bc65f5 |
|
759 | parent: 23:4c94d5bc65f5 | |
758 | user: test |
|
760 | user: test | |
759 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
761 | date: Thu Jan 01 00:00:00 1970 +0000 | |
760 | summary: merge bar again |
|
762 | summary: merge bar again | |
761 |
|
763 | |||
762 | diff --git a/aa b/aa |
|
764 | diff --git a/aa b/aa | |
763 | deleted file mode 100644 |
|
765 | deleted file mode 100644 | |
764 | --- a/aa |
|
766 | --- a/aa | |
765 | +++ /dev/null |
|
767 | +++ /dev/null | |
766 | @@ -1,2 +0,0 @@ |
|
768 | @@ -1,2 +0,0 @@ | |
767 | -a |
|
769 | -a | |
768 | -a |
|
770 | -a | |
769 | diff --git a/aaa b/aaa |
|
771 | diff --git a/aaa b/aaa | |
770 | new file mode 100644 |
|
772 | new file mode 100644 | |
771 | --- /dev/null |
|
773 | --- /dev/null | |
772 | +++ b/aaa |
|
774 | +++ b/aaa | |
773 | @@ -0,0 +1,3 @@ |
|
775 | @@ -0,0 +1,3 @@ | |
774 | +a |
|
776 | +a | |
775 | +a |
|
777 | +a | |
776 | +aa |
|
778 | +aa | |
777 | diff --git a/x b/x |
|
779 | diff --git a/x b/x | |
778 | new file mode 100644 |
|
780 | new file mode 100644 | |
779 | --- /dev/null |
|
781 | --- /dev/null | |
780 | +++ b/x |
|
782 | +++ b/x | |
781 | @@ -0,0 +1,1 @@ |
|
783 | @@ -0,0 +1,1 @@ | |
782 | +x |
|
784 | +x | |
783 |
|
785 | |||
784 | $ hg debugrename aaa |
|
786 | $ hg debugrename aaa | |
785 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 |
|
787 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 | |
786 | $ hg mv aaa aa |
|
788 | $ hg mv aaa aa | |
787 | $ hg ci --amend -m 'merge bar again (undo rename)' |
|
789 | $ hg ci --amend -m 'merge bar again (undo rename)' | |
788 | $ hg log --config diff.git=1 -pr . |
|
790 | $ hg log --config diff.git=1 -pr . | |
789 | changeset: 25:18e3ba160489 |
|
791 | changeset: 25:18e3ba160489 | |
790 | tag: tip |
|
792 | tag: tip | |
791 | parent: 22:12594a98ca3f |
|
793 | parent: 22:12594a98ca3f | |
792 | parent: 23:4c94d5bc65f5 |
|
794 | parent: 23:4c94d5bc65f5 | |
793 | user: test |
|
795 | user: test | |
794 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
796 | date: Thu Jan 01 00:00:00 1970 +0000 | |
795 | summary: merge bar again (undo rename) |
|
797 | summary: merge bar again (undo rename) | |
796 |
|
798 | |||
797 | diff --git a/aa b/aa |
|
799 | diff --git a/aa b/aa | |
798 | --- a/aa |
|
800 | --- a/aa | |
799 | +++ b/aa |
|
801 | +++ b/aa | |
800 | @@ -1,2 +1,3 @@ |
|
802 | @@ -1,2 +1,3 @@ | |
801 | a |
|
803 | a | |
802 | a |
|
804 | a | |
803 | +aa |
|
805 | +aa | |
804 | diff --git a/x b/x |
|
806 | diff --git a/x b/x | |
805 | new file mode 100644 |
|
807 | new file mode 100644 | |
806 | --- /dev/null |
|
808 | --- /dev/null | |
807 | +++ b/x |
|
809 | +++ b/x | |
808 | @@ -0,0 +1,1 @@ |
|
810 | @@ -0,0 +1,1 @@ | |
809 | +x |
|
811 | +x | |
810 |
|
812 | |||
811 | $ hg debugrename aa |
|
813 | $ hg debugrename aa | |
812 | aa not renamed |
|
814 | aa not renamed | |
813 | $ hg debugrename -r '.^' aa |
|
815 | $ hg debugrename -r '.^' aa | |
814 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
816 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
815 |
|
817 | |||
816 | Amend a merge changeset (with manifest-level conflicts): |
|
818 | Amend a merge changeset (with manifest-level conflicts): | |
817 |
|
819 | |||
818 | $ hg up -q bar |
|
820 | $ hg up -q bar | |
819 | $ hg rm aa |
|
821 | $ hg rm aa | |
820 | $ hg ci -m 'rm aa' |
|
822 | $ hg ci -m 'rm aa' | |
821 | $ hg up -q default |
|
823 | $ hg up -q default | |
822 | $ echo aa >> aa |
|
824 | $ echo aa >> aa | |
823 | $ hg ci -m aa |
|
825 | $ hg ci -m aa | |
824 | $ hg merge -q bar --config ui.interactive=True << EOF |
|
826 | $ hg merge -q bar --config ui.interactive=True << EOF | |
825 | > c |
|
827 | > c | |
826 | > EOF |
|
828 | > EOF | |
827 | local [working copy] changed aa which other [merge rev] deleted |
|
829 | local [working copy] changed aa which other [merge rev] deleted | |
828 | use (c)hanged version, (d)elete, or leave (u)nresolved? c |
|
830 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
829 | $ hg ci -m 'merge bar (with conflicts)' |
|
831 | $ hg ci -m 'merge bar (with conflicts)' | |
830 | $ hg log --config diff.git=1 -pr . |
|
832 | $ hg log --config diff.git=1 -pr . | |
831 | changeset: 28:b4c3035e2544 |
|
833 | changeset: 28:b4c3035e2544 | |
832 | tag: tip |
|
834 | tag: tip | |
833 | parent: 27:4b216ca5ba97 |
|
835 | parent: 27:4b216ca5ba97 | |
834 | parent: 26:67db8847a540 |
|
836 | parent: 26:67db8847a540 | |
835 | user: test |
|
837 | user: test | |
836 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
838 | date: Thu Jan 01 00:00:00 1970 +0000 | |
837 | summary: merge bar (with conflicts) |
|
839 | summary: merge bar (with conflicts) | |
838 |
|
840 | |||
839 |
|
841 | |||
840 | $ hg rm aa |
|
842 | $ hg rm aa | |
841 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' |
|
843 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' | |
842 | $ hg log --config diff.git=1 -pr . |
|
844 | $ hg log --config diff.git=1 -pr . | |
843 | changeset: 29:1205ed810051 |
|
845 | changeset: 29:1205ed810051 | |
844 | tag: tip |
|
846 | tag: tip | |
845 | parent: 27:4b216ca5ba97 |
|
847 | parent: 27:4b216ca5ba97 | |
846 | parent: 26:67db8847a540 |
|
848 | parent: 26:67db8847a540 | |
847 | user: test |
|
849 | user: test | |
848 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
850 | date: Thu Jan 01 00:00:00 1970 +0000 | |
849 | summary: merge bar (with conflicts, amended) |
|
851 | summary: merge bar (with conflicts, amended) | |
850 |
|
852 | |||
851 | diff --git a/aa b/aa |
|
853 | diff --git a/aa b/aa | |
852 | deleted file mode 100644 |
|
854 | deleted file mode 100644 | |
853 | --- a/aa |
|
855 | --- a/aa | |
854 | +++ /dev/null |
|
856 | +++ /dev/null | |
855 | @@ -1,4 +0,0 @@ |
|
857 | @@ -1,4 +0,0 @@ | |
856 | -a |
|
858 | -a | |
857 | -a |
|
859 | -a | |
858 | -aa |
|
860 | -aa | |
859 | -aa |
|
861 | -aa | |
860 |
|
862 | |||
861 | Issue 3445: amending with --close-branch a commit that created a new head should fail |
|
863 | Issue 3445: amending with --close-branch a commit that created a new head should fail | |
862 | This shouldn't be possible: |
|
864 | This shouldn't be possible: | |
863 |
|
865 | |||
864 | $ hg up -q default |
|
866 | $ hg up -q default | |
865 | $ hg branch closewithamend |
|
867 | $ hg branch closewithamend | |
866 | marked working directory as branch closewithamend |
|
868 | marked working directory as branch closewithamend | |
867 | $ echo foo > foo |
|
869 | $ echo foo > foo | |
868 | $ hg add foo |
|
870 | $ hg add foo | |
869 | $ hg ci -m.. |
|
871 | $ hg ci -m.. | |
870 | $ hg ci --amend --close-branch -m 'closing' |
|
872 | $ hg ci --amend --close-branch -m 'closing' | |
871 | abort: can only close branch heads |
|
873 | abort: can only close branch heads | |
872 | [255] |
|
874 | [255] | |
873 |
|
875 | |||
874 | This silliness fails: |
|
876 | This silliness fails: | |
875 |
|
877 | |||
876 | $ hg branch silliness |
|
878 | $ hg branch silliness | |
877 | marked working directory as branch silliness |
|
879 | marked working directory as branch silliness | |
878 | $ echo b >> b |
|
880 | $ echo b >> b | |
879 | $ hg ci --close-branch -m'open and close' |
|
881 | $ hg ci --close-branch -m'open and close' | |
880 | abort: can only close branch heads |
|
882 | abort: can only close branch heads | |
881 | [255] |
|
883 | [255] | |
882 |
|
884 | |||
883 | Test that amend with --secret creates new secret changeset forcibly |
|
885 | Test that amend with --secret creates new secret changeset forcibly | |
884 | --------------------------------------------------------------------- |
|
886 | --------------------------------------------------------------------- | |
885 |
|
887 | |||
886 | $ hg phase '.^::.' |
|
888 | $ hg phase '.^::.' | |
887 | 29: draft |
|
889 | 29: draft | |
888 | 30: draft |
|
890 | 30: draft | |
889 | $ hg commit --amend --secret -m 'amend as secret' -q |
|
891 | $ hg commit --amend --secret -m 'amend as secret' -q | |
890 | $ hg phase '.^::.' |
|
892 | $ hg phase '.^::.' | |
891 | 29: draft |
|
893 | 29: draft | |
892 | 31: secret |
|
894 | 31: secret | |
893 |
|
895 | |||
894 | Test that amend with --edit invokes editor forcibly |
|
896 | Test that amend with --edit invokes editor forcibly | |
895 | --------------------------------------------------- |
|
897 | --------------------------------------------------- | |
896 |
|
898 | |||
897 | $ hg parents --template "{desc}\n" |
|
899 | $ hg parents --template "{desc}\n" | |
898 | amend as secret |
|
900 | amend as secret | |
899 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" |
|
901 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" | |
900 | $ hg parents --template "{desc}\n" |
|
902 | $ hg parents --template "{desc}\n" | |
901 | editor should be suppressed |
|
903 | editor should be suppressed | |
902 |
|
904 | |||
903 | $ hg status --rev '.^1::.' |
|
905 | $ hg status --rev '.^1::.' | |
904 | A foo |
|
906 | A foo | |
905 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit |
|
907 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit | |
906 | editor should be invoked |
|
908 | editor should be invoked | |
907 |
|
909 | |||
908 |
|
910 | |||
909 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
911 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
910 | HG: Leave message empty to abort commit. |
|
912 | HG: Leave message empty to abort commit. | |
911 | HG: -- |
|
913 | HG: -- | |
912 | HG: user: test |
|
914 | HG: user: test | |
913 | HG: branch 'silliness' |
|
915 | HG: branch 'silliness' | |
914 | HG: added foo |
|
916 | HG: added foo | |
915 | $ hg parents --template "{desc}\n" |
|
917 | $ hg parents --template "{desc}\n" | |
916 | editor should be invoked |
|
918 | editor should be invoked | |
917 |
|
919 | |||
918 | Test that "diff()" in committemplate works correctly for amending |
|
920 | Test that "diff()" in committemplate works correctly for amending | |
919 | ----------------------------------------------------------------- |
|
921 | ----------------------------------------------------------------- | |
920 |
|
922 | |||
921 | $ cat >> .hg/hgrc <<EOF |
|
923 | $ cat >> .hg/hgrc <<EOF | |
922 | > [committemplate] |
|
924 | > [committemplate] | |
923 | > changeset.commit.amend = {desc}\n |
|
925 | > changeset.commit.amend = {desc}\n | |
924 | > HG: M: {file_mods} |
|
926 | > HG: M: {file_mods} | |
925 | > HG: A: {file_adds} |
|
927 | > HG: A: {file_adds} | |
926 | > HG: R: {file_dels} |
|
928 | > HG: R: {file_dels} | |
927 | > {splitlines(diff()) % 'HG: {line}\n'} |
|
929 | > {splitlines(diff()) % 'HG: {line}\n'} | |
928 | > EOF |
|
930 | > EOF | |
929 |
|
931 | |||
930 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" |
|
932 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" | |
931 | M: |
|
933 | M: | |
932 | A: foo |
|
934 | A: foo | |
933 | R: |
|
935 | R: | |
934 | $ hg status -amr |
|
936 | $ hg status -amr | |
935 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" |
|
937 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" | |
936 | expecting diff of foo |
|
938 | expecting diff of foo | |
937 |
|
939 | |||
938 | HG: M: |
|
940 | HG: M: | |
939 | HG: A: foo |
|
941 | HG: A: foo | |
940 | HG: R: |
|
942 | HG: R: | |
941 | HG: diff -r 1205ed810051 foo |
|
943 | HG: diff -r 1205ed810051 foo | |
942 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
944 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
943 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
945 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
944 | HG: @@ -0,0 +1,1 @@ |
|
946 | HG: @@ -0,0 +1,1 @@ | |
945 | HG: +foo |
|
947 | HG: +foo | |
946 |
|
948 | |||
947 | $ echo y > y |
|
949 | $ echo y > y | |
948 | $ hg add y |
|
950 | $ hg add y | |
949 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" |
|
951 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" | |
950 | expecting diff of foo and y |
|
952 | expecting diff of foo and y | |
951 |
|
953 | |||
952 | HG: M: |
|
954 | HG: M: | |
953 | HG: A: foo y |
|
955 | HG: A: foo y | |
954 | HG: R: |
|
956 | HG: R: | |
955 | HG: diff -r 1205ed810051 foo |
|
957 | HG: diff -r 1205ed810051 foo | |
956 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
958 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
957 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
959 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
958 | HG: @@ -0,0 +1,1 @@ |
|
960 | HG: @@ -0,0 +1,1 @@ | |
959 | HG: +foo |
|
961 | HG: +foo | |
960 | HG: diff -r 1205ed810051 y |
|
962 | HG: diff -r 1205ed810051 y | |
961 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
963 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
962 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
964 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
963 | HG: @@ -0,0 +1,1 @@ |
|
965 | HG: @@ -0,0 +1,1 @@ | |
964 | HG: +y |
|
966 | HG: +y | |
965 |
|
967 | |||
966 | $ hg rm a |
|
968 | $ hg rm a | |
967 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" |
|
969 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" | |
968 | expecting diff of a, foo and y |
|
970 | expecting diff of a, foo and y | |
969 |
|
971 | |||
970 | HG: M: |
|
972 | HG: M: | |
971 | HG: A: foo y |
|
973 | HG: A: foo y | |
972 | HG: R: a |
|
974 | HG: R: a | |
973 | HG: diff -r 1205ed810051 a |
|
975 | HG: diff -r 1205ed810051 a | |
974 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
976 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
975 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
977 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
976 | HG: @@ -1,2 +0,0 @@ |
|
978 | HG: @@ -1,2 +0,0 @@ | |
977 | HG: -a |
|
979 | HG: -a | |
978 | HG: -a |
|
980 | HG: -a | |
979 | HG: diff -r 1205ed810051 foo |
|
981 | HG: diff -r 1205ed810051 foo | |
980 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
982 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
981 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
983 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
982 | HG: @@ -0,0 +1,1 @@ |
|
984 | HG: @@ -0,0 +1,1 @@ | |
983 | HG: +foo |
|
985 | HG: +foo | |
984 | HG: diff -r 1205ed810051 y |
|
986 | HG: diff -r 1205ed810051 y | |
985 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
987 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
986 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
988 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
987 | HG: @@ -0,0 +1,1 @@ |
|
989 | HG: @@ -0,0 +1,1 @@ | |
988 | HG: +y |
|
990 | HG: +y | |
989 |
|
991 | |||
990 | $ hg rm x |
|
992 | $ hg rm x | |
991 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" |
|
993 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" | |
992 | expecting diff of a, foo, x and y |
|
994 | expecting diff of a, foo, x and y | |
993 |
|
995 | |||
994 | HG: M: |
|
996 | HG: M: | |
995 | HG: A: foo y |
|
997 | HG: A: foo y | |
996 | HG: R: a x |
|
998 | HG: R: a x | |
997 | HG: diff -r 1205ed810051 a |
|
999 | HG: diff -r 1205ed810051 a | |
998 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1000 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
999 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1001 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1000 | HG: @@ -1,2 +0,0 @@ |
|
1002 | HG: @@ -1,2 +0,0 @@ | |
1001 | HG: -a |
|
1003 | HG: -a | |
1002 | HG: -a |
|
1004 | HG: -a | |
1003 | HG: diff -r 1205ed810051 foo |
|
1005 | HG: diff -r 1205ed810051 foo | |
1004 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1005 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
1007 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
1006 | HG: @@ -0,0 +1,1 @@ |
|
1008 | HG: @@ -0,0 +1,1 @@ | |
1007 | HG: +foo |
|
1009 | HG: +foo | |
1008 | HG: diff -r 1205ed810051 x |
|
1010 | HG: diff -r 1205ed810051 x | |
1009 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
|
1011 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | |
1010 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1012 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1011 | HG: @@ -1,1 +0,0 @@ |
|
1013 | HG: @@ -1,1 +0,0 @@ | |
1012 | HG: -x |
|
1014 | HG: -x | |
1013 | HG: diff -r 1205ed810051 y |
|
1015 | HG: diff -r 1205ed810051 y | |
1014 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1016 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1015 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
1017 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
1016 | HG: @@ -0,0 +1,1 @@ |
|
1018 | HG: @@ -0,0 +1,1 @@ | |
1017 | HG: +y |
|
1019 | HG: +y | |
1018 |
|
1020 | |||
1019 | $ echo cccc >> cc |
|
1021 | $ echo cccc >> cc | |
1020 | $ hg status -amr |
|
1022 | $ hg status -amr | |
1021 | M cc |
|
1023 | M cc | |
1022 | $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc |
|
1024 | $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc | |
1023 | cc should be excluded |
|
1025 | cc should be excluded | |
1024 |
|
1026 | |||
1025 | HG: M: |
|
1027 | HG: M: | |
1026 | HG: A: foo y |
|
1028 | HG: A: foo y | |
1027 | HG: R: a x |
|
1029 | HG: R: a x | |
1028 | HG: diff -r 1205ed810051 a |
|
1030 | HG: diff -r 1205ed810051 a | |
1029 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1031 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1030 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1032 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1031 | HG: @@ -1,2 +0,0 @@ |
|
1033 | HG: @@ -1,2 +0,0 @@ | |
1032 | HG: -a |
|
1034 | HG: -a | |
1033 | HG: -a |
|
1035 | HG: -a | |
1034 | HG: diff -r 1205ed810051 foo |
|
1036 | HG: diff -r 1205ed810051 foo | |
1035 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1037 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1036 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
1038 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
1037 | HG: @@ -0,0 +1,1 @@ |
|
1039 | HG: @@ -0,0 +1,1 @@ | |
1038 | HG: +foo |
|
1040 | HG: +foo | |
1039 | HG: diff -r 1205ed810051 x |
|
1041 | HG: diff -r 1205ed810051 x | |
1040 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
|
1042 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | |
1041 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1043 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1042 | HG: @@ -1,1 +0,0 @@ |
|
1044 | HG: @@ -1,1 +0,0 @@ | |
1043 | HG: -x |
|
1045 | HG: -x | |
1044 | HG: diff -r 1205ed810051 y |
|
1046 | HG: diff -r 1205ed810051 y | |
1045 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1047 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1046 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
1048 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
1047 | HG: @@ -0,0 +1,1 @@ |
|
1049 | HG: @@ -0,0 +1,1 @@ | |
1048 | HG: +y |
|
1050 | HG: +y | |
1049 |
|
1051 | |||
1050 | Check for issue4405 |
|
1052 | Check for issue4405 | |
1051 | ------------------- |
|
1053 | ------------------- | |
1052 |
|
1054 | |||
1053 | Setup the repo with a file that gets moved in a second commit. |
|
1055 | Setup the repo with a file that gets moved in a second commit. | |
1054 | $ hg init repo |
|
1056 | $ hg init repo | |
1055 | $ cd repo |
|
1057 | $ cd repo | |
1056 | $ touch a0 |
|
1058 | $ touch a0 | |
1057 | $ hg add a0 |
|
1059 | $ hg add a0 | |
1058 | $ hg commit -m a0 |
|
1060 | $ hg commit -m a0 | |
1059 | $ hg mv a0 a1 |
|
1061 | $ hg mv a0 a1 | |
1060 | $ hg commit -m a1 |
|
1062 | $ hg commit -m a1 | |
1061 | $ hg up -q 0 |
|
1063 | $ hg up -q 0 | |
1062 | $ hg log -G --template '{rev} {desc}' |
|
1064 | $ hg log -G --template '{rev} {desc}' | |
1063 | o 1 a1 |
|
1065 | o 1 a1 | |
1064 | | |
|
1066 | | | |
1065 | @ 0 a0 |
|
1067 | @ 0 a0 | |
1066 |
|
1068 | |||
1067 |
|
1069 | |||
1068 | Now we branch the repro, but re-use the file contents, so we have a divergence |
|
1070 | Now we branch the repro, but re-use the file contents, so we have a divergence | |
1069 | in the file revlog topology and the changelog topology. |
|
1071 | in the file revlog topology and the changelog topology. | |
1070 | $ hg revert --rev 1 --all |
|
1072 | $ hg revert --rev 1 --all | |
1071 | removing a0 |
|
1073 | removing a0 | |
1072 | adding a1 |
|
1074 | adding a1 | |
1073 | $ hg ci -qm 'a1-amend' |
|
1075 | $ hg ci -qm 'a1-amend' | |
1074 | $ hg log -G --template '{rev} {desc}' |
|
1076 | $ hg log -G --template '{rev} {desc}' | |
1075 | @ 2 a1-amend |
|
1077 | @ 2 a1-amend | |
1076 | | |
|
1078 | | | |
1077 | | o 1 a1 |
|
1079 | | o 1 a1 | |
1078 | |/ |
|
1080 | |/ | |
1079 | o 0 a0 |
|
1081 | o 0 a0 | |
1080 |
|
1082 | |||
1081 |
|
1083 | |||
1082 | The way mercurial does amends is by folding the working copy and old commit |
|
1084 | The way mercurial does amends is by folding the working copy and old commit | |
1083 | together into another commit (rev 3). During this process, _findlimit is called |
|
1085 | together into another commit (rev 3). During this process, _findlimit is called | |
1084 | to check how far back to look for the transitive closure of file copy |
|
1086 | to check how far back to look for the transitive closure of file copy | |
1085 | information, but due to the divergence of the filelog and changelog graph |
|
1087 | information, but due to the divergence of the filelog and changelog graph | |
1086 | topologies, before _findlimit was fixed, it returned a rev which was not far |
|
1088 | topologies, before _findlimit was fixed, it returned a rev which was not far | |
1087 | enough back in this case. |
|
1089 | enough back in this case. | |
1088 | $ hg mv a1 a2 |
|
1090 | $ hg mv a1 a2 | |
1089 | $ hg status --copies --rev 0 |
|
1091 | $ hg status --copies --rev 0 | |
1090 | A a2 |
|
1092 | A a2 | |
1091 | a0 |
|
1093 | a0 | |
1092 | R a0 |
|
1094 | R a0 | |
1093 | $ hg ci --amend -q |
|
1095 | $ hg ci --amend -q | |
1094 | $ hg log -G --template '{rev} {desc}' |
|
1096 | $ hg log -G --template '{rev} {desc}' | |
1095 | @ 3 a1-amend |
|
1097 | @ 3 a1-amend | |
1096 | | |
|
1098 | | | |
1097 | | o 1 a1 |
|
1099 | | o 1 a1 | |
1098 | |/ |
|
1100 | |/ | |
1099 | o 0 a0 |
|
1101 | o 0 a0 | |
1100 |
|
1102 | |||
1101 |
|
1103 | |||
1102 | Before the fix, the copy information was lost. |
|
1104 | Before the fix, the copy information was lost. | |
1103 | $ hg status --copies --rev 0 |
|
1105 | $ hg status --copies --rev 0 | |
1104 | A a2 |
|
1106 | A a2 | |
1105 | a0 |
|
1107 | a0 | |
1106 | R a0 |
|
1108 | R a0 | |
1107 | $ cd .. |
|
1109 | $ cd .. | |
1108 |
|
1110 | |||
1109 | Check that amend properly preserve rename from directory rename (issue-4516) |
|
1111 | Check that amend properly preserve rename from directory rename (issue-4516) | |
1110 |
|
1112 | |||
1111 | If a parent of the merge renames a full directory, any files added to the old |
|
1113 | If a parent of the merge renames a full directory, any files added to the old | |
1112 | directory in the other parent will be renamed to the new directory. For some |
|
1114 | directory in the other parent will be renamed to the new directory. For some | |
1113 | reason, the rename metadata was when amending such merge. This test ensure we |
|
1115 | reason, the rename metadata was when amending such merge. This test ensure we | |
1114 | do not regress. We have a dedicated repo because it needs a setup with renamed |
|
1116 | do not regress. We have a dedicated repo because it needs a setup with renamed | |
1115 | directory) |
|
1117 | directory) | |
1116 |
|
1118 | |||
1117 | $ hg init issue4516 |
|
1119 | $ hg init issue4516 | |
1118 | $ cd issue4516 |
|
1120 | $ cd issue4516 | |
1119 | $ mkdir olddirname |
|
1121 | $ mkdir olddirname | |
1120 | $ echo line1 > olddirname/commonfile.py |
|
1122 | $ echo line1 > olddirname/commonfile.py | |
1121 | $ hg add olddirname/commonfile.py |
|
1123 | $ hg add olddirname/commonfile.py | |
1122 | $ hg ci -m first |
|
1124 | $ hg ci -m first | |
1123 |
|
1125 | |||
1124 | $ hg branch newdirname |
|
1126 | $ hg branch newdirname | |
1125 | marked working directory as branch newdirname |
|
1127 | marked working directory as branch newdirname | |
1126 | (branches are permanent and global, did you want a bookmark?) |
|
1128 | (branches are permanent and global, did you want a bookmark?) | |
1127 | $ hg mv olddirname newdirname |
|
1129 | $ hg mv olddirname newdirname | |
1128 | moving olddirname/commonfile.py to newdirname/commonfile.py |
|
1130 | moving olddirname/commonfile.py to newdirname/commonfile.py | |
1129 | $ hg ci -m rename |
|
1131 | $ hg ci -m rename | |
1130 |
|
1132 | |||
1131 | $ hg update default |
|
1133 | $ hg update default | |
1132 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1134 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1133 | $ echo line1 > olddirname/newfile.py |
|
1135 | $ echo line1 > olddirname/newfile.py | |
1134 | $ hg add olddirname/newfile.py |
|
1136 | $ hg add olddirname/newfile.py | |
1135 | $ hg ci -m log |
|
1137 | $ hg ci -m log | |
1136 |
|
1138 | |||
1137 | $ hg up newdirname |
|
1139 | $ hg up newdirname | |
1138 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1140 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1139 | $ # create newdirname/newfile.py |
|
1141 | $ # create newdirname/newfile.py | |
1140 | $ hg merge default |
|
1142 | $ hg merge default | |
1141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1143 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1142 | (branch merge, don't forget to commit) |
|
1144 | (branch merge, don't forget to commit) | |
1143 | $ hg ci -m add |
|
1145 | $ hg ci -m add | |
1144 | $ |
|
1146 | $ | |
1145 | $ hg debugrename newdirname/newfile.py |
|
1147 | $ hg debugrename newdirname/newfile.py | |
1146 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def |
|
1148 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def | |
1147 | $ hg status -C --change . |
|
1149 | $ hg status -C --change . | |
1148 | A newdirname/newfile.py |
|
1150 | A newdirname/newfile.py | |
1149 | $ hg status -C --rev 1 |
|
1151 | $ hg status -C --rev 1 | |
1150 | A newdirname/newfile.py |
|
1152 | A newdirname/newfile.py | |
1151 | $ hg status -C --rev 2 |
|
1153 | $ hg status -C --rev 2 | |
1152 | A newdirname/commonfile.py |
|
1154 | A newdirname/commonfile.py | |
1153 | olddirname/commonfile.py |
|
1155 | olddirname/commonfile.py | |
1154 | A newdirname/newfile.py |
|
1156 | A newdirname/newfile.py | |
1155 | olddirname/newfile.py |
|
1157 | olddirname/newfile.py | |
1156 | R olddirname/commonfile.py |
|
1158 | R olddirname/commonfile.py | |
1157 | R olddirname/newfile.py |
|
1159 | R olddirname/newfile.py | |
1158 | $ hg debugindex newdirname/newfile.py |
|
1160 | $ hg debugindex newdirname/newfile.py | |
1159 | rev linkrev nodeid p1 p2 |
|
1161 | rev linkrev nodeid p1 p2 | |
1160 | 0 3 34a4d536c0c0 000000000000 000000000000 |
|
1162 | 0 3 34a4d536c0c0 000000000000 000000000000 | |
1161 |
|
1163 | |||
1162 | $ echo a >> newdirname/commonfile.py |
|
1164 | $ echo a >> newdirname/commonfile.py | |
1163 | $ hg ci --amend -m bug |
|
1165 | $ hg ci --amend -m bug | |
1164 | $ hg debugrename newdirname/newfile.py |
|
1166 | $ hg debugrename newdirname/newfile.py | |
1165 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def |
|
1167 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def | |
1166 | $ hg debugindex newdirname/newfile.py |
|
1168 | $ hg debugindex newdirname/newfile.py | |
1167 | rev linkrev nodeid p1 p2 |
|
1169 | rev linkrev nodeid p1 p2 | |
1168 | 0 3 34a4d536c0c0 000000000000 000000000000 |
|
1170 | 0 3 34a4d536c0c0 000000000000 000000000000 | |
1169 |
|
1171 | |||
1170 | #if execbit |
|
1172 | #if execbit | |
1171 |
|
1173 | |||
1172 | Test if amend preserves executable bit changes |
|
1174 | Test if amend preserves executable bit changes | |
1173 | $ chmod +x newdirname/commonfile.py |
|
1175 | $ chmod +x newdirname/commonfile.py | |
1174 | $ hg ci -m chmod |
|
1176 | $ hg ci -m chmod | |
1175 | $ hg ci --amend -m "chmod amended" |
|
1177 | $ hg ci --amend -m "chmod amended" | |
1176 | $ hg ci --amend -m "chmod amended second time" |
|
1178 | $ hg ci --amend -m "chmod amended second time" | |
1177 | $ hg log -p --git -r . |
|
1179 | $ hg log -p --git -r . | |
1178 | changeset: 7:b1326f52dddf |
|
1180 | changeset: 7:b1326f52dddf | |
1179 | branch: newdirname |
|
1181 | branch: newdirname | |
1180 | tag: tip |
|
1182 | tag: tip | |
1181 | parent: 4:7fd235f7cb2f |
|
1183 | parent: 4:7fd235f7cb2f | |
1182 | user: test |
|
1184 | user: test | |
1183 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1185 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1184 | summary: chmod amended second time |
|
1186 | summary: chmod amended second time | |
1185 |
|
1187 | |||
1186 | diff --git a/newdirname/commonfile.py b/newdirname/commonfile.py |
|
1188 | diff --git a/newdirname/commonfile.py b/newdirname/commonfile.py | |
1187 | old mode 100644 |
|
1189 | old mode 100644 | |
1188 | new mode 100755 |
|
1190 | new mode 100755 | |
1189 |
|
1191 | |||
1190 | #endif |
|
1192 | #endif | |
1191 |
|
1193 | |||
1192 | Test amend with file inclusion options |
|
1194 | Test amend with file inclusion options | |
1193 | -------------------------------------- |
|
1195 | -------------------------------------- | |
1194 |
|
1196 | |||
1195 | These tests ensure that we are always amending some files that were part of the |
|
1197 | These tests ensure that we are always amending some files that were part of the | |
1196 | pre-amend commit. We want to test that the remaining files in the pre-amend |
|
1198 | pre-amend commit. We want to test that the remaining files in the pre-amend | |
1197 | commit were not changed in the amended commit. We do so by performing a diff of |
|
1199 | commit were not changed in the amended commit. We do so by performing a diff of | |
1198 | the amended commit against its parent commit. |
|
1200 | the amended commit against its parent commit. | |
1199 | $ cd .. |
|
1201 | $ cd .. | |
1200 | $ hg init testfileinclusions |
|
1202 | $ hg init testfileinclusions | |
1201 | $ cd testfileinclusions |
|
1203 | $ cd testfileinclusions | |
1202 | $ echo a > a |
|
1204 | $ echo a > a | |
1203 | $ echo b > b |
|
1205 | $ echo b > b | |
1204 | $ hg commit -Aqm "Adding a and b" |
|
1206 | $ hg commit -Aqm "Adding a and b" | |
1205 |
|
1207 | |||
1206 | Only add changes to a particular file |
|
1208 | Only add changes to a particular file | |
1207 | $ echo a >> a |
|
1209 | $ echo a >> a | |
1208 | $ echo b >> b |
|
1210 | $ echo b >> b | |
1209 | $ hg commit --amend -I a |
|
1211 | $ hg commit --amend -I a | |
1210 | $ hg diff --git -r null -r . |
|
1212 | $ hg diff --git -r null -r . | |
1211 | diff --git a/a b/a |
|
1213 | diff --git a/a b/a | |
1212 | new file mode 100644 |
|
1214 | new file mode 100644 | |
1213 | --- /dev/null |
|
1215 | --- /dev/null | |
1214 | +++ b/a |
|
1216 | +++ b/a | |
1215 | @@ -0,0 +1,2 @@ |
|
1217 | @@ -0,0 +1,2 @@ | |
1216 | +a |
|
1218 | +a | |
1217 | +a |
|
1219 | +a | |
1218 | diff --git a/b b/b |
|
1220 | diff --git a/b b/b | |
1219 | new file mode 100644 |
|
1221 | new file mode 100644 | |
1220 | --- /dev/null |
|
1222 | --- /dev/null | |
1221 | +++ b/b |
|
1223 | +++ b/b | |
1222 | @@ -0,0 +1,1 @@ |
|
1224 | @@ -0,0 +1,1 @@ | |
1223 | +b |
|
1225 | +b | |
1224 |
|
1226 | |||
1225 | $ echo a >> a |
|
1227 | $ echo a >> a | |
1226 | $ hg commit --amend b |
|
1228 | $ hg commit --amend b | |
1227 | $ hg diff --git -r null -r . |
|
1229 | $ hg diff --git -r null -r . | |
1228 | diff --git a/a b/a |
|
1230 | diff --git a/a b/a | |
1229 | new file mode 100644 |
|
1231 | new file mode 100644 | |
1230 | --- /dev/null |
|
1232 | --- /dev/null | |
1231 | +++ b/a |
|
1233 | +++ b/a | |
1232 | @@ -0,0 +1,2 @@ |
|
1234 | @@ -0,0 +1,2 @@ | |
1233 | +a |
|
1235 | +a | |
1234 | +a |
|
1236 | +a | |
1235 | diff --git a/b b/b |
|
1237 | diff --git a/b b/b | |
1236 | new file mode 100644 |
|
1238 | new file mode 100644 | |
1237 | --- /dev/null |
|
1239 | --- /dev/null | |
1238 | +++ b/b |
|
1240 | +++ b/b | |
1239 | @@ -0,0 +1,2 @@ |
|
1241 | @@ -0,0 +1,2 @@ | |
1240 | +b |
|
1242 | +b | |
1241 | +b |
|
1243 | +b | |
1242 |
|
1244 | |||
1243 | Exclude changes to a particular file |
|
1245 | Exclude changes to a particular file | |
1244 | $ echo b >> b |
|
1246 | $ echo b >> b | |
1245 | $ hg commit --amend -X a |
|
1247 | $ hg commit --amend -X a | |
1246 | $ hg diff --git -r null -r . |
|
1248 | $ hg diff --git -r null -r . | |
1247 | diff --git a/a b/a |
|
1249 | diff --git a/a b/a | |
1248 | new file mode 100644 |
|
1250 | new file mode 100644 | |
1249 | --- /dev/null |
|
1251 | --- /dev/null | |
1250 | +++ b/a |
|
1252 | +++ b/a | |
1251 | @@ -0,0 +1,2 @@ |
|
1253 | @@ -0,0 +1,2 @@ | |
1252 | +a |
|
1254 | +a | |
1253 | +a |
|
1255 | +a | |
1254 | diff --git a/b b/b |
|
1256 | diff --git a/b b/b | |
1255 | new file mode 100644 |
|
1257 | new file mode 100644 | |
1256 | --- /dev/null |
|
1258 | --- /dev/null | |
1257 | +++ b/b |
|
1259 | +++ b/b | |
1258 | @@ -0,0 +1,3 @@ |
|
1260 | @@ -0,0 +1,3 @@ | |
1259 | +b |
|
1261 | +b | |
1260 | +b |
|
1262 | +b | |
1261 | +b |
|
1263 | +b | |
1262 |
|
1264 | |||
1263 | Check the addremove flag |
|
1265 | Check the addremove flag | |
1264 | $ echo c > c |
|
1266 | $ echo c > c | |
1265 | $ rm a |
|
1267 | $ rm a | |
1266 | $ hg commit --amend -A |
|
1268 | $ hg commit --amend -A | |
1267 | removing a |
|
1269 | removing a | |
1268 | adding c |
|
1270 | adding c | |
1269 | $ hg diff --git -r null -r . |
|
1271 | $ hg diff --git -r null -r . | |
1270 | diff --git a/b b/b |
|
1272 | diff --git a/b b/b | |
1271 | new file mode 100644 |
|
1273 | new file mode 100644 | |
1272 | --- /dev/null |
|
1274 | --- /dev/null | |
1273 | +++ b/b |
|
1275 | +++ b/b | |
1274 | @@ -0,0 +1,3 @@ |
|
1276 | @@ -0,0 +1,3 @@ | |
1275 | +b |
|
1277 | +b | |
1276 | +b |
|
1278 | +b | |
1277 | +b |
|
1279 | +b | |
1278 | diff --git a/c b/c |
|
1280 | diff --git a/c b/c | |
1279 | new file mode 100644 |
|
1281 | new file mode 100644 | |
1280 | --- /dev/null |
|
1282 | --- /dev/null | |
1281 | +++ b/c |
|
1283 | +++ b/c | |
1282 | @@ -0,0 +1,1 @@ |
|
1284 | @@ -0,0 +1,1 @@ | |
1283 | +c |
|
1285 | +c |
@@ -1,597 +1,599 b'' | |||||
1 | Test histedit extension: Fold commands |
|
1 | Test histedit extension: Fold commands | |
2 | ====================================== |
|
2 | ====================================== | |
3 |
|
3 | |||
4 | This test file is dedicated to testing the fold command in non conflicting |
|
4 | This test file is dedicated to testing the fold command in non conflicting | |
5 | case. |
|
5 | case. | |
6 |
|
6 | |||
7 | Initialization |
|
7 | Initialization | |
8 | --------------- |
|
8 | --------------- | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | $ . "$TESTDIR/histedit-helpers.sh" |
|
11 | $ . "$TESTDIR/histedit-helpers.sh" | |
12 |
|
12 | |||
13 | $ cat >> $HGRCPATH <<EOF |
|
13 | $ cat >> $HGRCPATH <<EOF | |
14 | > [alias] |
|
14 | > [alias] | |
15 | > logt = log --template '{rev}:{node|short} {desc|firstline}\n' |
|
15 | > logt = log --template '{rev}:{node|short} {desc|firstline}\n' | |
16 | > [extensions] |
|
16 | > [extensions] | |
17 | > histedit= |
|
17 | > histedit= | |
18 | > EOF |
|
18 | > EOF | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | Simple folding |
|
21 | Simple folding | |
22 | -------------------- |
|
22 | -------------------- | |
23 | $ addwithdate () |
|
23 | $ addwithdate () | |
24 | > { |
|
24 | > { | |
25 | > echo $1 > $1 |
|
25 | > echo $1 > $1 | |
26 | > hg add $1 |
|
26 | > hg add $1 | |
27 | > hg ci -m $1 -d "$2 0" |
|
27 | > hg ci -m $1 -d "$2 0" | |
28 | > } |
|
28 | > } | |
29 |
|
29 | |||
30 | $ initrepo () |
|
30 | $ initrepo () | |
31 | > { |
|
31 | > { | |
32 | > hg init r |
|
32 | > hg init r | |
33 | > cd r |
|
33 | > cd r | |
34 | > addwithdate a 1 |
|
34 | > addwithdate a 1 | |
35 | > addwithdate b 2 |
|
35 | > addwithdate b 2 | |
36 | > addwithdate c 3 |
|
36 | > addwithdate c 3 | |
37 | > addwithdate d 4 |
|
37 | > addwithdate d 4 | |
38 | > addwithdate e 5 |
|
38 | > addwithdate e 5 | |
39 | > addwithdate f 6 |
|
39 | > addwithdate f 6 | |
40 | > } |
|
40 | > } | |
41 |
|
41 | |||
42 | $ initrepo |
|
42 | $ initrepo | |
43 |
|
43 | |||
44 | log before edit |
|
44 | log before edit | |
45 | $ hg logt --graph |
|
45 | $ hg logt --graph | |
46 | @ 5:178e35e0ce73 f |
|
46 | @ 5:178e35e0ce73 f | |
47 | | |
|
47 | | | |
48 | o 4:1ddb6c90f2ee e |
|
48 | o 4:1ddb6c90f2ee e | |
49 | | |
|
49 | | | |
50 | o 3:532247a8969b d |
|
50 | o 3:532247a8969b d | |
51 | | |
|
51 | | | |
52 | o 2:ff2c9fa2018b c |
|
52 | o 2:ff2c9fa2018b c | |
53 | | |
|
53 | | | |
54 | o 1:97d72e5f12c7 b |
|
54 | o 1:97d72e5f12c7 b | |
55 | | |
|
55 | | | |
56 | o 0:8580ff50825a a |
|
56 | o 0:8580ff50825a a | |
57 |
|
57 | |||
58 |
|
58 | |||
59 | $ hg histedit ff2c9fa2018b --commands - 2>&1 <<EOF | fixbundle |
|
59 | $ hg histedit ff2c9fa2018b --commands - 2>&1 <<EOF | fixbundle | |
60 | > pick 1ddb6c90f2ee e |
|
60 | > pick 1ddb6c90f2ee e | |
61 | > pick 178e35e0ce73 f |
|
61 | > pick 178e35e0ce73 f | |
62 | > fold ff2c9fa2018b c |
|
62 | > fold ff2c9fa2018b c | |
63 | > pick 532247a8969b d |
|
63 | > pick 532247a8969b d | |
64 | > EOF |
|
64 | > EOF | |
65 |
|
65 | |||
66 | log after edit |
|
66 | log after edit | |
67 | $ hg logt --graph |
|
67 | $ hg logt --graph | |
68 | @ 4:c4d7f3def76d d |
|
68 | @ 4:c4d7f3def76d d | |
69 | | |
|
69 | | | |
70 | o 3:575228819b7e f |
|
70 | o 3:575228819b7e f | |
71 | | |
|
71 | | | |
72 | o 2:505a591af19e e |
|
72 | o 2:505a591af19e e | |
73 | | |
|
73 | | | |
74 | o 1:97d72e5f12c7 b |
|
74 | o 1:97d72e5f12c7 b | |
75 | | |
|
75 | | | |
76 | o 0:8580ff50825a a |
|
76 | o 0:8580ff50825a a | |
77 |
|
77 | |||
78 |
|
78 | |||
79 | post-fold manifest |
|
79 | post-fold manifest | |
80 | $ hg manifest |
|
80 | $ hg manifest | |
81 | a |
|
81 | a | |
82 | b |
|
82 | b | |
83 | c |
|
83 | c | |
84 | d |
|
84 | d | |
85 | e |
|
85 | e | |
86 | f |
|
86 | f | |
87 |
|
87 | |||
88 |
|
88 | |||
89 | check histedit_source, including that it uses the later date, from the first changeset |
|
89 | check histedit_source, including that it uses the later date, from the first changeset | |
90 |
|
90 | |||
91 | $ hg log --debug --rev 3 |
|
91 | $ hg log --debug --rev 3 | |
92 | changeset: 3:575228819b7e6ed69e8c0a6a383ee59a80db7358 |
|
92 | changeset: 3:575228819b7e6ed69e8c0a6a383ee59a80db7358 | |
93 | phase: draft |
|
93 | phase: draft | |
94 | parent: 2:505a591af19eed18f560af827b9e03d2076773dc |
|
94 | parent: 2:505a591af19eed18f560af827b9e03d2076773dc | |
95 | parent: -1:0000000000000000000000000000000000000000 |
|
95 | parent: -1:0000000000000000000000000000000000000000 | |
96 | manifest: 3:81eede616954057198ead0b2c73b41d1f392829a |
|
96 | manifest: 3:81eede616954057198ead0b2c73b41d1f392829a | |
97 | user: test |
|
97 | user: test | |
98 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
98 | date: Thu Jan 01 00:00:06 1970 +0000 | |
99 | files+: c f |
|
99 | files+: c f | |
100 | extra: branch=default |
|
100 | extra: branch=default | |
101 | extra: histedit_source=7cad1d7030207872dfd1c3a7cb430f24f2884086,ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
101 | extra: histedit_source=7cad1d7030207872dfd1c3a7cb430f24f2884086,ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
102 | description: |
|
102 | description: | |
103 | f |
|
103 | f | |
104 | *** |
|
104 | *** | |
105 | c |
|
105 | c | |
106 |
|
106 | |||
107 |
|
107 | |||
108 |
|
108 | |||
109 | rollup will fold without preserving the folded commit's message or date |
|
109 | rollup will fold without preserving the folded commit's message or date | |
110 |
|
110 | |||
111 | $ OLDHGEDITOR=$HGEDITOR |
|
111 | $ OLDHGEDITOR=$HGEDITOR | |
112 | $ HGEDITOR=false |
|
112 | $ HGEDITOR=false | |
113 | $ hg histedit 97d72e5f12c7 --commands - 2>&1 <<EOF | fixbundle |
|
113 | $ hg histedit 97d72e5f12c7 --commands - 2>&1 <<EOF | fixbundle | |
114 | > pick 97d72e5f12c7 b |
|
114 | > pick 97d72e5f12c7 b | |
115 | > roll 505a591af19e e |
|
115 | > roll 505a591af19e e | |
116 | > pick 575228819b7e f |
|
116 | > pick 575228819b7e f | |
117 | > pick c4d7f3def76d d |
|
117 | > pick c4d7f3def76d d | |
118 | > EOF |
|
118 | > EOF | |
119 |
|
119 | |||
120 | $ HGEDITOR=$OLDHGEDITOR |
|
120 | $ HGEDITOR=$OLDHGEDITOR | |
121 |
|
121 | |||
122 | log after edit |
|
122 | log after edit | |
123 | $ hg logt --graph |
|
123 | $ hg logt --graph | |
124 | @ 3:bab801520cec d |
|
124 | @ 3:bab801520cec d | |
125 | | |
|
125 | | | |
126 | o 2:58c8f2bfc151 f |
|
126 | o 2:58c8f2bfc151 f | |
127 | | |
|
127 | | | |
128 | o 1:5d939c56c72e b |
|
128 | o 1:5d939c56c72e b | |
129 | | |
|
129 | | | |
130 | o 0:8580ff50825a a |
|
130 | o 0:8580ff50825a a | |
131 |
|
131 | |||
132 |
|
132 | |||
133 | description is taken from rollup target commit |
|
133 | description is taken from rollup target commit | |
134 |
|
134 | |||
135 | $ hg log --debug --rev 1 |
|
135 | $ hg log --debug --rev 1 | |
136 | changeset: 1:5d939c56c72e77e29f5167696218e2131a40f5cf |
|
136 | changeset: 1:5d939c56c72e77e29f5167696218e2131a40f5cf | |
137 | phase: draft |
|
137 | phase: draft | |
138 | parent: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
138 | parent: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab | |
139 | parent: -1:0000000000000000000000000000000000000000 |
|
139 | parent: -1:0000000000000000000000000000000000000000 | |
140 | manifest: 1:b5e112a3a8354e269b1524729f0918662d847c38 |
|
140 | manifest: 1:b5e112a3a8354e269b1524729f0918662d847c38 | |
141 | user: test |
|
141 | user: test | |
142 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
142 | date: Thu Jan 01 00:00:02 1970 +0000 | |
143 | files+: b e |
|
143 | files+: b e | |
144 | extra: branch=default |
|
144 | extra: branch=default | |
145 | extra: histedit_source=97d72e5f12c7e84f85064aa72e5a297142c36ed9,505a591af19eed18f560af827b9e03d2076773dc |
|
145 | extra: histedit_source=97d72e5f12c7e84f85064aa72e5a297142c36ed9,505a591af19eed18f560af827b9e03d2076773dc | |
146 | description: |
|
146 | description: | |
147 | b |
|
147 | b | |
148 |
|
148 | |||
149 |
|
149 | |||
150 |
|
150 | |||
151 | check saving last-message.txt |
|
151 | check saving last-message.txt | |
152 |
|
152 | |||
153 | $ cat > $TESTTMP/abortfolding.py <<EOF |
|
153 | $ cat > $TESTTMP/abortfolding.py <<EOF | |
154 | > from mercurial import util |
|
154 | > from mercurial import util | |
155 | > def abortfolding(ui, repo, hooktype, **kwargs): |
|
155 | > def abortfolding(ui, repo, hooktype, **kwargs): | |
156 | > ctx = repo[kwargs.get('node')] |
|
156 | > ctx = repo[kwargs.get('node')] | |
157 | > if set(ctx.files()) == {b'c', b'd', b'f'}: |
|
157 | > if set(ctx.files()) == {b'c', b'd', b'f'}: | |
158 | > return True # abort folding commit only |
|
158 | > return True # abort folding commit only | |
159 | > ui.warn(b'allow non-folding commit\\n') |
|
159 | > ui.warn(b'allow non-folding commit\\n') | |
160 | > EOF |
|
160 | > EOF | |
161 | $ cat > .hg/hgrc <<EOF |
|
161 | $ cat > .hg/hgrc <<EOF | |
162 | > [hooks] |
|
162 | > [hooks] | |
163 | > pretxncommit.abortfolding = python:$TESTTMP/abortfolding.py:abortfolding |
|
163 | > pretxncommit.abortfolding = python:$TESTTMP/abortfolding.py:abortfolding | |
164 | > EOF |
|
164 | > EOF | |
165 |
|
165 | |||
166 | $ cat > $TESTTMP/editor.sh << EOF |
|
166 | $ cat > $TESTTMP/editor.sh << EOF | |
167 | > echo "==== before editing" |
|
167 | > echo "==== before editing" | |
168 | > cat \$1 |
|
168 | > cat \$1 | |
169 | > echo "====" |
|
169 | > echo "====" | |
170 | > echo "check saving last-message.txt" >> \$1 |
|
170 | > echo "check saving last-message.txt" >> \$1 | |
171 | > EOF |
|
171 | > EOF | |
172 |
|
172 | |||
173 | $ rm -f .hg/last-message.txt |
|
173 | $ rm -f .hg/last-message.txt | |
174 | $ hg status --rev '58c8f2bfc151^1::bab801520cec' |
|
174 | $ hg status --rev '58c8f2bfc151^1::bab801520cec' | |
175 | A c |
|
175 | A c | |
176 | A d |
|
176 | A d | |
177 | A f |
|
177 | A f | |
178 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 58c8f2bfc151 --commands - 2>&1 <<EOF |
|
178 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 58c8f2bfc151 --commands - 2>&1 <<EOF | |
179 | > pick 58c8f2bfc151 f |
|
179 | > pick 58c8f2bfc151 f | |
180 | > fold bab801520cec d |
|
180 | > fold bab801520cec d | |
181 | > EOF |
|
181 | > EOF | |
182 | allow non-folding commit |
|
182 | allow non-folding commit | |
183 | ==== before editing |
|
183 | ==== before editing | |
184 | f |
|
184 | f | |
185 | *** |
|
185 | *** | |
186 | c |
|
186 | c | |
187 | *** |
|
187 | *** | |
188 | d |
|
188 | d | |
189 |
|
189 | |||
190 |
|
190 | |||
191 |
|
191 | |||
192 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
192 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
193 | HG: Leave message empty to abort commit. |
|
193 | HG: Leave message empty to abort commit. | |
194 | HG: -- |
|
194 | HG: -- | |
195 | HG: user: test |
|
195 | HG: user: test | |
196 | HG: branch 'default' |
|
196 | HG: branch 'default' | |
197 | HG: added c |
|
197 | HG: added c | |
198 | HG: added d |
|
198 | HG: added d | |
199 | HG: added f |
|
199 | HG: added f | |
200 | ==== |
|
200 | ==== | |
201 | transaction abort! |
|
201 | transaction abort! | |
202 | rollback completed |
|
202 | rollback completed | |
203 | abort: pretxncommit.abortfolding hook failed |
|
203 | abort: pretxncommit.abortfolding hook failed | |
204 | [255] |
|
204 | [255] | |
205 |
|
205 | |||
206 | $ cat .hg/last-message.txt |
|
206 | $ cat .hg/last-message.txt | |
207 | f |
|
207 | f | |
208 | *** |
|
208 | *** | |
209 | c |
|
209 | c | |
210 | *** |
|
210 | *** | |
211 | d |
|
211 | d | |
212 |
|
212 | |||
213 |
|
213 | |||
214 |
|
214 | |||
215 | check saving last-message.txt |
|
215 | check saving last-message.txt | |
216 |
|
216 | |||
217 | $ cd .. |
|
217 | $ cd .. | |
218 | $ rm -r r |
|
218 | $ rm -r r | |
219 |
|
219 | |||
220 | folding preserves initial author but uses later date |
|
220 | folding preserves initial author but uses later date | |
221 | ---------------------------------------------------- |
|
221 | ---------------------------------------------------- | |
222 |
|
222 | |||
223 | $ initrepo |
|
223 | $ initrepo | |
224 |
|
224 | |||
225 | $ hg ci -d '7 0' --user "someone else" --amend --quiet |
|
225 | $ hg ci -d '7 0' --user "someone else" --amend --quiet | |
226 |
|
226 | |||
227 | tip before edit |
|
227 | tip before edit | |
228 | $ hg log --rev . |
|
228 | $ hg log --rev . | |
229 | changeset: 5:10c36dd37515 |
|
229 | changeset: 5:10c36dd37515 | |
230 | tag: tip |
|
230 | tag: tip | |
231 | user: someone else |
|
231 | user: someone else | |
232 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
232 | date: Thu Jan 01 00:00:07 1970 +0000 | |
233 | summary: f |
|
233 | summary: f | |
234 |
|
234 | |||
235 |
|
235 | |||
236 | $ hg --config progress.debug=1 --debug \ |
|
236 | $ hg --config progress.debug=1 --debug \ | |
237 | > histedit 1ddb6c90f2ee --commands - 2>&1 <<EOF | \ |
|
237 | > histedit 1ddb6c90f2ee --commands - 2>&1 <<EOF | \ | |
238 | > egrep 'editing|unresolved' |
|
238 | > egrep 'editing|unresolved' | |
239 | > pick 1ddb6c90f2ee e |
|
239 | > pick 1ddb6c90f2ee e | |
240 | > fold 10c36dd37515 f |
|
240 | > fold 10c36dd37515 f | |
241 | > EOF |
|
241 | > EOF | |
242 | editing: pick 1ddb6c90f2ee 4 e 1/2 changes (50.00%) |
|
242 | editing: pick 1ddb6c90f2ee 4 e 1/2 changes (50.00%) | |
243 | editing: fold 10c36dd37515 5 f 2/2 changes (100.00%) |
|
243 | editing: fold 10c36dd37515 5 f 2/2 changes (100.00%) | |
244 |
|
244 | |||
245 | tip after edit, which should use the later date, from the second changeset |
|
245 | tip after edit, which should use the later date, from the second changeset | |
246 | $ hg log --rev . |
|
246 | $ hg log --rev . | |
247 | changeset: 4:e4f3ec5d0b40 |
|
247 | changeset: 4:e4f3ec5d0b40 | |
248 | tag: tip |
|
248 | tag: tip | |
249 | user: test |
|
249 | user: test | |
250 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
250 | date: Thu Jan 01 00:00:07 1970 +0000 | |
251 | summary: e |
|
251 | summary: e | |
252 |
|
252 | |||
253 |
|
253 | |||
254 | $ cd .. |
|
254 | $ cd .. | |
255 | $ rm -r r |
|
255 | $ rm -r r | |
256 |
|
256 | |||
257 | folding and creating no new change doesn't break: |
|
257 | folding and creating no new change doesn't break: | |
258 | ------------------------------------------------- |
|
258 | ------------------------------------------------- | |
259 |
|
259 | |||
260 | folded content is dropped during a merge. The folded commit should properly disappear. |
|
260 | folded content is dropped during a merge. The folded commit should properly disappear. | |
261 |
|
261 | |||
262 | $ mkdir fold-to-empty-test |
|
262 | $ mkdir fold-to-empty-test | |
263 | $ cd fold-to-empty-test |
|
263 | $ cd fold-to-empty-test | |
264 | $ hg init |
|
264 | $ hg init | |
265 | $ printf "1\n2\n3\n" > file |
|
265 | $ printf "1\n2\n3\n" > file | |
266 | $ hg add file |
|
266 | $ hg add file | |
267 | $ hg commit -m '1+2+3' |
|
267 | $ hg commit -m '1+2+3' | |
268 | $ echo 4 >> file |
|
268 | $ echo 4 >> file | |
269 | $ hg commit -m '+4' |
|
269 | $ hg commit -m '+4' | |
270 | $ echo 5 >> file |
|
270 | $ echo 5 >> file | |
271 | $ hg commit -m '+5' |
|
271 | $ hg commit -m '+5' | |
272 | $ echo 6 >> file |
|
272 | $ echo 6 >> file | |
273 | $ hg commit -m '+6' |
|
273 | $ hg commit -m '+6' | |
274 | $ hg logt --graph |
|
274 | $ hg logt --graph | |
275 | @ 3:251d831eeec5 +6 |
|
275 | @ 3:251d831eeec5 +6 | |
276 | | |
|
276 | | | |
277 | o 2:888f9082bf99 +5 |
|
277 | o 2:888f9082bf99 +5 | |
278 | | |
|
278 | | | |
279 | o 1:617f94f13c0f +4 |
|
279 | o 1:617f94f13c0f +4 | |
280 | | |
|
280 | | | |
281 | o 0:0189ba417d34 1+2+3 |
|
281 | o 0:0189ba417d34 1+2+3 | |
282 |
|
282 | |||
283 |
|
283 | |||
284 | $ hg histedit 1 --commands - << EOF |
|
284 | $ hg histedit 1 --commands - << EOF | |
285 | > pick 617f94f13c0f 1 +4 |
|
285 | > pick 617f94f13c0f 1 +4 | |
286 | > drop 888f9082bf99 2 +5 |
|
286 | > drop 888f9082bf99 2 +5 | |
287 | > fold 251d831eeec5 3 +6 |
|
287 | > fold 251d831eeec5 3 +6 | |
288 | > EOF |
|
288 | > EOF | |
289 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
289 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
290 | merging file |
|
290 | merging file | |
291 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
291 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
292 | Fix up the change (fold 251d831eeec5) |
|
292 | Fix up the change (fold 251d831eeec5) | |
293 | (hg histedit --continue to resume) |
|
293 | (hg histedit --continue to resume) | |
294 | [1] |
|
294 | [1] | |
295 | There were conflicts, we keep P1 content. This |
|
295 | There were conflicts, we keep P1 content. This | |
296 | should effectively drop the changes from +6. |
|
296 | should effectively drop the changes from +6. | |
297 |
|
297 | |||
298 | $ hg status -v |
|
298 | $ hg status -v | |
299 | M file |
|
299 | M file | |
300 | ? file.orig |
|
300 | ? file.orig | |
301 | # The repository is in an unfinished *histedit* state. |
|
301 | # The repository is in an unfinished *histedit* state. | |
302 |
|
302 | |||
303 | # Unresolved merge conflicts: |
|
303 | # Unresolved merge conflicts: | |
304 | # |
|
304 | # | |
305 | # file |
|
305 | # file | |
306 | # |
|
306 | # | |
307 | # To mark files as resolved: hg resolve --mark FILE |
|
307 | # To mark files as resolved: hg resolve --mark FILE | |
308 |
|
308 | |||
309 | # To continue: hg histedit --continue |
|
309 | # To continue: hg histedit --continue | |
310 | # To abort: hg histedit --abort |
|
310 | # To abort: hg histedit --abort | |
311 |
|
311 | |||
312 | $ hg resolve -l |
|
312 | $ hg resolve -l | |
313 | U file |
|
313 | U file | |
314 | $ hg revert -r 'p1()' file |
|
314 | $ hg revert -r 'p1()' file | |
315 | $ hg resolve --mark file |
|
315 | $ hg resolve --mark file | |
316 | (no more unresolved files) |
|
316 | (no more unresolved files) | |
317 | continue: hg histedit --continue |
|
317 | continue: hg histedit --continue | |
318 | $ hg histedit --continue |
|
318 | $ hg histedit --continue | |
319 | 251d831eeec5: empty changeset |
|
319 | 251d831eeec5: empty changeset | |
320 | saved backup bundle to $TESTTMP/fold-to-empty-test/.hg/strip-backup/888f9082bf99-daa0b8b3-histedit.hg |
|
320 | saved backup bundle to $TESTTMP/fold-to-empty-test/.hg/strip-backup/888f9082bf99-daa0b8b3-histedit.hg | |
321 | $ hg logt --graph |
|
321 | $ hg logt --graph | |
322 | @ 1:617f94f13c0f +4 |
|
322 | @ 1:617f94f13c0f +4 | |
323 | | |
|
323 | | | |
324 | o 0:0189ba417d34 1+2+3 |
|
324 | o 0:0189ba417d34 1+2+3 | |
325 |
|
325 | |||
326 |
|
326 | |||
327 | $ cd .. |
|
327 | $ cd .. | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | Test fold through dropped |
|
330 | Test fold through dropped | |
331 | ------------------------- |
|
331 | ------------------------- | |
332 |
|
332 | |||
333 |
|
333 | |||
334 | Test corner case where folded revision is separated from its parent by a |
|
334 | Test corner case where folded revision is separated from its parent by a | |
335 | dropped revision. |
|
335 | dropped revision. | |
336 |
|
336 | |||
337 |
|
337 | |||
338 | $ hg init fold-with-dropped |
|
338 | $ hg init fold-with-dropped | |
339 | $ cd fold-with-dropped |
|
339 | $ cd fold-with-dropped | |
340 | $ printf "1\n2\n3\n" > file |
|
340 | $ printf "1\n2\n3\n" > file | |
341 | $ hg commit -Am '1+2+3' |
|
341 | $ hg commit -Am '1+2+3' | |
342 | adding file |
|
342 | adding file | |
343 | $ echo 4 >> file |
|
343 | $ echo 4 >> file | |
344 | $ hg commit -m '+4' |
|
344 | $ hg commit -m '+4' | |
345 | $ echo 5 >> file |
|
345 | $ echo 5 >> file | |
346 | $ hg commit -m '+5' |
|
346 | $ hg commit -m '+5' | |
347 | $ echo 6 >> file |
|
347 | $ echo 6 >> file | |
348 | $ hg commit -m '+6' |
|
348 | $ hg commit -m '+6' | |
349 | $ hg logt -G |
|
349 | $ hg logt -G | |
350 | @ 3:251d831eeec5 +6 |
|
350 | @ 3:251d831eeec5 +6 | |
351 | | |
|
351 | | | |
352 | o 2:888f9082bf99 +5 |
|
352 | o 2:888f9082bf99 +5 | |
353 | | |
|
353 | | | |
354 | o 1:617f94f13c0f +4 |
|
354 | o 1:617f94f13c0f +4 | |
355 | | |
|
355 | | | |
356 | o 0:0189ba417d34 1+2+3 |
|
356 | o 0:0189ba417d34 1+2+3 | |
357 |
|
357 | |||
358 | $ hg histedit 1 --commands - << EOF |
|
358 | $ hg histedit 1 --commands - << EOF | |
359 | > pick 617f94f13c0f 1 +4 |
|
359 | > pick 617f94f13c0f 1 +4 | |
360 | > drop 888f9082bf99 2 +5 |
|
360 | > drop 888f9082bf99 2 +5 | |
361 | > fold 251d831eeec5 3 +6 |
|
361 | > fold 251d831eeec5 3 +6 | |
362 | > EOF |
|
362 | > EOF | |
363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
364 | merging file |
|
364 | merging file | |
365 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
365 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
366 | Fix up the change (fold 251d831eeec5) |
|
366 | Fix up the change (fold 251d831eeec5) | |
367 | (hg histedit --continue to resume) |
|
367 | (hg histedit --continue to resume) | |
368 | [1] |
|
368 | [1] | |
369 | $ cat > file << EOF |
|
369 | $ cat > file << EOF | |
370 | > 1 |
|
370 | > 1 | |
371 | > 2 |
|
371 | > 2 | |
372 | > 3 |
|
372 | > 3 | |
373 | > 4 |
|
373 | > 4 | |
374 | > 5 |
|
374 | > 5 | |
375 | > EOF |
|
375 | > EOF | |
376 | $ hg resolve --mark file |
|
376 | $ hg resolve --mark file | |
377 | (no more unresolved files) |
|
377 | (no more unresolved files) | |
378 | continue: hg histedit --continue |
|
378 | continue: hg histedit --continue | |
379 | $ hg commit -m '+5.2' |
|
379 | $ hg commit -m '+5.2' | |
380 | created new head |
|
380 | created new head | |
381 | $ echo 6 >> file |
|
381 | $ echo 6 >> file | |
382 | $ HGEDITOR=cat hg histedit --continue |
|
382 | $ HGEDITOR=cat hg histedit --continue | |
383 | +4 |
|
383 | +4 | |
384 | *** |
|
384 | *** | |
385 | +5.2 |
|
385 | +5.2 | |
386 | *** |
|
386 | *** | |
387 | +6 |
|
387 | +6 | |
388 |
|
388 | |||
389 |
|
389 | |||
390 |
|
390 | |||
391 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
391 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
392 | HG: Leave message empty to abort commit. |
|
392 | HG: Leave message empty to abort commit. | |
393 | HG: -- |
|
393 | HG: -- | |
394 | HG: user: test |
|
394 | HG: user: test | |
395 | HG: branch 'default' |
|
395 | HG: branch 'default' | |
396 | HG: changed file |
|
396 | HG: changed file | |
397 | saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-3d69522c-histedit.hg |
|
397 | saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-3d69522c-histedit.hg | |
398 | $ hg logt -G |
|
398 | $ hg logt -G | |
399 | @ 1:10c647b2cdd5 +4 |
|
399 | @ 1:10c647b2cdd5 +4 | |
400 | | |
|
400 | | | |
401 | o 0:0189ba417d34 1+2+3 |
|
401 | o 0:0189ba417d34 1+2+3 | |
402 |
|
402 | |||
403 | $ hg export tip |
|
403 | $ hg export tip | |
404 | # HG changeset patch |
|
404 | # HG changeset patch | |
405 | # User test |
|
405 | # User test | |
406 | # Date 0 0 |
|
406 | # Date 0 0 | |
407 | # Thu Jan 01 00:00:00 1970 +0000 |
|
407 | # Thu Jan 01 00:00:00 1970 +0000 | |
408 | # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 |
|
408 | # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 | |
409 | # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 |
|
409 | # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 | |
410 | +4 |
|
410 | +4 | |
411 | *** |
|
411 | *** | |
412 | +5.2 |
|
412 | +5.2 | |
413 | *** |
|
413 | *** | |
414 | +6 |
|
414 | +6 | |
415 |
|
415 | |||
416 | diff -r 0189ba417d34 -r 10c647b2cdd5 file |
|
416 | diff -r 0189ba417d34 -r 10c647b2cdd5 file | |
417 | --- a/file Thu Jan 01 00:00:00 1970 +0000 |
|
417 | --- a/file Thu Jan 01 00:00:00 1970 +0000 | |
418 | +++ b/file Thu Jan 01 00:00:00 1970 +0000 |
|
418 | +++ b/file Thu Jan 01 00:00:00 1970 +0000 | |
419 | @@ -1,3 +1,6 @@ |
|
419 | @@ -1,3 +1,6 @@ | |
420 | 1 |
|
420 | 1 | |
421 | 2 |
|
421 | 2 | |
422 | 3 |
|
422 | 3 | |
423 | +4 |
|
423 | +4 | |
424 | +5 |
|
424 | +5 | |
425 | +6 |
|
425 | +6 | |
426 | $ cd .. |
|
426 | $ cd .. | |
427 |
|
427 | |||
428 |
|
428 | |||
429 | Folding with initial rename (issue3729) |
|
429 | Folding with initial rename (issue3729) | |
430 | --------------------------------------- |
|
430 | --------------------------------------- | |
431 |
|
431 | |||
432 | $ hg init fold-rename |
|
432 | $ hg init fold-rename | |
433 | $ cd fold-rename |
|
433 | $ cd fold-rename | |
434 | $ echo a > a.txt |
|
434 | $ echo a > a.txt | |
435 | $ hg add a.txt |
|
435 | $ hg add a.txt | |
436 | $ hg commit -m a |
|
436 | $ hg commit -m a | |
437 | $ hg rename a.txt b.txt |
|
437 | $ hg rename a.txt b.txt | |
438 | $ hg commit -m rename |
|
438 | $ hg commit -m rename | |
439 | $ echo b >> b.txt |
|
439 | $ echo b >> b.txt | |
440 | $ hg commit -m b |
|
440 | $ hg commit -m b | |
441 |
|
441 | |||
442 | $ hg logt --follow b.txt |
|
442 | $ hg logt --follow b.txt | |
443 | 2:e0371e0426bc b |
|
443 | 2:e0371e0426bc b | |
444 | 1:1c4f440a8085 rename |
|
444 | 1:1c4f440a8085 rename | |
445 | 0:6c795aa153cb a |
|
445 | 0:6c795aa153cb a | |
446 |
|
446 | |||
447 | $ hg histedit 1c4f440a8085 --commands - 2>&1 << EOF | fixbundle |
|
447 | $ hg histedit 1c4f440a8085 --commands - 2>&1 << EOF | fixbundle | |
448 | > pick 1c4f440a8085 rename |
|
448 | > pick 1c4f440a8085 rename | |
449 | > fold e0371e0426bc b |
|
449 | > fold e0371e0426bc b | |
450 | > EOF |
|
450 | > EOF | |
451 |
|
451 | |||
452 | $ hg logt --follow b.txt |
|
452 | $ hg logt --follow b.txt | |
453 | 1:cf858d235c76 rename |
|
453 | 1:cf858d235c76 rename | |
454 | 0:6c795aa153cb a |
|
454 | 0:6c795aa153cb a | |
455 |
|
455 | |||
456 | $ cd .. |
|
456 | $ cd .. | |
457 |
|
457 | |||
458 | Folding with swapping |
|
458 | Folding with swapping | |
459 | --------------------- |
|
459 | --------------------- | |
460 |
|
460 | |||
461 | This is an excuse to test hook with histedit temporary commit (issue4422) |
|
461 | This is an excuse to test hook with histedit temporary commit (issue4422) | |
462 |
|
462 | |||
463 |
|
463 | |||
464 | $ hg init issue4422 |
|
464 | $ hg init issue4422 | |
465 | $ cd issue4422 |
|
465 | $ cd issue4422 | |
466 | $ echo a > a.txt |
|
466 | $ echo a > a.txt | |
467 | $ hg add a.txt |
|
467 | $ hg add a.txt | |
468 | $ hg commit -m a |
|
468 | $ hg commit -m a | |
469 | $ echo b > b.txt |
|
469 | $ echo b > b.txt | |
470 | $ hg add b.txt |
|
470 | $ hg add b.txt | |
471 | $ hg commit -m b |
|
471 | $ hg commit -m b | |
472 | $ echo c > c.txt |
|
472 | $ echo c > c.txt | |
473 | $ hg add c.txt |
|
473 | $ hg add c.txt | |
474 | $ hg commit -m c |
|
474 | $ hg commit -m c | |
475 |
|
475 | |||
476 | $ hg logt |
|
476 | $ hg logt | |
477 | 2:a1a953ffb4b0 c |
|
477 | 2:a1a953ffb4b0 c | |
478 | 1:199b6bb90248 b |
|
478 | 1:199b6bb90248 b | |
479 | 0:6c795aa153cb a |
|
479 | 0:6c795aa153cb a | |
480 |
|
480 | |||
481 | $ hg histedit 6c795aa153cb --config hooks.commit='echo commit $HG_NODE' --commands - 2>&1 << EOF | fixbundle |
|
481 | $ hg histedit 6c795aa153cb --config hooks.commit='echo commit $HG_NODE' --commands - 2>&1 << EOF | fixbundle | |
482 | > pick 199b6bb90248 b |
|
482 | > pick 199b6bb90248 b | |
483 | > fold a1a953ffb4b0 c |
|
483 | > fold a1a953ffb4b0 c | |
484 | > pick 6c795aa153cb a |
|
484 | > pick 6c795aa153cb a | |
485 | > EOF |
|
485 | > EOF | |
486 | commit 9599899f62c05f4377548c32bf1c9f1a39634b0c |
|
486 | commit 9599899f62c05f4377548c32bf1c9f1a39634b0c | |
487 |
|
487 | |||
488 | $ hg logt |
|
488 | $ hg logt | |
489 | 1:9599899f62c0 a |
|
489 | 1:9599899f62c0 a | |
490 | 0:79b99e9c8e49 b |
|
490 | 0:79b99e9c8e49 b | |
491 |
|
491 | |||
492 | Test unix -> windows style variable substitution in external hooks. |
|
492 | Test unix -> windows style variable substitution in external hooks. | |
493 |
|
493 | |||
494 | $ cat > $TESTTMP/tmp.hgrc <<'EOF' |
|
494 | $ cat > $TESTTMP/tmp.hgrc <<'EOF' | |
495 | > [hooks] |
|
495 | > [hooks] | |
496 | > pre-add = echo no variables |
|
496 | > pre-add = echo no variables | |
|
497 | > tonative.pre-add = False | |||
497 | > post-add = echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT |
|
498 | > post-add = echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT | |
498 | > EOF |
|
499 | > EOF | |
499 |
|
500 | |||
500 | TODO: Windows should output double quotes around "also $non-var" |
|
501 | TODO: Windows should output double quotes around "also $non-var" | |
501 | $ echo "foo" > amended.txt |
|
502 | $ echo "foo" > amended.txt | |
502 | $ HGRCPATH=$TESTTMP/tmp.hgrc hg add -v amended.txt |
|
503 | $ HGRCPATH=$TESTTMP/tmp.hgrc hg add -v amended.txt | |
503 | running hook pre-add: echo no variables |
|
504 | running hook pre-add: echo no variables | |
504 | no variables |
|
505 | no variables | |
505 | adding amended.txt |
|
506 | adding amended.txt | |
|
507 | converting hook "post-add" to native (windows !) | |||
506 | running hook post-add: echo ran %HG_ARGS%, literal $non-var, 'also $non-var', %HG_RESULT% (windows !) |
|
508 | running hook post-add: echo ran %HG_ARGS%, literal $non-var, 'also $non-var', %HG_RESULT% (windows !) | |
507 | running hook post-add: echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT (no-windows !) |
|
509 | running hook post-add: echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT (no-windows !) | |
508 | ran add -v amended.txt, literal $non-var, 'also $non-var', 0 (windows !) |
|
510 | ran add -v amended.txt, literal $non-var, 'also $non-var', 0 (windows !) | |
509 | ran add -v amended.txt, literal $non-var, also $non-var, 0 (no-windows !) |
|
511 | ran add -v amended.txt, literal $non-var, also $non-var, 0 (no-windows !) | |
510 | $ hg ci -q --config extensions.largefiles= --amend -I amended.txt |
|
512 | $ hg ci -q --config extensions.largefiles= --amend -I amended.txt | |
511 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
513 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
512 |
|
514 | |||
513 | Test that folding multiple changes in a row doesn't show multiple |
|
515 | Test that folding multiple changes in a row doesn't show multiple | |
514 | editors. |
|
516 | editors. | |
515 |
|
517 | |||
516 | $ echo foo >> foo |
|
518 | $ echo foo >> foo | |
517 | $ hg add foo |
|
519 | $ hg add foo | |
518 | $ hg ci -m foo1 |
|
520 | $ hg ci -m foo1 | |
519 | $ echo foo >> foo |
|
521 | $ echo foo >> foo | |
520 | $ hg ci -m foo2 |
|
522 | $ hg ci -m foo2 | |
521 | $ echo foo >> foo |
|
523 | $ echo foo >> foo | |
522 | $ hg ci -m foo3 |
|
524 | $ hg ci -m foo3 | |
523 | $ hg logt |
|
525 | $ hg logt | |
524 | 4:21679ff7675c foo3 |
|
526 | 4:21679ff7675c foo3 | |
525 | 3:b7389cc4d66e foo2 |
|
527 | 3:b7389cc4d66e foo2 | |
526 | 2:0e01aeef5fa8 foo1 |
|
528 | 2:0e01aeef5fa8 foo1 | |
527 | 1:578c7455730c a |
|
529 | 1:578c7455730c a | |
528 | 0:79b99e9c8e49 b |
|
530 | 0:79b99e9c8e49 b | |
529 | $ cat > "$TESTTMP/editor.sh" <<EOF |
|
531 | $ cat > "$TESTTMP/editor.sh" <<EOF | |
530 | > echo ran editor >> "$TESTTMP/editorlog.txt" |
|
532 | > echo ran editor >> "$TESTTMP/editorlog.txt" | |
531 | > cat \$1 >> "$TESTTMP/editorlog.txt" |
|
533 | > cat \$1 >> "$TESTTMP/editorlog.txt" | |
532 | > echo END >> "$TESTTMP/editorlog.txt" |
|
534 | > echo END >> "$TESTTMP/editorlog.txt" | |
533 | > echo merged foos > \$1 |
|
535 | > echo merged foos > \$1 | |
534 | > EOF |
|
536 | > EOF | |
535 | $ HGEDITOR="sh \"$TESTTMP/editor.sh\"" hg histedit 1 --commands - 2>&1 <<EOF | fixbundle |
|
537 | $ HGEDITOR="sh \"$TESTTMP/editor.sh\"" hg histedit 1 --commands - 2>&1 <<EOF | fixbundle | |
536 | > pick 578c7455730c 1 a |
|
538 | > pick 578c7455730c 1 a | |
537 | > pick 0e01aeef5fa8 2 foo1 |
|
539 | > pick 0e01aeef5fa8 2 foo1 | |
538 | > fold b7389cc4d66e 3 foo2 |
|
540 | > fold b7389cc4d66e 3 foo2 | |
539 | > fold 21679ff7675c 4 foo3 |
|
541 | > fold 21679ff7675c 4 foo3 | |
540 | > EOF |
|
542 | > EOF | |
541 | $ hg logt |
|
543 | $ hg logt | |
542 | 2:e8bedbda72c1 merged foos |
|
544 | 2:e8bedbda72c1 merged foos | |
543 | 1:578c7455730c a |
|
545 | 1:578c7455730c a | |
544 | 0:79b99e9c8e49 b |
|
546 | 0:79b99e9c8e49 b | |
545 | Editor should have run only once |
|
547 | Editor should have run only once | |
546 | $ cat $TESTTMP/editorlog.txt |
|
548 | $ cat $TESTTMP/editorlog.txt | |
547 | ran editor |
|
549 | ran editor | |
548 | foo1 |
|
550 | foo1 | |
549 | *** |
|
551 | *** | |
550 | foo2 |
|
552 | foo2 | |
551 | *** |
|
553 | *** | |
552 | foo3 |
|
554 | foo3 | |
553 |
|
555 | |||
554 |
|
556 | |||
555 |
|
557 | |||
556 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
558 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
557 | HG: Leave message empty to abort commit. |
|
559 | HG: Leave message empty to abort commit. | |
558 | HG: -- |
|
560 | HG: -- | |
559 | HG: user: test |
|
561 | HG: user: test | |
560 | HG: branch 'default' |
|
562 | HG: branch 'default' | |
561 | HG: added foo |
|
563 | HG: added foo | |
562 | END |
|
564 | END | |
563 |
|
565 | |||
564 | $ cd .. |
|
566 | $ cd .. | |
565 |
|
567 | |||
566 | Test rolling into a commit with multiple children (issue5498) |
|
568 | Test rolling into a commit with multiple children (issue5498) | |
567 |
|
569 | |||
568 | $ hg init roll |
|
570 | $ hg init roll | |
569 | $ cd roll |
|
571 | $ cd roll | |
570 | $ echo a > a |
|
572 | $ echo a > a | |
571 | $ hg commit -qAm aa |
|
573 | $ hg commit -qAm aa | |
572 | $ echo b > b |
|
574 | $ echo b > b | |
573 | $ hg commit -qAm bb |
|
575 | $ hg commit -qAm bb | |
574 | $ hg up -q ".^" |
|
576 | $ hg up -q ".^" | |
575 | $ echo c > c |
|
577 | $ echo c > c | |
576 | $ hg commit -qAm cc |
|
578 | $ hg commit -qAm cc | |
577 | $ hg log -G -T '{node|short} {desc}' |
|
579 | $ hg log -G -T '{node|short} {desc}' | |
578 | @ 5db65b93a12b cc |
|
580 | @ 5db65b93a12b cc | |
579 | | |
|
581 | | | |
580 | | o 301d76bdc3ae bb |
|
582 | | o 301d76bdc3ae bb | |
581 | |/ |
|
583 | |/ | |
582 | o 8f0162e483d0 aa |
|
584 | o 8f0162e483d0 aa | |
583 |
|
585 | |||
584 |
|
586 | |||
585 | $ hg histedit . --commands - << EOF |
|
587 | $ hg histedit . --commands - << EOF | |
586 | > r 5db65b93a12b |
|
588 | > r 5db65b93a12b | |
587 | > EOF |
|
589 | > EOF | |
588 | hg: parse error: first changeset cannot use verb "roll" |
|
590 | hg: parse error: first changeset cannot use verb "roll" | |
589 | [255] |
|
591 | [255] | |
590 | $ hg log -G -T '{node|short} {desc}' |
|
592 | $ hg log -G -T '{node|short} {desc}' | |
591 | @ 5db65b93a12b cc |
|
593 | @ 5db65b93a12b cc | |
592 | | |
|
594 | | | |
593 | | o 301d76bdc3ae bb |
|
595 | | o 301d76bdc3ae bb | |
594 | |/ |
|
596 | |/ | |
595 | o 8f0162e483d0 aa |
|
597 | o 8f0162e483d0 aa | |
596 |
|
598 | |||
597 |
|
599 |
@@ -1,1480 +1,1481 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 |
|
2 | |||
3 | Run kwdemo outside a repo |
|
3 | Run kwdemo outside a repo | |
4 | $ hg -q --config extensions.keyword= --config keywordmaps.Foo="{author|user}" kwdemo |
|
4 | $ hg -q --config extensions.keyword= --config keywordmaps.Foo="{author|user}" kwdemo | |
5 | [extensions] |
|
5 | [extensions] | |
6 | keyword = |
|
6 | keyword = | |
7 | [keyword] |
|
7 | [keyword] | |
8 | demo.txt = |
|
8 | demo.txt = | |
9 | [keywordset] |
|
9 | [keywordset] | |
10 | svn = False |
|
10 | svn = False | |
11 | [keywordmaps] |
|
11 | [keywordmaps] | |
12 | Foo = {author|user} |
|
12 | Foo = {author|user} | |
13 | $Foo: test $ |
|
13 | $Foo: test $ | |
14 |
|
14 | |||
15 | $ cat <<EOF >> $HGRCPATH |
|
15 | $ cat <<EOF >> $HGRCPATH | |
16 | > [extensions] |
|
16 | > [extensions] | |
17 | > keyword = |
|
17 | > keyword = | |
18 | > mq = |
|
18 | > mq = | |
19 | > notify = |
|
19 | > notify = | |
20 | > record = |
|
20 | > record = | |
21 | > transplant = |
|
21 | > transplant = | |
22 | > [ui] |
|
22 | > [ui] | |
23 | > interactive = true |
|
23 | > interactive = true | |
24 | > EOF |
|
24 | > EOF | |
25 |
|
25 | |||
26 | hide outer repo |
|
26 | hide outer repo | |
27 | $ hg init |
|
27 | $ hg init | |
28 |
|
28 | |||
29 | Run kwdemo before [keyword] files are set up |
|
29 | Run kwdemo before [keyword] files are set up | |
30 | as it would succeed without uisetup otherwise |
|
30 | as it would succeed without uisetup otherwise | |
31 |
|
31 | |||
32 | $ hg --quiet kwdemo |
|
32 | $ hg --quiet kwdemo | |
33 | [extensions] |
|
33 | [extensions] | |
34 | keyword = |
|
34 | keyword = | |
35 | [keyword] |
|
35 | [keyword] | |
36 | demo.txt = |
|
36 | demo.txt = | |
37 | [keywordset] |
|
37 | [keywordset] | |
38 | svn = False |
|
38 | svn = False | |
39 | [keywordmaps] |
|
39 | [keywordmaps] | |
40 | Author = {author|user} |
|
40 | Author = {author|user} | |
41 | Date = {date|utcdate} |
|
41 | Date = {date|utcdate} | |
42 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} |
|
42 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} | |
43 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} |
|
43 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} | |
44 | RCSFile = {file|basename},v |
|
44 | RCSFile = {file|basename},v | |
45 | RCSfile = {file|basename},v |
|
45 | RCSfile = {file|basename},v | |
46 | Revision = {node|short} |
|
46 | Revision = {node|short} | |
47 | Source = {root}/{file},v |
|
47 | Source = {root}/{file},v | |
48 | $Author: test $ |
|
48 | $Author: test $ | |
49 | $Date: ????/??/?? ??:??:?? $ (glob) |
|
49 | $Date: ????/??/?? ??:??:?? $ (glob) | |
50 | $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
50 | $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) | |
51 | $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
51 | $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) | |
52 | $RCSFile: demo.txt,v $ |
|
52 | $RCSFile: demo.txt,v $ | |
53 | $RCSfile: demo.txt,v $ |
|
53 | $RCSfile: demo.txt,v $ | |
54 | $Revision: ???????????? $ (glob) |
|
54 | $Revision: ???????????? $ (glob) | |
55 | $Source: */demo.txt,v $ (glob) |
|
55 | $Source: */demo.txt,v $ (glob) | |
56 |
|
56 | |||
57 | $ hg --quiet kwdemo "Branch = {branches}" |
|
57 | $ hg --quiet kwdemo "Branch = {branches}" | |
58 | [extensions] |
|
58 | [extensions] | |
59 | keyword = |
|
59 | keyword = | |
60 | [keyword] |
|
60 | [keyword] | |
61 | demo.txt = |
|
61 | demo.txt = | |
62 | [keywordset] |
|
62 | [keywordset] | |
63 | svn = False |
|
63 | svn = False | |
64 | [keywordmaps] |
|
64 | [keywordmaps] | |
65 | Branch = {branches} |
|
65 | Branch = {branches} | |
66 | $Branch: demobranch $ |
|
66 | $Branch: demobranch $ | |
67 |
|
67 | |||
68 | (test template filter svnisodate and svnutcdate) |
|
68 | (test template filter svnisodate and svnutcdate) | |
69 |
|
69 | |||
70 | $ hg --quiet kwdemo --config keywordset.svn=True |
|
70 | $ hg --quiet kwdemo --config keywordset.svn=True | |
71 | [extensions] |
|
71 | [extensions] | |
72 | keyword = |
|
72 | keyword = | |
73 | [keyword] |
|
73 | [keyword] | |
74 | demo.txt = |
|
74 | demo.txt = | |
75 | [keywordset] |
|
75 | [keywordset] | |
76 | svn = True |
|
76 | svn = True | |
77 | [keywordmaps] |
|
77 | [keywordmaps] | |
78 | Author = {author|user} |
|
78 | Author = {author|user} | |
79 | Date = {date|svnisodate} |
|
79 | Date = {date|svnisodate} | |
80 | Id = {file|basename},v {node|short} {date|svnutcdate} {author|user} |
|
80 | Id = {file|basename},v {node|short} {date|svnutcdate} {author|user} | |
81 | LastChangedBy = {author|user} |
|
81 | LastChangedBy = {author|user} | |
82 | LastChangedDate = {date|svnisodate} |
|
82 | LastChangedDate = {date|svnisodate} | |
83 | LastChangedRevision = {node|short} |
|
83 | LastChangedRevision = {node|short} | |
84 | Revision = {node|short} |
|
84 | Revision = {node|short} | |
85 | $Author: test $ |
|
85 | $Author: test $ | |
86 | $Date: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) |
|
86 | $Date: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) | |
87 | $Id: demo.txt,v ???????????? ????-??-?? ??:??:??Z test $ (glob) |
|
87 | $Id: demo.txt,v ???????????? ????-??-?? ??:??:??Z test $ (glob) | |
88 | $LastChangedBy: test $ |
|
88 | $LastChangedBy: test $ | |
89 | $LastChangedDate: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) |
|
89 | $LastChangedDate: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) | |
90 | $LastChangedRevision: ???????????? $ (glob) |
|
90 | $LastChangedRevision: ???????????? $ (glob) | |
91 | $Revision: ???????????? $ (glob) |
|
91 | $Revision: ???????????? $ (glob) | |
92 |
|
92 | |||
93 | $ cat <<EOF >> $HGRCPATH |
|
93 | $ cat <<EOF >> $HGRCPATH | |
94 | > [keyword] |
|
94 | > [keyword] | |
95 | > ** = |
|
95 | > ** = | |
96 | > b = ignore |
|
96 | > b = ignore | |
97 | > i = ignore |
|
97 | > i = ignore | |
98 | > [hooks] |
|
98 | > [hooks] | |
99 | > EOF |
|
99 | > EOF | |
100 | $ cp $HGRCPATH $HGRCPATH.nohooks |
|
100 | $ cp $HGRCPATH $HGRCPATH.nohooks | |
101 | > cat <<EOF >> $HGRCPATH |
|
101 | > cat <<EOF >> $HGRCPATH | |
102 | > commit= |
|
102 | > commit= | |
103 | > commit.test=cp a hooktest |
|
103 | > commit.test=cp a hooktest | |
104 | > EOF |
|
104 | > EOF | |
105 |
|
105 | |||
106 | $ hg init Test-bndl |
|
106 | $ hg init Test-bndl | |
107 | $ cd Test-bndl |
|
107 | $ cd Test-bndl | |
108 |
|
108 | |||
109 | kwshrink should exit silently in empty/invalid repo |
|
109 | kwshrink should exit silently in empty/invalid repo | |
110 |
|
110 | |||
111 | $ hg kwshrink |
|
111 | $ hg kwshrink | |
112 |
|
112 | |||
113 | Symlinks cannot be created on Windows. |
|
113 | Symlinks cannot be created on Windows. | |
114 | A bundle to test this was made with: |
|
114 | A bundle to test this was made with: | |
115 | hg init t |
|
115 | hg init t | |
116 | cd t |
|
116 | cd t | |
117 | echo a > a |
|
117 | echo a > a | |
118 | ln -s a sym |
|
118 | ln -s a sym | |
119 | hg add sym |
|
119 | hg add sym | |
120 | hg ci -m addsym -u mercurial |
|
120 | hg ci -m addsym -u mercurial | |
121 | hg bundle --base null ../test-keyword.hg |
|
121 | hg bundle --base null ../test-keyword.hg | |
122 |
|
122 | |||
123 | $ hg unbundle "$TESTDIR"/bundles/test-keyword.hg |
|
123 | $ hg unbundle "$TESTDIR"/bundles/test-keyword.hg | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | added 1 changesets with 1 changes to 1 files |
|
127 | added 1 changesets with 1 changes to 1 files | |
128 | new changesets a2392c293916 |
|
128 | new changesets a2392c293916 | |
129 | (run 'hg update' to get a working copy) |
|
129 | (run 'hg update' to get a working copy) | |
130 | $ hg up a2392c293916 |
|
130 | $ hg up a2392c293916 | |
131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
132 |
|
132 | |||
133 | $ echo 'expand $Id$' > a |
|
133 | $ echo 'expand $Id$' > a | |
134 | $ echo 'do not process $Id:' >> a |
|
134 | $ echo 'do not process $Id:' >> a | |
135 | $ echo 'xxx $' >> a |
|
135 | $ echo 'xxx $' >> a | |
136 | $ echo 'ignore $Id$' > b |
|
136 | $ echo 'ignore $Id$' > b | |
137 |
|
137 | |||
138 | Output files as they were created |
|
138 | Output files as they were created | |
139 |
|
139 | |||
140 | $ cat a b |
|
140 | $ cat a b | |
141 | expand $Id$ |
|
141 | expand $Id$ | |
142 | do not process $Id: |
|
142 | do not process $Id: | |
143 | xxx $ |
|
143 | xxx $ | |
144 | ignore $Id$ |
|
144 | ignore $Id$ | |
145 |
|
145 | |||
146 | no kwfiles |
|
146 | no kwfiles | |
147 |
|
147 | |||
148 | $ hg kwfiles |
|
148 | $ hg kwfiles | |
149 |
|
149 | |||
150 | untracked candidates |
|
150 | untracked candidates | |
151 |
|
151 | |||
152 | $ hg -v kwfiles --unknown |
|
152 | $ hg -v kwfiles --unknown | |
153 | k a |
|
153 | k a | |
154 |
|
154 | |||
155 | Add files and check status |
|
155 | Add files and check status | |
156 |
|
156 | |||
157 | $ hg addremove |
|
157 | $ hg addremove | |
158 | adding a |
|
158 | adding a | |
159 | adding b |
|
159 | adding b | |
160 | $ hg status |
|
160 | $ hg status | |
161 | A a |
|
161 | A a | |
162 | A b |
|
162 | A b | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | Default keyword expansion including commit hook |
|
165 | Default keyword expansion including commit hook | |
166 | Interrupted commit should not change state or run commit hook |
|
166 | Interrupted commit should not change state or run commit hook | |
167 |
|
167 | |||
168 | $ hg --debug commit |
|
168 | $ hg --debug commit | |
169 | abort: empty commit message |
|
169 | abort: empty commit message | |
170 | [255] |
|
170 | [255] | |
171 | $ hg status |
|
171 | $ hg status | |
172 | A a |
|
172 | A a | |
173 | A b |
|
173 | A b | |
174 |
|
174 | |||
175 | Commit with several checks |
|
175 | Commit with several checks | |
176 |
|
176 | |||
177 | $ hg --debug commit -mabsym -u 'User Name <user@example.com>' |
|
177 | $ hg --debug commit -mabsym -u 'User Name <user@example.com>' | |
178 | committing files: |
|
178 | committing files: | |
179 | a |
|
179 | a | |
180 | b |
|
180 | b | |
181 | committing manifest |
|
181 | committing manifest | |
182 | committing changelog |
|
182 | committing changelog | |
183 | overwriting a expanding keywords |
|
183 | overwriting a expanding keywords | |
184 | updating the branch cache |
|
184 | updating the branch cache | |
185 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
185 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
|
186 | converting hook "commit.test" to native (windows !) | |||
186 | running hook commit.test: cp a hooktest |
|
187 | running hook commit.test: cp a hooktest | |
187 | $ hg status |
|
188 | $ hg status | |
188 | ? hooktest |
|
189 | ? hooktest | |
189 | $ hg debugrebuildstate |
|
190 | $ hg debugrebuildstate | |
190 | $ hg --quiet identify |
|
191 | $ hg --quiet identify | |
191 | ef63ca68695b |
|
192 | ef63ca68695b | |
192 |
|
193 | |||
193 | cat files in working directory with keywords expanded |
|
194 | cat files in working directory with keywords expanded | |
194 |
|
195 | |||
195 | $ cat a b |
|
196 | $ cat a b | |
196 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
197 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
197 | do not process $Id: |
|
198 | do not process $Id: | |
198 | xxx $ |
|
199 | xxx $ | |
199 | ignore $Id$ |
|
200 | ignore $Id$ | |
200 |
|
201 | |||
201 | hg cat files and symlink, no expansion |
|
202 | hg cat files and symlink, no expansion | |
202 |
|
203 | |||
203 | $ hg cat sym a b && echo |
|
204 | $ hg cat sym a b && echo | |
204 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
205 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
205 | do not process $Id: |
|
206 | do not process $Id: | |
206 | xxx $ |
|
207 | xxx $ | |
207 | ignore $Id$ |
|
208 | ignore $Id$ | |
208 | a |
|
209 | a | |
209 |
|
210 | |||
210 | $ diff a hooktest |
|
211 | $ diff a hooktest | |
211 |
|
212 | |||
212 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
213 | $ cp $HGRCPATH.nohooks $HGRCPATH | |
213 | $ rm hooktest |
|
214 | $ rm hooktest | |
214 |
|
215 | |||
215 | hg status of kw-ignored binary file starting with '\1\n' |
|
216 | hg status of kw-ignored binary file starting with '\1\n' | |
216 |
|
217 | |||
217 | >>> open("i", "wb").write("\1\nfoo") |
|
218 | >>> open("i", "wb").write("\1\nfoo") | |
218 | $ hg -q commit -Am metasep i |
|
219 | $ hg -q commit -Am metasep i | |
219 | $ hg status |
|
220 | $ hg status | |
220 | >>> open("i", "wb").write("\1\nbar") |
|
221 | >>> open("i", "wb").write("\1\nbar") | |
221 | $ hg status |
|
222 | $ hg status | |
222 | M i |
|
223 | M i | |
223 | $ hg -q commit -m "modify metasep" i |
|
224 | $ hg -q commit -m "modify metasep" i | |
224 | $ hg status --rev 2:3 |
|
225 | $ hg status --rev 2:3 | |
225 | M i |
|
226 | M i | |
226 | $ touch empty |
|
227 | $ touch empty | |
227 | $ hg -q commit -A -m "another file" |
|
228 | $ hg -q commit -A -m "another file" | |
228 | $ hg status -A --rev 3:4 i |
|
229 | $ hg status -A --rev 3:4 i | |
229 | C i |
|
230 | C i | |
230 |
|
231 | |||
231 | $ hg -q strip --no-backup 2 |
|
232 | $ hg -q strip --no-backup 2 | |
232 |
|
233 | |||
233 | Test hook execution |
|
234 | Test hook execution | |
234 |
|
235 | |||
235 | bundle |
|
236 | bundle | |
236 |
|
237 | |||
237 | $ hg bundle --base null ../kw.hg |
|
238 | $ hg bundle --base null ../kw.hg | |
238 | 2 changesets found |
|
239 | 2 changesets found | |
239 | $ cd .. |
|
240 | $ cd .. | |
240 | $ hg init Test |
|
241 | $ hg init Test | |
241 | $ cd Test |
|
242 | $ cd Test | |
242 |
|
243 | |||
243 | Notify on pull to check whether keywords stay as is in email |
|
244 | Notify on pull to check whether keywords stay as is in email | |
244 | ie. if patch.diff wrapper acts as it should |
|
245 | ie. if patch.diff wrapper acts as it should | |
245 |
|
246 | |||
246 | $ cat <<EOF >> $HGRCPATH |
|
247 | $ cat <<EOF >> $HGRCPATH | |
247 | > [hooks] |
|
248 | > [hooks] | |
248 | > incoming.notify = python:hgext.notify.hook |
|
249 | > incoming.notify = python:hgext.notify.hook | |
249 | > [notify] |
|
250 | > [notify] | |
250 | > sources = pull |
|
251 | > sources = pull | |
251 | > diffstat = False |
|
252 | > diffstat = False | |
252 | > maxsubject = 15 |
|
253 | > maxsubject = 15 | |
253 | > [reposubs] |
|
254 | > [reposubs] | |
254 | > * = Test |
|
255 | > * = Test | |
255 | > EOF |
|
256 | > EOF | |
256 |
|
257 | |||
257 | Pull from bundle and trigger notify |
|
258 | Pull from bundle and trigger notify | |
258 |
|
259 | |||
259 | $ hg pull -u ../kw.hg |
|
260 | $ hg pull -u ../kw.hg | |
260 | pulling from ../kw.hg |
|
261 | pulling from ../kw.hg | |
261 | requesting all changes |
|
262 | requesting all changes | |
262 | adding changesets |
|
263 | adding changesets | |
263 | adding manifests |
|
264 | adding manifests | |
264 | adding file changes |
|
265 | adding file changes | |
265 | added 2 changesets with 3 changes to 3 files |
|
266 | added 2 changesets with 3 changes to 3 files | |
266 | new changesets a2392c293916:ef63ca68695b |
|
267 | new changesets a2392c293916:ef63ca68695b | |
267 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
268 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
268 | MIME-Version: 1.0 |
|
269 | MIME-Version: 1.0 | |
269 | Content-Type: text/plain; charset="us-ascii" |
|
270 | Content-Type: text/plain; charset="us-ascii" | |
270 | Content-Transfer-Encoding: 7bit |
|
271 | Content-Transfer-Encoding: 7bit | |
271 | Date: * (glob) |
|
272 | Date: * (glob) | |
272 | Subject: changeset in... |
|
273 | Subject: changeset in... | |
273 | From: mercurial |
|
274 | From: mercurial | |
274 | X-Hg-Notification: changeset a2392c293916 |
|
275 | X-Hg-Notification: changeset a2392c293916 | |
275 | Message-Id: <hg.a2392c293916*> (glob) |
|
276 | Message-Id: <hg.a2392c293916*> (glob) | |
276 | To: Test |
|
277 | To: Test | |
277 |
|
278 | |||
278 | changeset a2392c293916 in $TESTTMP/Test |
|
279 | changeset a2392c293916 in $TESTTMP/Test | |
279 | details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 |
|
280 | details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 | |
280 | description: |
|
281 | description: | |
281 | addsym |
|
282 | addsym | |
282 |
|
283 | |||
283 | diffs (6 lines): |
|
284 | diffs (6 lines): | |
284 |
|
285 | |||
285 | diff -r 000000000000 -r a2392c293916 sym |
|
286 | diff -r 000000000000 -r a2392c293916 sym | |
286 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
287 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
287 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 |
|
288 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 | |
288 | @@ -0,0 +1,1 @@ |
|
289 | @@ -0,0 +1,1 @@ | |
289 | +a |
|
290 | +a | |
290 | \ No newline at end of file |
|
291 | \ No newline at end of file | |
291 | MIME-Version: 1.0 |
|
292 | MIME-Version: 1.0 | |
292 | Content-Type: text/plain; charset="us-ascii" |
|
293 | Content-Type: text/plain; charset="us-ascii" | |
293 | Content-Transfer-Encoding: 7bit |
|
294 | Content-Transfer-Encoding: 7bit | |
294 | Date:* (glob) |
|
295 | Date:* (glob) | |
295 | Subject: changeset in... |
|
296 | Subject: changeset in... | |
296 | From: User Name <user@example.com> |
|
297 | From: User Name <user@example.com> | |
297 | X-Hg-Notification: changeset ef63ca68695b |
|
298 | X-Hg-Notification: changeset ef63ca68695b | |
298 | Message-Id: <hg.ef63ca68695b*> (glob) |
|
299 | Message-Id: <hg.ef63ca68695b*> (glob) | |
299 | To: Test |
|
300 | To: Test | |
300 |
|
301 | |||
301 | changeset ef63ca68695b in $TESTTMP/Test |
|
302 | changeset ef63ca68695b in $TESTTMP/Test | |
302 | details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b |
|
303 | details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b | |
303 | description: |
|
304 | description: | |
304 | absym |
|
305 | absym | |
305 |
|
306 | |||
306 | diffs (12 lines): |
|
307 | diffs (12 lines): | |
307 |
|
308 | |||
308 | diff -r a2392c293916 -r ef63ca68695b a |
|
309 | diff -r a2392c293916 -r ef63ca68695b a | |
309 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
310 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
310 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
311 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
311 | @@ -0,0 +1,3 @@ |
|
312 | @@ -0,0 +1,3 @@ | |
312 | +expand $Id$ |
|
313 | +expand $Id$ | |
313 | +do not process $Id: |
|
314 | +do not process $Id: | |
314 | +xxx $ |
|
315 | +xxx $ | |
315 | diff -r a2392c293916 -r ef63ca68695b b |
|
316 | diff -r a2392c293916 -r ef63ca68695b b | |
316 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
317 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
318 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
318 | @@ -0,0 +1,1 @@ |
|
319 | @@ -0,0 +1,1 @@ | |
319 | +ignore $Id$ |
|
320 | +ignore $Id$ | |
320 |
|
321 | |||
321 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
322 | $ cp $HGRCPATH.nohooks $HGRCPATH | |
322 |
|
323 | |||
323 | Touch files and check with status |
|
324 | Touch files and check with status | |
324 |
|
325 | |||
325 | $ touch a b |
|
326 | $ touch a b | |
326 | $ hg status |
|
327 | $ hg status | |
327 |
|
328 | |||
328 | Update and expand |
|
329 | Update and expand | |
329 |
|
330 | |||
330 | $ rm sym a b |
|
331 | $ rm sym a b | |
331 | $ hg update -C |
|
332 | $ hg update -C | |
332 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
333 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
333 | $ cat a b |
|
334 | $ cat a b | |
334 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
335 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
335 | do not process $Id: |
|
336 | do not process $Id: | |
336 | xxx $ |
|
337 | xxx $ | |
337 | ignore $Id$ |
|
338 | ignore $Id$ | |
338 |
|
339 | |||
339 | Check whether expansion is filewise and file mode is preserved |
|
340 | Check whether expansion is filewise and file mode is preserved | |
340 |
|
341 | |||
341 | $ echo '$Id$' > c |
|
342 | $ echo '$Id$' > c | |
342 | $ echo 'tests for different changenodes' >> c |
|
343 | $ echo 'tests for different changenodes' >> c | |
343 | #if unix-permissions |
|
344 | #if unix-permissions | |
344 | $ chmod 600 c |
|
345 | $ chmod 600 c | |
345 | $ ls -l c | cut -b 1-10 |
|
346 | $ ls -l c | cut -b 1-10 | |
346 | -rw------- |
|
347 | -rw------- | |
347 | #endif |
|
348 | #endif | |
348 |
|
349 | |||
349 | commit file c |
|
350 | commit file c | |
350 |
|
351 | |||
351 | $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>' |
|
352 | $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>' | |
352 | adding c |
|
353 | adding c | |
353 | #if unix-permissions |
|
354 | #if unix-permissions | |
354 | $ ls -l c | cut -b 1-10 |
|
355 | $ ls -l c | cut -b 1-10 | |
355 | -rw------- |
|
356 | -rw------- | |
356 | #endif |
|
357 | #endif | |
357 |
|
358 | |||
358 | force expansion |
|
359 | force expansion | |
359 |
|
360 | |||
360 | $ hg -v kwexpand |
|
361 | $ hg -v kwexpand | |
361 | overwriting a expanding keywords |
|
362 | overwriting a expanding keywords | |
362 | overwriting c expanding keywords |
|
363 | overwriting c expanding keywords | |
363 |
|
364 | |||
364 | compare changenodes in a and c |
|
365 | compare changenodes in a and c | |
365 |
|
366 | |||
366 | $ cat a c |
|
367 | $ cat a c | |
367 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
368 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
368 | do not process $Id: |
|
369 | do not process $Id: | |
369 | xxx $ |
|
370 | xxx $ | |
370 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
371 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
371 | tests for different changenodes |
|
372 | tests for different changenodes | |
372 |
|
373 | |||
373 | record |
|
374 | record | |
374 |
|
375 | |||
375 | $ echo '$Id$' > r |
|
376 | $ echo '$Id$' > r | |
376 | $ hg add r |
|
377 | $ hg add r | |
377 |
|
378 | |||
378 | record chunk |
|
379 | record chunk | |
379 |
|
380 | |||
380 | >>> lines = open('a', 'rb').readlines() |
|
381 | >>> lines = open('a', 'rb').readlines() | |
381 | >>> lines.insert(1, 'foo\n') |
|
382 | >>> lines.insert(1, 'foo\n') | |
382 | >>> lines.append('bar\n') |
|
383 | >>> lines.append('bar\n') | |
383 | >>> open('a', 'wb').writelines(lines) |
|
384 | >>> open('a', 'wb').writelines(lines) | |
384 | $ hg record -d '10 1' -m rectest a<<EOF |
|
385 | $ hg record -d '10 1' -m rectest a<<EOF | |
385 | > y |
|
386 | > y | |
386 | > y |
|
387 | > y | |
387 | > n |
|
388 | > n | |
388 | > EOF |
|
389 | > EOF | |
389 | diff --git a/a b/a |
|
390 | diff --git a/a b/a | |
390 | 2 hunks, 2 lines changed |
|
391 | 2 hunks, 2 lines changed | |
391 | examine changes to 'a'? [Ynesfdaq?] y |
|
392 | examine changes to 'a'? [Ynesfdaq?] y | |
392 |
|
393 | |||
393 | @@ -1,3 +1,4 @@ |
|
394 | @@ -1,3 +1,4 @@ | |
394 | expand $Id$ |
|
395 | expand $Id$ | |
395 | +foo |
|
396 | +foo | |
396 | do not process $Id: |
|
397 | do not process $Id: | |
397 | xxx $ |
|
398 | xxx $ | |
398 | record change 1/2 to 'a'? [Ynesfdaq?] y |
|
399 | record change 1/2 to 'a'? [Ynesfdaq?] y | |
399 |
|
400 | |||
400 | @@ -2,2 +3,3 @@ |
|
401 | @@ -2,2 +3,3 @@ | |
401 | do not process $Id: |
|
402 | do not process $Id: | |
402 | xxx $ |
|
403 | xxx $ | |
403 | +bar |
|
404 | +bar | |
404 | record change 2/2 to 'a'? [Ynesfdaq?] n |
|
405 | record change 2/2 to 'a'? [Ynesfdaq?] n | |
405 |
|
406 | |||
406 |
|
407 | |||
407 | $ hg identify |
|
408 | $ hg identify | |
408 | 5f5eb23505c3+ tip |
|
409 | 5f5eb23505c3+ tip | |
409 | $ hg status |
|
410 | $ hg status | |
410 | M a |
|
411 | M a | |
411 | A r |
|
412 | A r | |
412 |
|
413 | |||
413 | Cat modified file a |
|
414 | Cat modified file a | |
414 |
|
415 | |||
415 | $ cat a |
|
416 | $ cat a | |
416 | expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $ |
|
417 | expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $ | |
417 | foo |
|
418 | foo | |
418 | do not process $Id: |
|
419 | do not process $Id: | |
419 | xxx $ |
|
420 | xxx $ | |
420 | bar |
|
421 | bar | |
421 |
|
422 | |||
422 | Diff remaining chunk |
|
423 | Diff remaining chunk | |
423 |
|
424 | |||
424 | $ hg diff a |
|
425 | $ hg diff a | |
425 | diff -r 5f5eb23505c3 a |
|
426 | diff -r 5f5eb23505c3 a | |
426 | --- a/a Thu Jan 01 00:00:09 1970 -0000 |
|
427 | --- a/a Thu Jan 01 00:00:09 1970 -0000 | |
427 | +++ b/a * (glob) |
|
428 | +++ b/a * (glob) | |
428 | @@ -2,3 +2,4 @@ |
|
429 | @@ -2,3 +2,4 @@ | |
429 | foo |
|
430 | foo | |
430 | do not process $Id: |
|
431 | do not process $Id: | |
431 | xxx $ |
|
432 | xxx $ | |
432 | +bar |
|
433 | +bar | |
433 |
|
434 | |||
434 | $ hg rollback |
|
435 | $ hg rollback | |
435 | repository tip rolled back to revision 2 (undo commit) |
|
436 | repository tip rolled back to revision 2 (undo commit) | |
436 | working directory now based on revision 2 |
|
437 | working directory now based on revision 2 | |
437 |
|
438 | |||
438 | Record all chunks in file a |
|
439 | Record all chunks in file a | |
439 |
|
440 | |||
440 | $ echo foo > msg |
|
441 | $ echo foo > msg | |
441 |
|
442 | |||
442 | - do not use "hg record -m" here! |
|
443 | - do not use "hg record -m" here! | |
443 |
|
444 | |||
444 | $ hg record -l msg -d '11 1' a<<EOF |
|
445 | $ hg record -l msg -d '11 1' a<<EOF | |
445 | > y |
|
446 | > y | |
446 | > y |
|
447 | > y | |
447 | > y |
|
448 | > y | |
448 | > EOF |
|
449 | > EOF | |
449 | diff --git a/a b/a |
|
450 | diff --git a/a b/a | |
450 | 2 hunks, 2 lines changed |
|
451 | 2 hunks, 2 lines changed | |
451 | examine changes to 'a'? [Ynesfdaq?] y |
|
452 | examine changes to 'a'? [Ynesfdaq?] y | |
452 |
|
453 | |||
453 | @@ -1,3 +1,4 @@ |
|
454 | @@ -1,3 +1,4 @@ | |
454 | expand $Id$ |
|
455 | expand $Id$ | |
455 | +foo |
|
456 | +foo | |
456 | do not process $Id: |
|
457 | do not process $Id: | |
457 | xxx $ |
|
458 | xxx $ | |
458 | record change 1/2 to 'a'? [Ynesfdaq?] y |
|
459 | record change 1/2 to 'a'? [Ynesfdaq?] y | |
459 |
|
460 | |||
460 | @@ -2,2 +3,3 @@ |
|
461 | @@ -2,2 +3,3 @@ | |
461 | do not process $Id: |
|
462 | do not process $Id: | |
462 | xxx $ |
|
463 | xxx $ | |
463 | +bar |
|
464 | +bar | |
464 | record change 2/2 to 'a'? [Ynesfdaq?] y |
|
465 | record change 2/2 to 'a'? [Ynesfdaq?] y | |
465 |
|
466 | |||
466 |
|
467 | |||
467 | File a should be clean |
|
468 | File a should be clean | |
468 |
|
469 | |||
469 | $ hg status -A a |
|
470 | $ hg status -A a | |
470 | C a |
|
471 | C a | |
471 |
|
472 | |||
472 | rollback and revert expansion |
|
473 | rollback and revert expansion | |
473 |
|
474 | |||
474 | $ cat a |
|
475 | $ cat a | |
475 | expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $ |
|
476 | expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $ | |
476 | foo |
|
477 | foo | |
477 | do not process $Id: |
|
478 | do not process $Id: | |
478 | xxx $ |
|
479 | xxx $ | |
479 | bar |
|
480 | bar | |
480 | $ hg --verbose rollback |
|
481 | $ hg --verbose rollback | |
481 | repository tip rolled back to revision 2 (undo commit) |
|
482 | repository tip rolled back to revision 2 (undo commit) | |
482 | working directory now based on revision 2 |
|
483 | working directory now based on revision 2 | |
483 | overwriting a expanding keywords |
|
484 | overwriting a expanding keywords | |
484 | $ hg status a |
|
485 | $ hg status a | |
485 | M a |
|
486 | M a | |
486 | $ cat a |
|
487 | $ cat a | |
487 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
488 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
488 | foo |
|
489 | foo | |
489 | do not process $Id: |
|
490 | do not process $Id: | |
490 | xxx $ |
|
491 | xxx $ | |
491 | bar |
|
492 | bar | |
492 | $ echo '$Id$' > y |
|
493 | $ echo '$Id$' > y | |
493 | $ echo '$Id$' > z |
|
494 | $ echo '$Id$' > z | |
494 | $ hg add y |
|
495 | $ hg add y | |
495 | $ hg commit -Am "rollback only" z |
|
496 | $ hg commit -Am "rollback only" z | |
496 | $ cat z |
|
497 | $ cat z | |
497 | $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ |
|
498 | $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ | |
498 | $ hg --verbose rollback |
|
499 | $ hg --verbose rollback | |
499 | repository tip rolled back to revision 2 (undo commit) |
|
500 | repository tip rolled back to revision 2 (undo commit) | |
500 | working directory now based on revision 2 |
|
501 | working directory now based on revision 2 | |
501 | overwriting z shrinking keywords |
|
502 | overwriting z shrinking keywords | |
502 |
|
503 | |||
503 | Only z should be overwritten |
|
504 | Only z should be overwritten | |
504 |
|
505 | |||
505 | $ hg status a y z |
|
506 | $ hg status a y z | |
506 | M a |
|
507 | M a | |
507 | A y |
|
508 | A y | |
508 | A z |
|
509 | A z | |
509 | $ cat z |
|
510 | $ cat z | |
510 | $Id$ |
|
511 | $Id$ | |
511 | $ hg forget y z |
|
512 | $ hg forget y z | |
512 | $ rm y z |
|
513 | $ rm y z | |
513 |
|
514 | |||
514 | record added file alone |
|
515 | record added file alone | |
515 |
|
516 | |||
516 | $ hg -v record -l msg -d '12 2' r<<EOF |
|
517 | $ hg -v record -l msg -d '12 2' r<<EOF | |
517 | > y |
|
518 | > y | |
518 | > y |
|
519 | > y | |
519 | > EOF |
|
520 | > EOF | |
520 | diff --git a/r b/r |
|
521 | diff --git a/r b/r | |
521 | new file mode 100644 |
|
522 | new file mode 100644 | |
522 | examine changes to 'r'? [Ynesfdaq?] y |
|
523 | examine changes to 'r'? [Ynesfdaq?] y | |
523 |
|
524 | |||
524 | @@ -0,0 +1,1 @@ |
|
525 | @@ -0,0 +1,1 @@ | |
525 | +$Id$ |
|
526 | +$Id$ | |
526 | record this change to 'r'? [Ynesfdaq?] y |
|
527 | record this change to 'r'? [Ynesfdaq?] y | |
527 |
|
528 | |||
528 | resolving manifests |
|
529 | resolving manifests | |
529 | patching file r |
|
530 | patching file r | |
530 | committing files: |
|
531 | committing files: | |
531 | r |
|
532 | r | |
532 | committing manifest |
|
533 | committing manifest | |
533 | committing changelog |
|
534 | committing changelog | |
534 | committed changeset 3:82a2f715724d |
|
535 | committed changeset 3:82a2f715724d | |
535 | overwriting r expanding keywords |
|
536 | overwriting r expanding keywords | |
536 | $ hg status r |
|
537 | $ hg status r | |
537 | $ hg --verbose rollback |
|
538 | $ hg --verbose rollback | |
538 | repository tip rolled back to revision 2 (undo commit) |
|
539 | repository tip rolled back to revision 2 (undo commit) | |
539 | working directory now based on revision 2 |
|
540 | working directory now based on revision 2 | |
540 | overwriting r shrinking keywords |
|
541 | overwriting r shrinking keywords | |
541 | $ hg forget r |
|
542 | $ hg forget r | |
542 | $ rm msg r |
|
543 | $ rm msg r | |
543 | $ hg update -C |
|
544 | $ hg update -C | |
544 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
545 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
545 |
|
546 | |||
546 | record added keyword ignored file |
|
547 | record added keyword ignored file | |
547 |
|
548 | |||
548 | $ echo '$Id$' > i |
|
549 | $ echo '$Id$' > i | |
549 | $ hg add i |
|
550 | $ hg add i | |
550 | $ hg --verbose record -d '13 1' -m recignored<<EOF |
|
551 | $ hg --verbose record -d '13 1' -m recignored<<EOF | |
551 | > y |
|
552 | > y | |
552 | > y |
|
553 | > y | |
553 | > EOF |
|
554 | > EOF | |
554 | diff --git a/i b/i |
|
555 | diff --git a/i b/i | |
555 | new file mode 100644 |
|
556 | new file mode 100644 | |
556 | examine changes to 'i'? [Ynesfdaq?] y |
|
557 | examine changes to 'i'? [Ynesfdaq?] y | |
557 |
|
558 | |||
558 | @@ -0,0 +1,1 @@ |
|
559 | @@ -0,0 +1,1 @@ | |
559 | +$Id$ |
|
560 | +$Id$ | |
560 | record this change to 'i'? [Ynesfdaq?] y |
|
561 | record this change to 'i'? [Ynesfdaq?] y | |
561 |
|
562 | |||
562 | resolving manifests |
|
563 | resolving manifests | |
563 | patching file i |
|
564 | patching file i | |
564 | committing files: |
|
565 | committing files: | |
565 | i |
|
566 | i | |
566 | committing manifest |
|
567 | committing manifest | |
567 | committing changelog |
|
568 | committing changelog | |
568 | committed changeset 3:9f40ceb5a072 |
|
569 | committed changeset 3:9f40ceb5a072 | |
569 | $ cat i |
|
570 | $ cat i | |
570 | $Id$ |
|
571 | $Id$ | |
571 | $ hg -q rollback |
|
572 | $ hg -q rollback | |
572 | $ hg forget i |
|
573 | $ hg forget i | |
573 | $ rm i |
|
574 | $ rm i | |
574 |
|
575 | |||
575 | amend |
|
576 | amend | |
576 |
|
577 | |||
577 | $ echo amend >> a |
|
578 | $ echo amend >> a | |
578 | $ echo amend >> b |
|
579 | $ echo amend >> b | |
579 | $ hg -q commit -d '14 1' -m 'prepare amend' |
|
580 | $ hg -q commit -d '14 1' -m 'prepare amend' | |
580 |
|
581 | |||
581 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords |
|
582 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords | |
582 | overwriting a expanding keywords |
|
583 | overwriting a expanding keywords | |
583 | $ hg -q id |
|
584 | $ hg -q id | |
584 | 67d8c481a6be |
|
585 | 67d8c481a6be | |
585 | $ head -1 a |
|
586 | $ head -1 a | |
586 | expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $ |
|
587 | expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $ | |
587 |
|
588 | |||
588 | $ hg -q strip --no-backup tip |
|
589 | $ hg -q strip --no-backup tip | |
589 |
|
590 | |||
590 | Test patch queue repo |
|
591 | Test patch queue repo | |
591 |
|
592 | |||
592 | $ hg init --mq |
|
593 | $ hg init --mq | |
593 | $ hg qimport -r tip -n mqtest.diff |
|
594 | $ hg qimport -r tip -n mqtest.diff | |
594 | $ hg commit --mq -m mqtest |
|
595 | $ hg commit --mq -m mqtest | |
595 |
|
596 | |||
596 | Keywords should not be expanded in patch |
|
597 | Keywords should not be expanded in patch | |
597 |
|
598 | |||
598 | $ cat .hg/patches/mqtest.diff |
|
599 | $ cat .hg/patches/mqtest.diff | |
599 | # HG changeset patch |
|
600 | # HG changeset patch | |
600 | # User User Name <user@example.com> |
|
601 | # User User Name <user@example.com> | |
601 | # Date 1 0 |
|
602 | # Date 1 0 | |
602 | # Thu Jan 01 00:00:01 1970 +0000 |
|
603 | # Thu Jan 01 00:00:01 1970 +0000 | |
603 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad |
|
604 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad | |
604 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
605 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
605 | cndiff |
|
606 | cndiff | |
606 |
|
607 | |||
607 | diff -r ef63ca68695b -r 40a904bbbe4c c |
|
608 | diff -r ef63ca68695b -r 40a904bbbe4c c | |
608 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
609 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
609 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 |
|
610 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 | |
610 | @@ -0,0 +1,2 @@ |
|
611 | @@ -0,0 +1,2 @@ | |
611 | +$Id$ |
|
612 | +$Id$ | |
612 | +tests for different changenodes |
|
613 | +tests for different changenodes | |
613 |
|
614 | |||
614 | $ hg qpop |
|
615 | $ hg qpop | |
615 | popping mqtest.diff |
|
616 | popping mqtest.diff | |
616 | patch queue now empty |
|
617 | patch queue now empty | |
617 |
|
618 | |||
618 | qgoto, implying qpush, should expand |
|
619 | qgoto, implying qpush, should expand | |
619 |
|
620 | |||
620 | $ hg qgoto mqtest.diff |
|
621 | $ hg qgoto mqtest.diff | |
621 | applying mqtest.diff |
|
622 | applying mqtest.diff | |
622 | now at: mqtest.diff |
|
623 | now at: mqtest.diff | |
623 | $ cat c |
|
624 | $ cat c | |
624 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
625 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
625 | tests for different changenodes |
|
626 | tests for different changenodes | |
626 | $ hg cat c |
|
627 | $ hg cat c | |
627 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
628 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
628 | tests for different changenodes |
|
629 | tests for different changenodes | |
629 |
|
630 | |||
630 | Keywords should not be expanded in filelog |
|
631 | Keywords should not be expanded in filelog | |
631 |
|
632 | |||
632 | $ hg --config 'extensions.keyword=!' cat c |
|
633 | $ hg --config 'extensions.keyword=!' cat c | |
633 | $Id$ |
|
634 | $Id$ | |
634 | tests for different changenodes |
|
635 | tests for different changenodes | |
635 |
|
636 | |||
636 | qpop and move on |
|
637 | qpop and move on | |
637 |
|
638 | |||
638 | $ hg qpop |
|
639 | $ hg qpop | |
639 | popping mqtest.diff |
|
640 | popping mqtest.diff | |
640 | patch queue now empty |
|
641 | patch queue now empty | |
641 |
|
642 | |||
642 | Copy and show added kwfiles |
|
643 | Copy and show added kwfiles | |
643 |
|
644 | |||
644 | $ hg cp a c |
|
645 | $ hg cp a c | |
645 | $ hg kwfiles |
|
646 | $ hg kwfiles | |
646 | a |
|
647 | a | |
647 | c |
|
648 | c | |
648 |
|
649 | |||
649 | Commit and show expansion in original and copy |
|
650 | Commit and show expansion in original and copy | |
650 |
|
651 | |||
651 | $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' |
|
652 | $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' | |
652 | committing files: |
|
653 | committing files: | |
653 | c |
|
654 | c | |
654 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 |
|
655 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 | |
655 | committing manifest |
|
656 | committing manifest | |
656 | committing changelog |
|
657 | committing changelog | |
657 | overwriting c expanding keywords |
|
658 | overwriting c expanding keywords | |
658 | updating the branch cache |
|
659 | updating the branch cache | |
659 | committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d |
|
660 | committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d | |
660 | $ cat a c |
|
661 | $ cat a c | |
661 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
662 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
662 | do not process $Id: |
|
663 | do not process $Id: | |
663 | xxx $ |
|
664 | xxx $ | |
664 | expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $ |
|
665 | expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $ | |
665 | do not process $Id: |
|
666 | do not process $Id: | |
666 | xxx $ |
|
667 | xxx $ | |
667 |
|
668 | |||
668 | Touch copied c and check its status |
|
669 | Touch copied c and check its status | |
669 |
|
670 | |||
670 | $ touch c |
|
671 | $ touch c | |
671 | $ hg status |
|
672 | $ hg status | |
672 |
|
673 | |||
673 | Copy kwfile to keyword ignored file unexpanding keywords |
|
674 | Copy kwfile to keyword ignored file unexpanding keywords | |
674 |
|
675 | |||
675 | $ hg --verbose copy a i |
|
676 | $ hg --verbose copy a i | |
676 | copying a to i |
|
677 | copying a to i | |
677 | overwriting i shrinking keywords |
|
678 | overwriting i shrinking keywords | |
678 | $ head -n 1 i |
|
679 | $ head -n 1 i | |
679 | expand $Id$ |
|
680 | expand $Id$ | |
680 | $ hg forget i |
|
681 | $ hg forget i | |
681 | $ rm i |
|
682 | $ rm i | |
682 |
|
683 | |||
683 | Copy ignored file to ignored file: no overwriting |
|
684 | Copy ignored file to ignored file: no overwriting | |
684 |
|
685 | |||
685 | $ hg --verbose copy b i |
|
686 | $ hg --verbose copy b i | |
686 | copying b to i |
|
687 | copying b to i | |
687 | $ hg forget i |
|
688 | $ hg forget i | |
688 | $ rm i |
|
689 | $ rm i | |
689 |
|
690 | |||
690 | cp symlink file; hg cp -A symlink file (part1) |
|
691 | cp symlink file; hg cp -A symlink file (part1) | |
691 | - copied symlink points to kwfile: overwrite |
|
692 | - copied symlink points to kwfile: overwrite | |
692 |
|
693 | |||
693 | #if symlink |
|
694 | #if symlink | |
694 | $ cp sym i |
|
695 | $ cp sym i | |
695 | $ ls -l i |
|
696 | $ ls -l i | |
696 | -rw-r--r--* (glob) |
|
697 | -rw-r--r--* (glob) | |
697 | $ head -1 i |
|
698 | $ head -1 i | |
698 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
699 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
699 | $ hg copy --after --verbose sym i |
|
700 | $ hg copy --after --verbose sym i | |
700 | copying sym to i |
|
701 | copying sym to i | |
701 | overwriting i shrinking keywords |
|
702 | overwriting i shrinking keywords | |
702 | $ head -1 i |
|
703 | $ head -1 i | |
703 | expand $Id$ |
|
704 | expand $Id$ | |
704 | $ hg forget i |
|
705 | $ hg forget i | |
705 | $ rm i |
|
706 | $ rm i | |
706 | #endif |
|
707 | #endif | |
707 |
|
708 | |||
708 | Test different options of hg kwfiles |
|
709 | Test different options of hg kwfiles | |
709 |
|
710 | |||
710 | $ hg kwfiles |
|
711 | $ hg kwfiles | |
711 | a |
|
712 | a | |
712 | c |
|
713 | c | |
713 | $ hg -v kwfiles --ignore |
|
714 | $ hg -v kwfiles --ignore | |
714 | I b |
|
715 | I b | |
715 | I sym |
|
716 | I sym | |
716 | $ hg kwfiles --all |
|
717 | $ hg kwfiles --all | |
717 | K a |
|
718 | K a | |
718 | K c |
|
719 | K c | |
719 | I b |
|
720 | I b | |
720 | I sym |
|
721 | I sym | |
721 |
|
722 | |||
722 | Diff specific revision |
|
723 | Diff specific revision | |
723 |
|
724 | |||
724 | $ hg diff --rev 1 |
|
725 | $ hg diff --rev 1 | |
725 | diff -r ef63ca68695b c |
|
726 | diff -r ef63ca68695b c | |
726 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
727 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
727 | +++ b/c * (glob) |
|
728 | +++ b/c * (glob) | |
728 | @@ -0,0 +1,3 @@ |
|
729 | @@ -0,0 +1,3 @@ | |
729 | +expand $Id$ |
|
730 | +expand $Id$ | |
730 | +do not process $Id: |
|
731 | +do not process $Id: | |
731 | +xxx $ |
|
732 | +xxx $ | |
732 |
|
733 | |||
733 | Status after rollback: |
|
734 | Status after rollback: | |
734 |
|
735 | |||
735 | $ hg rollback |
|
736 | $ hg rollback | |
736 | repository tip rolled back to revision 1 (undo commit) |
|
737 | repository tip rolled back to revision 1 (undo commit) | |
737 | working directory now based on revision 1 |
|
738 | working directory now based on revision 1 | |
738 | $ hg status |
|
739 | $ hg status | |
739 | A c |
|
740 | A c | |
740 | $ hg update --clean |
|
741 | $ hg update --clean | |
741 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
742 |
|
743 | |||
743 | #if symlink |
|
744 | #if symlink | |
744 |
|
745 | |||
745 | cp symlink file; hg cp -A symlink file (part2) |
|
746 | cp symlink file; hg cp -A symlink file (part2) | |
746 | - copied symlink points to kw ignored file: do not overwrite |
|
747 | - copied symlink points to kw ignored file: do not overwrite | |
747 |
|
748 | |||
748 | $ cat a > i |
|
749 | $ cat a > i | |
749 | $ ln -s i symignored |
|
750 | $ ln -s i symignored | |
750 | $ hg commit -Am 'fake expansion in ignored and symlink' i symignored |
|
751 | $ hg commit -Am 'fake expansion in ignored and symlink' i symignored | |
751 | $ cp symignored x |
|
752 | $ cp symignored x | |
752 | $ hg copy --after --verbose symignored x |
|
753 | $ hg copy --after --verbose symignored x | |
753 | copying symignored to x |
|
754 | copying symignored to x | |
754 | $ head -n 1 x |
|
755 | $ head -n 1 x | |
755 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
756 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
756 | $ hg forget x |
|
757 | $ hg forget x | |
757 | $ rm x |
|
758 | $ rm x | |
758 |
|
759 | |||
759 | $ hg rollback |
|
760 | $ hg rollback | |
760 | repository tip rolled back to revision 1 (undo commit) |
|
761 | repository tip rolled back to revision 1 (undo commit) | |
761 | working directory now based on revision 1 |
|
762 | working directory now based on revision 1 | |
762 | $ hg update --clean |
|
763 | $ hg update --clean | |
763 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
764 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
764 | $ rm i symignored |
|
765 | $ rm i symignored | |
765 |
|
766 | |||
766 | #endif |
|
767 | #endif | |
767 |
|
768 | |||
768 | Custom keywordmaps as argument to kwdemo |
|
769 | Custom keywordmaps as argument to kwdemo | |
769 |
|
770 | |||
770 | $ hg --quiet kwdemo "Xinfo = {author}: {desc}" |
|
771 | $ hg --quiet kwdemo "Xinfo = {author}: {desc}" | |
771 | [extensions] |
|
772 | [extensions] | |
772 | keyword = |
|
773 | keyword = | |
773 | [keyword] |
|
774 | [keyword] | |
774 | ** = |
|
775 | ** = | |
775 | b = ignore |
|
776 | b = ignore | |
776 | demo.txt = |
|
777 | demo.txt = | |
777 | i = ignore |
|
778 | i = ignore | |
778 | [keywordset] |
|
779 | [keywordset] | |
779 | svn = False |
|
780 | svn = False | |
780 | [keywordmaps] |
|
781 | [keywordmaps] | |
781 | Xinfo = {author}: {desc} |
|
782 | Xinfo = {author}: {desc} | |
782 | $Xinfo: test: hg keyword configuration and expansion example $ |
|
783 | $Xinfo: test: hg keyword configuration and expansion example $ | |
783 |
|
784 | |||
784 | Configure custom keywordmaps |
|
785 | Configure custom keywordmaps | |
785 |
|
786 | |||
786 | $ cat <<EOF >>$HGRCPATH |
|
787 | $ cat <<EOF >>$HGRCPATH | |
787 | > [keywordmaps] |
|
788 | > [keywordmaps] | |
788 | > Id = {file} {node|short} {date|rfc822date} {author|user} |
|
789 | > Id = {file} {node|short} {date|rfc822date} {author|user} | |
789 | > Xinfo = {author}: {desc} |
|
790 | > Xinfo = {author}: {desc} | |
790 | > EOF |
|
791 | > EOF | |
791 |
|
792 | |||
792 | Cat and hg cat files before custom expansion |
|
793 | Cat and hg cat files before custom expansion | |
793 |
|
794 | |||
794 | $ cat a b |
|
795 | $ cat a b | |
795 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
796 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
796 | do not process $Id: |
|
797 | do not process $Id: | |
797 | xxx $ |
|
798 | xxx $ | |
798 | ignore $Id$ |
|
799 | ignore $Id$ | |
799 | $ hg cat sym a b && echo |
|
800 | $ hg cat sym a b && echo | |
800 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ |
|
801 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ | |
801 | do not process $Id: |
|
802 | do not process $Id: | |
802 | xxx $ |
|
803 | xxx $ | |
803 | ignore $Id$ |
|
804 | ignore $Id$ | |
804 | a |
|
805 | a | |
805 |
|
806 | |||
806 | Write custom keyword and prepare multi-line commit message |
|
807 | Write custom keyword and prepare multi-line commit message | |
807 |
|
808 | |||
808 | $ echo '$Xinfo$' >> a |
|
809 | $ echo '$Xinfo$' >> a | |
809 | $ cat <<EOF >> log |
|
810 | $ cat <<EOF >> log | |
810 | > firstline |
|
811 | > firstline | |
811 | > secondline |
|
812 | > secondline | |
812 | > EOF |
|
813 | > EOF | |
813 |
|
814 | |||
814 | Interrupted commit should not change state |
|
815 | Interrupted commit should not change state | |
815 |
|
816 | |||
816 | $ hg commit |
|
817 | $ hg commit | |
817 | abort: empty commit message |
|
818 | abort: empty commit message | |
818 | [255] |
|
819 | [255] | |
819 | $ hg status |
|
820 | $ hg status | |
820 | M a |
|
821 | M a | |
821 | ? c |
|
822 | ? c | |
822 | ? log |
|
823 | ? log | |
823 |
|
824 | |||
824 | Commit with multi-line message and custom expansion |
|
825 | Commit with multi-line message and custom expansion | |
825 |
|
826 | |||
826 | $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' |
|
827 | $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' | |
827 | committing files: |
|
828 | committing files: | |
828 | a |
|
829 | a | |
829 | committing manifest |
|
830 | committing manifest | |
830 | committing changelog |
|
831 | committing changelog | |
831 | overwriting a expanding keywords |
|
832 | overwriting a expanding keywords | |
832 | updating the branch cache |
|
833 | updating the branch cache | |
833 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
834 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 | |
834 | $ rm log |
|
835 | $ rm log | |
835 |
|
836 | |||
836 | Stat, verify and show custom expansion (firstline) |
|
837 | Stat, verify and show custom expansion (firstline) | |
837 |
|
838 | |||
838 | $ hg status |
|
839 | $ hg status | |
839 | ? c |
|
840 | ? c | |
840 | $ hg verify |
|
841 | $ hg verify | |
841 | checking changesets |
|
842 | checking changesets | |
842 | checking manifests |
|
843 | checking manifests | |
843 | crosschecking files in changesets and manifests |
|
844 | crosschecking files in changesets and manifests | |
844 | checking files |
|
845 | checking files | |
845 | 3 files, 3 changesets, 4 total revisions |
|
846 | 3 files, 3 changesets, 4 total revisions | |
846 | $ cat a b |
|
847 | $ cat a b | |
847 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
848 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
848 | do not process $Id: |
|
849 | do not process $Id: | |
849 | xxx $ |
|
850 | xxx $ | |
850 | $Xinfo: User Name <user@example.com>: firstline $ |
|
851 | $Xinfo: User Name <user@example.com>: firstline $ | |
851 | ignore $Id$ |
|
852 | ignore $Id$ | |
852 | $ hg cat sym a b && echo |
|
853 | $ hg cat sym a b && echo | |
853 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
854 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
854 | do not process $Id: |
|
855 | do not process $Id: | |
855 | xxx $ |
|
856 | xxx $ | |
856 | $Xinfo: User Name <user@example.com>: firstline $ |
|
857 | $Xinfo: User Name <user@example.com>: firstline $ | |
857 | ignore $Id$ |
|
858 | ignore $Id$ | |
858 | a |
|
859 | a | |
859 |
|
860 | |||
860 | annotate |
|
861 | annotate | |
861 |
|
862 | |||
862 | $ hg annotate a |
|
863 | $ hg annotate a | |
863 | 1: expand $Id$ |
|
864 | 1: expand $Id$ | |
864 | 1: do not process $Id: |
|
865 | 1: do not process $Id: | |
865 | 1: xxx $ |
|
866 | 1: xxx $ | |
866 | 2: $Xinfo$ |
|
867 | 2: $Xinfo$ | |
867 |
|
868 | |||
868 | remove with status checks |
|
869 | remove with status checks | |
869 |
|
870 | |||
870 | $ hg debugrebuildstate |
|
871 | $ hg debugrebuildstate | |
871 | $ hg remove a |
|
872 | $ hg remove a | |
872 | $ hg --debug commit -m rma |
|
873 | $ hg --debug commit -m rma | |
873 | committing files: |
|
874 | committing files: | |
874 | committing manifest |
|
875 | committing manifest | |
875 | committing changelog |
|
876 | committing changelog | |
876 | updating the branch cache |
|
877 | updating the branch cache | |
877 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 |
|
878 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 | |
878 | $ hg status |
|
879 | $ hg status | |
879 | ? c |
|
880 | ? c | |
880 |
|
881 | |||
881 | Rollback, revert, and check expansion |
|
882 | Rollback, revert, and check expansion | |
882 |
|
883 | |||
883 | $ hg rollback |
|
884 | $ hg rollback | |
884 | repository tip rolled back to revision 2 (undo commit) |
|
885 | repository tip rolled back to revision 2 (undo commit) | |
885 | working directory now based on revision 2 |
|
886 | working directory now based on revision 2 | |
886 | $ hg status |
|
887 | $ hg status | |
887 | R a |
|
888 | R a | |
888 | ? c |
|
889 | ? c | |
889 | $ hg revert --no-backup --rev tip a |
|
890 | $ hg revert --no-backup --rev tip a | |
890 | $ cat a |
|
891 | $ cat a | |
891 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
892 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
892 | do not process $Id: |
|
893 | do not process $Id: | |
893 | xxx $ |
|
894 | xxx $ | |
894 | $Xinfo: User Name <user@example.com>: firstline $ |
|
895 | $Xinfo: User Name <user@example.com>: firstline $ | |
895 |
|
896 | |||
896 | Clone to test global and local configurations |
|
897 | Clone to test global and local configurations | |
897 |
|
898 | |||
898 | $ cd .. |
|
899 | $ cd .. | |
899 |
|
900 | |||
900 | Expansion in destination with global configuration |
|
901 | Expansion in destination with global configuration | |
901 |
|
902 | |||
902 | $ hg --quiet clone Test globalconf |
|
903 | $ hg --quiet clone Test globalconf | |
903 | $ cat globalconf/a |
|
904 | $ cat globalconf/a | |
904 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
905 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
905 | do not process $Id: |
|
906 | do not process $Id: | |
906 | xxx $ |
|
907 | xxx $ | |
907 | $Xinfo: User Name <user@example.com>: firstline $ |
|
908 | $Xinfo: User Name <user@example.com>: firstline $ | |
908 |
|
909 | |||
909 | No expansion in destination with local configuration in origin only |
|
910 | No expansion in destination with local configuration in origin only | |
910 |
|
911 | |||
911 | $ hg --quiet --config 'keyword.**=ignore' clone Test localconf |
|
912 | $ hg --quiet --config 'keyword.**=ignore' clone Test localconf | |
912 | $ cat localconf/a |
|
913 | $ cat localconf/a | |
913 | expand $Id$ |
|
914 | expand $Id$ | |
914 | do not process $Id: |
|
915 | do not process $Id: | |
915 | xxx $ |
|
916 | xxx $ | |
916 | $Xinfo$ |
|
917 | $Xinfo$ | |
917 |
|
918 | |||
918 | Clone to test incoming |
|
919 | Clone to test incoming | |
919 |
|
920 | |||
920 | $ hg clone -r1 Test Test-a |
|
921 | $ hg clone -r1 Test Test-a | |
921 | adding changesets |
|
922 | adding changesets | |
922 | adding manifests |
|
923 | adding manifests | |
923 | adding file changes |
|
924 | adding file changes | |
924 | added 2 changesets with 3 changes to 3 files |
|
925 | added 2 changesets with 3 changes to 3 files | |
925 | new changesets a2392c293916:ef63ca68695b |
|
926 | new changesets a2392c293916:ef63ca68695b | |
926 | updating to branch default |
|
927 | updating to branch default | |
927 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
928 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
928 | $ cd Test-a |
|
929 | $ cd Test-a | |
929 | $ cat <<EOF >> .hg/hgrc |
|
930 | $ cat <<EOF >> .hg/hgrc | |
930 | > [paths] |
|
931 | > [paths] | |
931 | > default = ../Test |
|
932 | > default = ../Test | |
932 | > EOF |
|
933 | > EOF | |
933 | $ hg incoming |
|
934 | $ hg incoming | |
934 | comparing with $TESTTMP/Test |
|
935 | comparing with $TESTTMP/Test | |
935 | searching for changes |
|
936 | searching for changes | |
936 | changeset: 2:bb948857c743 |
|
937 | changeset: 2:bb948857c743 | |
937 | tag: tip |
|
938 | tag: tip | |
938 | user: User Name <user@example.com> |
|
939 | user: User Name <user@example.com> | |
939 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
940 | date: Thu Jan 01 00:00:02 1970 +0000 | |
940 | summary: firstline |
|
941 | summary: firstline | |
941 |
|
942 | |||
942 | Imported patch should not be rejected |
|
943 | Imported patch should not be rejected | |
943 |
|
944 | |||
944 | >>> import re |
|
945 | >>> import re | |
945 | >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) |
|
946 | >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) | |
946 | >>> open('a', 'wb').write(text) |
|
947 | >>> open('a', 'wb').write(text) | |
947 | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
|
948 | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' | |
948 | committing files: |
|
949 | committing files: | |
949 | a |
|
950 | a | |
950 | committing manifest |
|
951 | committing manifest | |
951 | committing changelog |
|
952 | committing changelog | |
952 | overwriting a expanding keywords |
|
953 | overwriting a expanding keywords | |
953 | updating the branch cache |
|
954 | updating the branch cache | |
954 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
|
955 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 | |
955 | $ hg export -o ../rejecttest.diff tip |
|
956 | $ hg export -o ../rejecttest.diff tip | |
956 | $ cd ../Test |
|
957 | $ cd ../Test | |
957 | $ hg import ../rejecttest.diff |
|
958 | $ hg import ../rejecttest.diff | |
958 | applying ../rejecttest.diff |
|
959 | applying ../rejecttest.diff | |
959 | $ cat a b |
|
960 | $ cat a b | |
960 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest |
|
961 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest | |
961 | do not process $Id: rejecttest |
|
962 | do not process $Id: rejecttest | |
962 | xxx $ |
|
963 | xxx $ | |
963 | $Xinfo: User Name <user@example.com>: rejects? $ |
|
964 | $Xinfo: User Name <user@example.com>: rejects? $ | |
964 | ignore $Id$ |
|
965 | ignore $Id$ | |
965 |
|
966 | |||
966 | $ hg rollback |
|
967 | $ hg rollback | |
967 | repository tip rolled back to revision 2 (undo import) |
|
968 | repository tip rolled back to revision 2 (undo import) | |
968 | working directory now based on revision 2 |
|
969 | working directory now based on revision 2 | |
969 | $ hg update --clean |
|
970 | $ hg update --clean | |
970 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
971 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
971 |
|
972 | |||
972 | kwexpand/kwshrink on selected files |
|
973 | kwexpand/kwshrink on selected files | |
973 |
|
974 | |||
974 | $ mkdir x |
|
975 | $ mkdir x | |
975 | $ hg copy a x/a |
|
976 | $ hg copy a x/a | |
976 | $ hg --verbose kwshrink a |
|
977 | $ hg --verbose kwshrink a | |
977 | overwriting a shrinking keywords |
|
978 | overwriting a shrinking keywords | |
978 | - sleep required for dirstate.normal() check |
|
979 | - sleep required for dirstate.normal() check | |
979 | $ sleep 1 |
|
980 | $ sleep 1 | |
980 | $ hg status a |
|
981 | $ hg status a | |
981 | $ hg --verbose kwexpand a |
|
982 | $ hg --verbose kwexpand a | |
982 | overwriting a expanding keywords |
|
983 | overwriting a expanding keywords | |
983 | $ hg status a |
|
984 | $ hg status a | |
984 |
|
985 | |||
985 | kwexpand x/a should abort |
|
986 | kwexpand x/a should abort | |
986 |
|
987 | |||
987 | $ hg --verbose kwexpand x/a |
|
988 | $ hg --verbose kwexpand x/a | |
988 | abort: outstanding uncommitted changes |
|
989 | abort: outstanding uncommitted changes | |
989 | [255] |
|
990 | [255] | |
990 | $ cd x |
|
991 | $ cd x | |
991 | $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' |
|
992 | $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' | |
992 | committing files: |
|
993 | committing files: | |
993 | x/a |
|
994 | x/a | |
994 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e |
|
995 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e | |
995 | committing manifest |
|
996 | committing manifest | |
996 | committing changelog |
|
997 | committing changelog | |
997 | overwriting x/a expanding keywords |
|
998 | overwriting x/a expanding keywords | |
998 | updating the branch cache |
|
999 | updating the branch cache | |
999 | committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
1000 | committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4 | |
1000 | $ cat a |
|
1001 | $ cat a | |
1001 | expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $ |
|
1002 | expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $ | |
1002 | do not process $Id: |
|
1003 | do not process $Id: | |
1003 | xxx $ |
|
1004 | xxx $ | |
1004 | $Xinfo: User Name <user@example.com>: xa $ |
|
1005 | $Xinfo: User Name <user@example.com>: xa $ | |
1005 |
|
1006 | |||
1006 | kwshrink a inside directory x |
|
1007 | kwshrink a inside directory x | |
1007 |
|
1008 | |||
1008 | $ hg --verbose kwshrink a |
|
1009 | $ hg --verbose kwshrink a | |
1009 | overwriting x/a shrinking keywords |
|
1010 | overwriting x/a shrinking keywords | |
1010 | $ cat a |
|
1011 | $ cat a | |
1011 | expand $Id$ |
|
1012 | expand $Id$ | |
1012 | do not process $Id: |
|
1013 | do not process $Id: | |
1013 | xxx $ |
|
1014 | xxx $ | |
1014 | $Xinfo$ |
|
1015 | $Xinfo$ | |
1015 | $ cd .. |
|
1016 | $ cd .. | |
1016 |
|
1017 | |||
1017 | kwexpand nonexistent |
|
1018 | kwexpand nonexistent | |
1018 |
|
1019 | |||
1019 | $ hg kwexpand nonexistent |
|
1020 | $ hg kwexpand nonexistent | |
1020 | nonexistent:* (glob) |
|
1021 | nonexistent:* (glob) | |
1021 |
|
1022 | |||
1022 |
|
1023 | |||
1023 | #if serve |
|
1024 | #if serve | |
1024 | hg serve |
|
1025 | hg serve | |
1025 | - expand with hgweb file |
|
1026 | - expand with hgweb file | |
1026 | - no expansion with hgweb annotate/changeset/filediff/comparison |
|
1027 | - no expansion with hgweb annotate/changeset/filediff/comparison | |
1027 | - expand with hgweb file, again |
|
1028 | - expand with hgweb file, again | |
1028 | - check errors |
|
1029 | - check errors | |
1029 |
|
1030 | |||
1030 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1031 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1031 | $ cat hg.pid >> $DAEMON_PIDS |
|
1032 | $ cat hg.pid >> $DAEMON_PIDS | |
1032 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' |
|
1033 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' | |
1033 | 200 Script output follows |
|
1034 | 200 Script output follows | |
1034 |
|
1035 | |||
1035 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1036 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1036 | do not process $Id: |
|
1037 | do not process $Id: | |
1037 | xxx $ |
|
1038 | xxx $ | |
1038 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1039 | $Xinfo: User Name <user@example.com>: firstline $ | |
1039 | $ get-with-headers.py localhost:$HGPORT 'annotate/tip/a/?style=raw' |
|
1040 | $ get-with-headers.py localhost:$HGPORT 'annotate/tip/a/?style=raw' | |
1040 | 200 Script output follows |
|
1041 | 200 Script output follows | |
1041 |
|
1042 | |||
1042 |
|
1043 | |||
1043 | user@1: expand $Id$ |
|
1044 | user@1: expand $Id$ | |
1044 | user@1: do not process $Id: |
|
1045 | user@1: do not process $Id: | |
1045 | user@1: xxx $ |
|
1046 | user@1: xxx $ | |
1046 | user@2: $Xinfo$ |
|
1047 | user@2: $Xinfo$ | |
1047 |
|
1048 | |||
1048 |
|
1049 | |||
1049 |
|
1050 | |||
1050 |
|
1051 | |||
1051 | $ get-with-headers.py localhost:$HGPORT 'rev/tip/?style=raw' |
|
1052 | $ get-with-headers.py localhost:$HGPORT 'rev/tip/?style=raw' | |
1052 | 200 Script output follows |
|
1053 | 200 Script output follows | |
1053 |
|
1054 | |||
1054 |
|
1055 | |||
1055 | # HG changeset patch |
|
1056 | # HG changeset patch | |
1056 | # User User Name <user@example.com> |
|
1057 | # User User Name <user@example.com> | |
1057 | # Date 3 0 |
|
1058 | # Date 3 0 | |
1058 | # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
1059 | # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 | |
1059 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
1060 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 | |
1060 | xa |
|
1061 | xa | |
1061 |
|
1062 | |||
1062 | diff -r bb948857c743 -r b4560182a3f9 x/a |
|
1063 | diff -r bb948857c743 -r b4560182a3f9 x/a | |
1063 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1064 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1064 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 |
|
1065 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 | |
1065 | @@ -0,0 +1,4 @@ |
|
1066 | @@ -0,0 +1,4 @@ | |
1066 | +expand $Id$ |
|
1067 | +expand $Id$ | |
1067 | +do not process $Id: |
|
1068 | +do not process $Id: | |
1068 | +xxx $ |
|
1069 | +xxx $ | |
1069 | +$Xinfo$ |
|
1070 | +$Xinfo$ | |
1070 |
|
1071 | |||
1071 | $ get-with-headers.py localhost:$HGPORT 'diff/bb948857c743/a?style=raw' |
|
1072 | $ get-with-headers.py localhost:$HGPORT 'diff/bb948857c743/a?style=raw' | |
1072 | 200 Script output follows |
|
1073 | 200 Script output follows | |
1073 |
|
1074 | |||
1074 |
|
1075 | |||
1075 | diff -r ef63ca68695b -r bb948857c743 a |
|
1076 | diff -r ef63ca68695b -r bb948857c743 a | |
1076 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1077 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1077 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
1078 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 | |
1078 | @@ -1,3 +1,4 @@ |
|
1079 | @@ -1,3 +1,4 @@ | |
1079 | expand $Id$ |
|
1080 | expand $Id$ | |
1080 | do not process $Id: |
|
1081 | do not process $Id: | |
1081 | xxx $ |
|
1082 | xxx $ | |
1082 | +$Xinfo$ |
|
1083 | +$Xinfo$ | |
1083 |
|
1084 | |||
1084 |
|
1085 | |||
1085 |
|
1086 | |||
1086 |
|
1087 | |||
1087 | $ get-with-headers.py localhost:$HGPORT 'comparison/bb948857c743/a' | grep '\$[a-zA-Z]' |
|
1088 | $ get-with-headers.py localhost:$HGPORT 'comparison/bb948857c743/a' | grep '\$[a-zA-Z]' | |
1088 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> |
|
1089 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> | |
1089 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> |
|
1090 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> | |
1090 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> |
|
1091 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> | |
1091 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> |
|
1092 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> | |
1092 | <td class="source insert"><a href="#r4"> 4</a> $Xinfo$</td> |
|
1093 | <td class="source insert"><a href="#r4"> 4</a> $Xinfo$</td> | |
1093 |
|
1094 | |||
1094 | (check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords |
|
1095 | (check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords | |
1095 | at subsequent webcommands) |
|
1096 | at subsequent webcommands) | |
1096 |
|
1097 | |||
1097 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' |
|
1098 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' | |
1098 | 200 Script output follows |
|
1099 | 200 Script output follows | |
1099 |
|
1100 | |||
1100 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1101 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1101 | do not process $Id: |
|
1102 | do not process $Id: | |
1102 | xxx $ |
|
1103 | xxx $ | |
1103 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1104 | $Xinfo: User Name <user@example.com>: firstline $ | |
1104 |
|
1105 | |||
1105 | $ killdaemons.py |
|
1106 | $ killdaemons.py | |
1106 | $ cat errors.log |
|
1107 | $ cat errors.log | |
1107 | #endif |
|
1108 | #endif | |
1108 |
|
1109 | |||
1109 | Prepare merge and resolve tests |
|
1110 | Prepare merge and resolve tests | |
1110 |
|
1111 | |||
1111 | $ echo '$Id$' > m |
|
1112 | $ echo '$Id$' > m | |
1112 | $ hg add m |
|
1113 | $ hg add m | |
1113 | $ hg commit -m 4kw |
|
1114 | $ hg commit -m 4kw | |
1114 | $ echo foo >> m |
|
1115 | $ echo foo >> m | |
1115 | $ hg commit -m 5foo |
|
1116 | $ hg commit -m 5foo | |
1116 |
|
1117 | |||
1117 | simplemerge |
|
1118 | simplemerge | |
1118 |
|
1119 | |||
1119 | $ hg update 4 |
|
1120 | $ hg update 4 | |
1120 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1121 | $ echo foo >> m |
|
1122 | $ echo foo >> m | |
1122 | $ hg commit -m 6foo |
|
1123 | $ hg commit -m 6foo | |
1123 | created new head |
|
1124 | created new head | |
1124 | $ hg merge |
|
1125 | $ hg merge | |
1125 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1126 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1126 | (branch merge, don't forget to commit) |
|
1127 | (branch merge, don't forget to commit) | |
1127 | $ hg commit -m simplemerge |
|
1128 | $ hg commit -m simplemerge | |
1128 | $ cat m |
|
1129 | $ cat m | |
1129 | $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1130 | $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1130 | foo |
|
1131 | foo | |
1131 |
|
1132 | |||
1132 | conflict: keyword should stay outside conflict zone |
|
1133 | conflict: keyword should stay outside conflict zone | |
1133 |
|
1134 | |||
1134 | $ hg update 4 |
|
1135 | $ hg update 4 | |
1135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1136 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1136 | $ echo bar >> m |
|
1137 | $ echo bar >> m | |
1137 | $ hg commit -m 8bar |
|
1138 | $ hg commit -m 8bar | |
1138 | created new head |
|
1139 | created new head | |
1139 | $ hg merge |
|
1140 | $ hg merge | |
1140 | merging m |
|
1141 | merging m | |
1141 | warning: conflicts while merging m! (edit, then use 'hg resolve --mark') |
|
1142 | warning: conflicts while merging m! (edit, then use 'hg resolve --mark') | |
1142 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1143 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1143 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1144 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1144 | [1] |
|
1145 | [1] | |
1145 | $ cat m |
|
1146 | $ cat m | |
1146 | $Id$ |
|
1147 | $Id$ | |
1147 | <<<<<<< working copy: 88a80c8d172e - test: 8bar |
|
1148 | <<<<<<< working copy: 88a80c8d172e - test: 8bar | |
1148 | bar |
|
1149 | bar | |
1149 | ======= |
|
1150 | ======= | |
1150 | foo |
|
1151 | foo | |
1151 | >>>>>>> merge rev: 85d2d2d732a5 - test: simplemerge |
|
1152 | >>>>>>> merge rev: 85d2d2d732a5 - test: simplemerge | |
1152 |
|
1153 | |||
1153 | resolve to local, m must contain hash of last change (local parent) |
|
1154 | resolve to local, m must contain hash of last change (local parent) | |
1154 |
|
1155 | |||
1155 | $ hg resolve -t internal:local -a |
|
1156 | $ hg resolve -t internal:local -a | |
1156 | (no more unresolved files) |
|
1157 | (no more unresolved files) | |
1157 | $ hg commit -m localresolve |
|
1158 | $ hg commit -m localresolve | |
1158 | $ cat m |
|
1159 | $ cat m | |
1159 | $Id: m 88a80c8d172e Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1160 | $Id: m 88a80c8d172e Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1160 | bar |
|
1161 | bar | |
1161 |
|
1162 | |||
1162 | Test restricted mode with transplant -b |
|
1163 | Test restricted mode with transplant -b | |
1163 |
|
1164 | |||
1164 | $ hg update 6 |
|
1165 | $ hg update 6 | |
1165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1166 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1166 | $ hg branch foo |
|
1167 | $ hg branch foo | |
1167 | marked working directory as branch foo |
|
1168 | marked working directory as branch foo | |
1168 | (branches are permanent and global, did you want a bookmark?) |
|
1169 | (branches are permanent and global, did you want a bookmark?) | |
1169 | $ mv a a.bak |
|
1170 | $ mv a a.bak | |
1170 | $ echo foobranch > a |
|
1171 | $ echo foobranch > a | |
1171 | $ cat a.bak >> a |
|
1172 | $ cat a.bak >> a | |
1172 | $ rm a.bak |
|
1173 | $ rm a.bak | |
1173 | $ hg commit -m 9foobranch |
|
1174 | $ hg commit -m 9foobranch | |
1174 | $ hg update default |
|
1175 | $ hg update default | |
1175 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1176 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1176 | $ hg -y transplant -b foo tip |
|
1177 | $ hg -y transplant -b foo tip | |
1177 | applying 4aa30d025d50 |
|
1178 | applying 4aa30d025d50 | |
1178 | 4aa30d025d50 transplanted to e00abbf63521 |
|
1179 | 4aa30d025d50 transplanted to e00abbf63521 | |
1179 |
|
1180 | |||
1180 | Expansion in changeset but not in file |
|
1181 | Expansion in changeset but not in file | |
1181 |
|
1182 | |||
1182 | $ hg tip -p |
|
1183 | $ hg tip -p | |
1183 | changeset: 11:e00abbf63521 |
|
1184 | changeset: 11:e00abbf63521 | |
1184 | tag: tip |
|
1185 | tag: tip | |
1185 | parent: 9:800511b3a22d |
|
1186 | parent: 9:800511b3a22d | |
1186 | user: test |
|
1187 | user: test | |
1187 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1188 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1188 | summary: 9foobranch |
|
1189 | summary: 9foobranch | |
1189 |
|
1190 | |||
1190 | diff -r 800511b3a22d -r e00abbf63521 a |
|
1191 | diff -r 800511b3a22d -r e00abbf63521 a | |
1191 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1192 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1192 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1193 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1193 | @@ -1,3 +1,4 @@ |
|
1194 | @@ -1,3 +1,4 @@ | |
1194 | +foobranch |
|
1195 | +foobranch | |
1195 | expand $Id$ |
|
1196 | expand $Id$ | |
1196 | do not process $Id: |
|
1197 | do not process $Id: | |
1197 | xxx $ |
|
1198 | xxx $ | |
1198 |
|
1199 | |||
1199 | $ head -n 2 a |
|
1200 | $ head -n 2 a | |
1200 | foobranch |
|
1201 | foobranch | |
1201 | expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1202 | expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1202 |
|
1203 | |||
1203 | Turn off expansion |
|
1204 | Turn off expansion | |
1204 |
|
1205 | |||
1205 | $ hg -q rollback |
|
1206 | $ hg -q rollback | |
1206 | $ hg -q update -C |
|
1207 | $ hg -q update -C | |
1207 |
|
1208 | |||
1208 | kwshrink with unknown file u |
|
1209 | kwshrink with unknown file u | |
1209 |
|
1210 | |||
1210 | $ cp a u |
|
1211 | $ cp a u | |
1211 | $ hg --verbose kwshrink |
|
1212 | $ hg --verbose kwshrink | |
1212 | overwriting a shrinking keywords |
|
1213 | overwriting a shrinking keywords | |
1213 | overwriting m shrinking keywords |
|
1214 | overwriting m shrinking keywords | |
1214 | overwriting x/a shrinking keywords |
|
1215 | overwriting x/a shrinking keywords | |
1215 |
|
1216 | |||
1216 | Keywords shrunk in working directory, but not yet disabled |
|
1217 | Keywords shrunk in working directory, but not yet disabled | |
1217 | - cat shows unexpanded keywords |
|
1218 | - cat shows unexpanded keywords | |
1218 | - hg cat shows expanded keywords |
|
1219 | - hg cat shows expanded keywords | |
1219 |
|
1220 | |||
1220 | $ cat a b |
|
1221 | $ cat a b | |
1221 | expand $Id$ |
|
1222 | expand $Id$ | |
1222 | do not process $Id: |
|
1223 | do not process $Id: | |
1223 | xxx $ |
|
1224 | xxx $ | |
1224 | $Xinfo$ |
|
1225 | $Xinfo$ | |
1225 | ignore $Id$ |
|
1226 | ignore $Id$ | |
1226 | $ hg cat sym a b && echo |
|
1227 | $ hg cat sym a b && echo | |
1227 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1228 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1228 | do not process $Id: |
|
1229 | do not process $Id: | |
1229 | xxx $ |
|
1230 | xxx $ | |
1230 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1231 | $Xinfo: User Name <user@example.com>: firstline $ | |
1231 | ignore $Id$ |
|
1232 | ignore $Id$ | |
1232 | a |
|
1233 | a | |
1233 |
|
1234 | |||
1234 | Now disable keyword expansion |
|
1235 | Now disable keyword expansion | |
1235 |
|
1236 | |||
1236 | $ cp $HGRCPATH $HGRCPATH.backup |
|
1237 | $ cp $HGRCPATH $HGRCPATH.backup | |
1237 | $ rm "$HGRCPATH" |
|
1238 | $ rm "$HGRCPATH" | |
1238 | $ cat a b |
|
1239 | $ cat a b | |
1239 | expand $Id$ |
|
1240 | expand $Id$ | |
1240 | do not process $Id: |
|
1241 | do not process $Id: | |
1241 | xxx $ |
|
1242 | xxx $ | |
1242 | $Xinfo$ |
|
1243 | $Xinfo$ | |
1243 | ignore $Id$ |
|
1244 | ignore $Id$ | |
1244 | $ hg cat sym a b && echo |
|
1245 | $ hg cat sym a b && echo | |
1245 | expand $Id$ |
|
1246 | expand $Id$ | |
1246 | do not process $Id: |
|
1247 | do not process $Id: | |
1247 | xxx $ |
|
1248 | xxx $ | |
1248 | $Xinfo$ |
|
1249 | $Xinfo$ | |
1249 | ignore $Id$ |
|
1250 | ignore $Id$ | |
1250 | a |
|
1251 | a | |
1251 |
|
1252 | |||
1252 | enable keyword expansion again |
|
1253 | enable keyword expansion again | |
1253 |
|
1254 | |||
1254 | $ cat $HGRCPATH.backup >> $HGRCPATH |
|
1255 | $ cat $HGRCPATH.backup >> $HGRCPATH | |
1255 |
|
1256 | |||
1256 | Test restricted mode with unshelve |
|
1257 | Test restricted mode with unshelve | |
1257 |
|
1258 | |||
1258 | $ cat <<EOF >> $HGRCPATH |
|
1259 | $ cat <<EOF >> $HGRCPATH | |
1259 | > [extensions] |
|
1260 | > [extensions] | |
1260 | > shelve = |
|
1261 | > shelve = | |
1261 | > EOF |
|
1262 | > EOF | |
1262 |
|
1263 | |||
1263 | $ echo xxxx >> a |
|
1264 | $ echo xxxx >> a | |
1264 | $ hg diff |
|
1265 | $ hg diff | |
1265 | diff -r 800511b3a22d a |
|
1266 | diff -r 800511b3a22d a | |
1266 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1267 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1267 | +++ b/a * (glob) |
|
1268 | +++ b/a * (glob) | |
1268 | @@ -2,3 +2,4 @@ |
|
1269 | @@ -2,3 +2,4 @@ | |
1269 | do not process $Id: |
|
1270 | do not process $Id: | |
1270 | xxx $ |
|
1271 | xxx $ | |
1271 | $Xinfo$ |
|
1272 | $Xinfo$ | |
1272 | +xxxx |
|
1273 | +xxxx | |
1273 | $ hg shelve -q --name tmp |
|
1274 | $ hg shelve -q --name tmp | |
1274 | $ hg shelve --list --patch |
|
1275 | $ hg shelve --list --patch | |
1275 | tmp (*)* changes to: localresolve (glob) |
|
1276 | tmp (*)* changes to: localresolve (glob) | |
1276 |
|
1277 | |||
1277 | diff --git a/a b/a |
|
1278 | diff --git a/a b/a | |
1278 | --- a/a |
|
1279 | --- a/a | |
1279 | +++ b/a |
|
1280 | +++ b/a | |
1280 | @@ -2,3 +2,4 @@ |
|
1281 | @@ -2,3 +2,4 @@ | |
1281 | do not process $Id: |
|
1282 | do not process $Id: | |
1282 | xxx $ |
|
1283 | xxx $ | |
1283 | $Xinfo$ |
|
1284 | $Xinfo$ | |
1284 | +xxxx |
|
1285 | +xxxx | |
1285 |
|
1286 | |||
1286 | $ hg update -q -C 10 |
|
1287 | $ hg update -q -C 10 | |
1287 | $ hg unshelve -q tmp |
|
1288 | $ hg unshelve -q tmp | |
1288 | $ hg diff |
|
1289 | $ hg diff | |
1289 | diff -r 4aa30d025d50 a |
|
1290 | diff -r 4aa30d025d50 a | |
1290 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1291 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1291 | +++ b/a * (glob) |
|
1292 | +++ b/a * (glob) | |
1292 | @@ -3,3 +3,4 @@ |
|
1293 | @@ -3,3 +3,4 @@ | |
1293 | do not process $Id: |
|
1294 | do not process $Id: | |
1294 | xxx $ |
|
1295 | xxx $ | |
1295 | $Xinfo$ |
|
1296 | $Xinfo$ | |
1296 | +xxxx |
|
1297 | +xxxx | |
1297 |
|
1298 | |||
1298 | Test restricted mode with rebase |
|
1299 | Test restricted mode with rebase | |
1299 |
|
1300 | |||
1300 | $ cat <<EOF >> $HGRCPATH |
|
1301 | $ cat <<EOF >> $HGRCPATH | |
1301 | > [extensions] |
|
1302 | > [extensions] | |
1302 | > rebase = |
|
1303 | > rebase = | |
1303 | > EOF |
|
1304 | > EOF | |
1304 |
|
1305 | |||
1305 | $ hg update -q -C 9 |
|
1306 | $ hg update -q -C 9 | |
1306 |
|
1307 | |||
1307 | $ echo xxxx >> a |
|
1308 | $ echo xxxx >> a | |
1308 | $ hg commit -m '#11' |
|
1309 | $ hg commit -m '#11' | |
1309 | $ hg diff -c 11 |
|
1310 | $ hg diff -c 11 | |
1310 | diff -r 800511b3a22d -r b07670694489 a |
|
1311 | diff -r 800511b3a22d -r b07670694489 a | |
1311 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1312 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1312 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1313 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1313 | @@ -2,3 +2,4 @@ |
|
1314 | @@ -2,3 +2,4 @@ | |
1314 | do not process $Id: |
|
1315 | do not process $Id: | |
1315 | xxx $ |
|
1316 | xxx $ | |
1316 | $Xinfo$ |
|
1317 | $Xinfo$ | |
1317 | +xxxx |
|
1318 | +xxxx | |
1318 |
|
1319 | |||
1319 | $ hg diff -c 10 |
|
1320 | $ hg diff -c 10 | |
1320 | diff -r 27d48ee14f67 -r 4aa30d025d50 a |
|
1321 | diff -r 27d48ee14f67 -r 4aa30d025d50 a | |
1321 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1322 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1322 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1323 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1323 | @@ -1,3 +1,4 @@ |
|
1324 | @@ -1,3 +1,4 @@ | |
1324 | +foobranch |
|
1325 | +foobranch | |
1325 | expand $Id$ |
|
1326 | expand $Id$ | |
1326 | do not process $Id: |
|
1327 | do not process $Id: | |
1327 | xxx $ |
|
1328 | xxx $ | |
1328 |
|
1329 | |||
1329 | $ hg rebase -q -s 10 -d 11 --keep |
|
1330 | $ hg rebase -q -s 10 -d 11 --keep | |
1330 | $ hg diff -r 9 -r 12 a |
|
1331 | $ hg diff -r 9 -r 12 a | |
1331 | diff -r 800511b3a22d -r 1939b927726c a |
|
1332 | diff -r 800511b3a22d -r 1939b927726c a | |
1332 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1333 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1333 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1334 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1334 | @@ -1,4 +1,6 @@ |
|
1335 | @@ -1,4 +1,6 @@ | |
1335 | +foobranch |
|
1336 | +foobranch | |
1336 | expand $Id$ |
|
1337 | expand $Id$ | |
1337 | do not process $Id: |
|
1338 | do not process $Id: | |
1338 | xxx $ |
|
1339 | xxx $ | |
1339 | $Xinfo$ |
|
1340 | $Xinfo$ | |
1340 | +xxxx |
|
1341 | +xxxx | |
1341 |
|
1342 | |||
1342 | Test restricted mode with graft |
|
1343 | Test restricted mode with graft | |
1343 |
|
1344 | |||
1344 | $ hg graft -q 10 |
|
1345 | $ hg graft -q 10 | |
1345 | $ hg diff -r 9 -r 13 a |
|
1346 | $ hg diff -r 9 -r 13 a | |
1346 | diff -r 800511b3a22d -r 01a68de1003a a |
|
1347 | diff -r 800511b3a22d -r 01a68de1003a a | |
1347 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1348 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1348 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1349 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1349 | @@ -1,4 +1,6 @@ |
|
1350 | @@ -1,4 +1,6 @@ | |
1350 | +foobranch |
|
1351 | +foobranch | |
1351 | expand $Id$ |
|
1352 | expand $Id$ | |
1352 | do not process $Id: |
|
1353 | do not process $Id: | |
1353 | xxx $ |
|
1354 | xxx $ | |
1354 | $Xinfo$ |
|
1355 | $Xinfo$ | |
1355 | +xxxx |
|
1356 | +xxxx | |
1356 |
|
1357 | |||
1357 | Test restricted mode with backout |
|
1358 | Test restricted mode with backout | |
1358 |
|
1359 | |||
1359 | $ hg backout -q 11 --no-commit |
|
1360 | $ hg backout -q 11 --no-commit | |
1360 | $ hg diff a |
|
1361 | $ hg diff a | |
1361 | diff -r 01a68de1003a a |
|
1362 | diff -r 01a68de1003a a | |
1362 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1363 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1363 | +++ b/a * (glob) |
|
1364 | +++ b/a * (glob) | |
1364 | @@ -3,4 +3,3 @@ |
|
1365 | @@ -3,4 +3,3 @@ | |
1365 | do not process $Id: |
|
1366 | do not process $Id: | |
1366 | xxx $ |
|
1367 | xxx $ | |
1367 | $Xinfo$ |
|
1368 | $Xinfo$ | |
1368 | -xxxx |
|
1369 | -xxxx | |
1369 |
|
1370 | |||
1370 | Test restricted mode with histedit |
|
1371 | Test restricted mode with histedit | |
1371 |
|
1372 | |||
1372 | $ cat <<EOF >> $HGRCPATH |
|
1373 | $ cat <<EOF >> $HGRCPATH | |
1373 | > [extensions] |
|
1374 | > [extensions] | |
1374 | > histedit = |
|
1375 | > histedit = | |
1375 | > EOF |
|
1376 | > EOF | |
1376 |
|
1377 | |||
1377 | $ hg commit -m 'backout #11' |
|
1378 | $ hg commit -m 'backout #11' | |
1378 | $ hg histedit -q --command - 13 <<EOF |
|
1379 | $ hg histedit -q --command - 13 <<EOF | |
1379 | > pick 49f5f2d940c3 14 backout #11 |
|
1380 | > pick 49f5f2d940c3 14 backout #11 | |
1380 | > pick 01a68de1003a 13 9foobranch |
|
1381 | > pick 01a68de1003a 13 9foobranch | |
1381 | > EOF |
|
1382 | > EOF | |
1382 |
|
1383 | |||
1383 | Test restricted mode with fetch (with merge) |
|
1384 | Test restricted mode with fetch (with merge) | |
1384 |
|
1385 | |||
1385 | $ cat <<EOF >> $HGRCPATH |
|
1386 | $ cat <<EOF >> $HGRCPATH | |
1386 | > [extensions] |
|
1387 | > [extensions] | |
1387 | > fetch = |
|
1388 | > fetch = | |
1388 | > EOF |
|
1389 | > EOF | |
1389 |
|
1390 | |||
1390 | $ hg clone -q -r 9 . ../fetch-merge |
|
1391 | $ hg clone -q -r 9 . ../fetch-merge | |
1391 | $ cd ../fetch-merge |
|
1392 | $ cd ../fetch-merge | |
1392 | $ hg -R ../Test export 10 | hg import -q - |
|
1393 | $ hg -R ../Test export 10 | hg import -q - | |
1393 | $ hg fetch -q -r 11 |
|
1394 | $ hg fetch -q -r 11 | |
1394 | $ hg diff -r 9 a |
|
1395 | $ hg diff -r 9 a | |
1395 | diff -r 800511b3a22d a |
|
1396 | diff -r 800511b3a22d a | |
1396 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1397 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1397 | +++ b/a * (glob) |
|
1398 | +++ b/a * (glob) | |
1398 | @@ -1,4 +1,6 @@ |
|
1399 | @@ -1,4 +1,6 @@ | |
1399 | +foobranch |
|
1400 | +foobranch | |
1400 | expand $Id$ |
|
1401 | expand $Id$ | |
1401 | do not process $Id: |
|
1402 | do not process $Id: | |
1402 | xxx $ |
|
1403 | xxx $ | |
1403 | $Xinfo$ |
|
1404 | $Xinfo$ | |
1404 | +xxxx |
|
1405 | +xxxx | |
1405 |
|
1406 | |||
1406 | Test that patch.diff(), which is implied by "hg diff" or so, doesn't |
|
1407 | Test that patch.diff(), which is implied by "hg diff" or so, doesn't | |
1407 | suppress expanding keywords at subsequent commands |
|
1408 | suppress expanding keywords at subsequent commands | |
1408 |
|
1409 | |||
1409 | #if windows |
|
1410 | #if windows | |
1410 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" |
|
1411 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" | |
1411 | #else |
|
1412 | #else | |
1412 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" |
|
1413 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" | |
1413 | #endif |
|
1414 | #endif | |
1414 | $ export PYTHONPATH |
|
1415 | $ export PYTHONPATH | |
1415 |
|
1416 | |||
1416 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new |
|
1417 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new | |
1417 | $ mv $HGRCPATH.new $HGRCPATH |
|
1418 | $ mv $HGRCPATH.new $HGRCPATH | |
1418 |
|
1419 | |||
1419 | >>> from __future__ import print_function |
|
1420 | >>> from __future__ import print_function | |
1420 | >>> from hgclient import check, readchannel, runcommand |
|
1421 | >>> from hgclient import check, readchannel, runcommand | |
1421 | >>> @check |
|
1422 | >>> @check | |
1422 | ... def check(server): |
|
1423 | ... def check(server): | |
1423 | ... # hello block |
|
1424 | ... # hello block | |
1424 | ... readchannel(server) |
|
1425 | ... readchannel(server) | |
1425 | ... |
|
1426 | ... | |
1426 | ... runcommand(server, ['cat', 'm']) |
|
1427 | ... runcommand(server, ['cat', 'm']) | |
1427 | ... runcommand(server, ['diff', '-c', '.', 'm']) |
|
1428 | ... runcommand(server, ['diff', '-c', '.', 'm']) | |
1428 | ... runcommand(server, ['cat', 'm']) |
|
1429 | ... runcommand(server, ['cat', 'm']) | |
1429 | *** runcommand cat m |
|
1430 | *** runcommand cat m | |
1430 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1431 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1431 | bar |
|
1432 | bar | |
1432 | *** runcommand diff -c . m |
|
1433 | *** runcommand diff -c . m | |
1433 | *** runcommand cat m |
|
1434 | *** runcommand cat m | |
1434 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1435 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1435 | bar |
|
1436 | bar | |
1436 |
|
1437 | |||
1437 | $ cd .. |
|
1438 | $ cd .. | |
1438 |
|
1439 | |||
1439 | #if serve |
|
1440 | #if serve | |
1440 |
|
1441 | |||
1441 | Test that keywords are expanded only in repositories, which enable |
|
1442 | Test that keywords are expanded only in repositories, which enable | |
1442 | keyword extension, even if multiple repositories are served in a |
|
1443 | keyword extension, even if multiple repositories are served in a | |
1443 | process |
|
1444 | process | |
1444 |
|
1445 | |||
1445 | $ cat >> fetch-merge/.hg/hgrc <<EOF |
|
1446 | $ cat >> fetch-merge/.hg/hgrc <<EOF | |
1446 | > [extensions] |
|
1447 | > [extensions] | |
1447 | > keyword = ! |
|
1448 | > keyword = ! | |
1448 | > EOF |
|
1449 | > EOF | |
1449 |
|
1450 | |||
1450 | $ cat > paths.conf <<EOF |
|
1451 | $ cat > paths.conf <<EOF | |
1451 | > [paths] |
|
1452 | > [paths] | |
1452 | > enabled=Test |
|
1453 | > enabled=Test | |
1453 | > disabled=fetch-merge |
|
1454 | > disabled=fetch-merge | |
1454 | > EOF |
|
1455 | > EOF | |
1455 |
|
1456 | |||
1456 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log --webdir-conf paths.conf |
|
1457 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log --webdir-conf paths.conf | |
1457 | $ cat hg.pid >> $DAEMON_PIDS |
|
1458 | $ cat hg.pid >> $DAEMON_PIDS | |
1458 |
|
1459 | |||
1459 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' |
|
1460 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' | |
1460 | 200 Script output follows |
|
1461 | 200 Script output follows | |
1461 |
|
1462 | |||
1462 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1463 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1463 | bar |
|
1464 | bar | |
1464 |
|
1465 | |||
1465 | $ get-with-headers.py localhost:$HGPORT 'disabled/file/tip/m/?style=raw' |
|
1466 | $ get-with-headers.py localhost:$HGPORT 'disabled/file/tip/m/?style=raw' | |
1466 | 200 Script output follows |
|
1467 | 200 Script output follows | |
1467 |
|
1468 | |||
1468 | $Id$ |
|
1469 | $Id$ | |
1469 | bar |
|
1470 | bar | |
1470 |
|
1471 | |||
1471 | (check expansion again, for safety) |
|
1472 | (check expansion again, for safety) | |
1472 |
|
1473 | |||
1473 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' |
|
1474 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' | |
1474 | 200 Script output follows |
|
1475 | 200 Script output follows | |
1475 |
|
1476 | |||
1476 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1477 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1477 | bar |
|
1478 | bar | |
1478 |
|
1479 | |||
1479 | $ killdaemons.py |
|
1480 | $ killdaemons.py | |
1480 | #endif |
|
1481 | #endif |
@@ -1,426 +1,432 b'' | |||||
1 | #require no-chg |
|
1 | #require no-chg | |
2 |
|
2 | |||
3 | #testcases bundle1 bundle2 |
|
3 | #testcases bundle1 bundle2 | |
4 |
|
4 | |||
5 | #if bundle1 |
|
5 | #if bundle1 | |
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
9 | > legacy.exchange = bundle1 |
|
9 | > legacy.exchange = bundle1 | |
10 | > EOF |
|
10 | > EOF | |
11 | #endif |
|
11 | #endif | |
12 |
|
12 | |||
13 | $ hg init test |
|
13 | $ hg init test | |
14 | $ cd test |
|
14 | $ cd test | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg ci -Ama |
|
16 | $ hg ci -Ama | |
17 | adding a |
|
17 | adding a | |
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ hg clone test test2 |
|
19 | $ hg clone test test2 | |
20 | updating to branch default |
|
20 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ cd test2 |
|
22 | $ cd test2 | |
23 | $ echo a >> a |
|
23 | $ echo a >> a | |
24 | $ hg ci -mb |
|
24 | $ hg ci -mb | |
25 | $ req() { |
|
25 | $ req() { | |
26 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
26 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
27 | > cat hg.pid >> $DAEMON_PIDS |
|
27 | > cat hg.pid >> $DAEMON_PIDS | |
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
29 | > exitstatus=$? |
|
29 | > exitstatus=$? | |
30 | > killdaemons.py |
|
30 | > killdaemons.py | |
31 | > echo % serve errors |
|
31 | > echo % serve errors | |
32 | > cat errors.log |
|
32 | > cat errors.log | |
33 | > return $exitstatus |
|
33 | > return $exitstatus | |
34 | > } |
|
34 | > } | |
35 | $ cd ../test |
|
35 | $ cd ../test | |
36 |
|
36 | |||
37 | expect ssl error |
|
37 | expect ssl error | |
38 |
|
38 | |||
39 | $ req |
|
39 | $ req | |
40 | pushing to http://localhost:$HGPORT/ |
|
40 | pushing to http://localhost:$HGPORT/ | |
41 | searching for changes |
|
41 | searching for changes | |
42 | abort: HTTP Error 403: ssl required |
|
42 | abort: HTTP Error 403: ssl required | |
43 | % serve errors |
|
43 | % serve errors | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | expect authorization error |
|
46 | expect authorization error | |
47 |
|
47 | |||
48 | $ echo '[web]' > .hg/hgrc |
|
48 | $ echo '[web]' > .hg/hgrc | |
49 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
49 | $ echo 'push_ssl = false' >> .hg/hgrc | |
50 | $ req |
|
50 | $ req | |
51 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
52 | searching for changes |
|
52 | searching for changes | |
53 | abort: authorization failed |
|
53 | abort: authorization failed | |
54 | % serve errors |
|
54 | % serve errors | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | expect authorization error: must have authorized user |
|
57 | expect authorization error: must have authorized user | |
58 |
|
58 | |||
59 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
59 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
60 | $ req |
|
60 | $ req | |
61 | pushing to http://localhost:$HGPORT/ |
|
61 | pushing to http://localhost:$HGPORT/ | |
62 | searching for changes |
|
62 | searching for changes | |
63 | abort: authorization failed |
|
63 | abort: authorization failed | |
64 | % serve errors |
|
64 | % serve errors | |
65 | [255] |
|
65 | [255] | |
66 |
|
66 | |||
67 | expect success |
|
67 | expect success | |
68 |
|
68 | |||
69 | $ cat > $TESTTMP/hook.sh <<'EOF' |
|
69 | $ cat > $TESTTMP/hook.sh <<'EOF' | |
70 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" |
|
70 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" | |
71 | > EOF |
|
71 | > EOF | |
72 |
|
72 | |||
73 | #if bundle1 |
|
73 | #if bundle1 | |
74 | $ cat >> .hg/hgrc <<EOF |
|
74 | $ cat >> .hg/hgrc <<EOF | |
75 | > allow_push = * |
|
75 | > allow_push = * | |
76 | > [hooks] |
|
76 | > [hooks] | |
77 | > changegroup = sh -c "printenv.py changegroup 0" |
|
77 | > changegroup = sh -c "printenv.py changegroup 0" | |
78 | > pushkey = sh -c "printenv.py pushkey 0" |
|
78 | > pushkey = sh -c "printenv.py pushkey 0" | |
79 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
79 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
80 | > EOF |
|
80 | > EOF | |
81 | $ req "--debug --config extensions.blackbox=" |
|
81 | $ req "--debug --config extensions.blackbox=" | |
82 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) |
|
82 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
83 | pushing to http://localhost:$HGPORT/ |
|
83 | pushing to http://localhost:$HGPORT/ | |
84 | searching for changes |
|
84 | searching for changes | |
85 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) |
|
85 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) | |
86 | remote: adding changesets |
|
86 | remote: adding changesets | |
87 | remote: add changeset ba677d0156c1 |
|
87 | remote: add changeset ba677d0156c1 | |
88 | remote: adding manifests |
|
88 | remote: adding manifests | |
89 | remote: adding file changes |
|
89 | remote: adding file changes | |
90 | remote: adding a revisions |
|
90 | remote: adding a revisions | |
91 | remote: added 1 changesets with 1 changes to 1 files |
|
91 | remote: added 1 changesets with 1 changes to 1 files | |
92 | remote: updating the branch cache |
|
92 | remote: updating the branch cache | |
|
93 | remote: converting hook "txnclose-phase.test" to native (windows !) | |||
93 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
94 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
94 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
95 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
|
96 | remote: converting hook "txnclose-phase.test" to native (windows !) | |||
95 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
97 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
96 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
98 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
|
99 | remote: converting hook "changegroup" to native (windows !) | |||
97 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
100 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
98 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
101 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
99 | % serve errors |
|
102 | % serve errors | |
100 | $ hg rollback |
|
103 | $ hg rollback | |
101 | repository tip rolled back to revision 0 (undo serve) |
|
104 | repository tip rolled back to revision 0 (undo serve) | |
102 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" |
|
105 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" | |
103 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) |
|
106 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
104 | pushing to http://localhost:$HGPORT/ |
|
107 | pushing to http://localhost:$HGPORT/ | |
105 | searching for changes |
|
108 | searching for changes | |
106 | remote: adding changesets |
|
109 | remote: adding changesets | |
107 | remote: add changeset ba677d0156c1 |
|
110 | remote: add changeset ba677d0156c1 | |
108 | remote: adding manifests |
|
111 | remote: adding manifests | |
109 | remote: adding file changes |
|
112 | remote: adding file changes | |
110 | remote: adding a revisions |
|
113 | remote: adding a revisions | |
111 | remote: added 1 changesets with 1 changes to 1 files |
|
114 | remote: added 1 changesets with 1 changes to 1 files | |
112 | remote: updating the branch cache |
|
115 | remote: updating the branch cache | |
|
116 | remote: converting hook "txnclose-phase.test" to native (windows !) | |||
113 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
117 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
114 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
118 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
|
119 | remote: converting hook "txnclose-phase.test" to native (windows !) | |||
115 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
120 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
116 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
121 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
|
122 | remote: converting hook "changegroup" to native (windows !) | |||
117 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
123 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
118 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
124 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
119 | % serve errors |
|
125 | % serve errors | |
120 | $ hg rollback |
|
126 | $ hg rollback | |
121 | repository tip rolled back to revision 0 (undo serve) |
|
127 | repository tip rolled back to revision 0 (undo serve) | |
122 | #endif |
|
128 | #endif | |
123 |
|
129 | |||
124 | #if bundle2 |
|
130 | #if bundle2 | |
125 | $ cat >> .hg/hgrc <<EOF |
|
131 | $ cat >> .hg/hgrc <<EOF | |
126 | > allow_push = * |
|
132 | > allow_push = * | |
127 | > [hooks] |
|
133 | > [hooks] | |
128 | > changegroup = sh -c "printenv.py changegroup 0" |
|
134 | > changegroup = sh -c "printenv.py changegroup 0" | |
129 | > pushkey = sh -c "printenv.py pushkey 0" |
|
135 | > pushkey = sh -c "printenv.py pushkey 0" | |
130 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
136 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
131 | > EOF |
|
137 | > EOF | |
132 | $ req |
|
138 | $ req | |
133 | pushing to http://localhost:$HGPORT/ |
|
139 | pushing to http://localhost:$HGPORT/ | |
134 | searching for changes |
|
140 | searching for changes | |
135 | remote: adding changesets |
|
141 | remote: adding changesets | |
136 | remote: adding manifests |
|
142 | remote: adding manifests | |
137 | remote: adding file changes |
|
143 | remote: adding file changes | |
138 | remote: added 1 changesets with 1 changes to 1 files |
|
144 | remote: added 1 changesets with 1 changes to 1 files | |
139 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
145 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
140 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
146 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
141 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
147 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
142 | % serve errors |
|
148 | % serve errors | |
143 | $ hg rollback |
|
149 | $ hg rollback | |
144 | repository tip rolled back to revision 0 (undo serve) |
|
150 | repository tip rolled back to revision 0 (undo serve) | |
145 | #endif |
|
151 | #endif | |
146 |
|
152 | |||
147 | expect success, server lacks the httpheader capability |
|
153 | expect success, server lacks the httpheader capability | |
148 |
|
154 | |||
149 | $ CAP=httpheader |
|
155 | $ CAP=httpheader | |
150 | $ . "$TESTDIR/notcapable" |
|
156 | $ . "$TESTDIR/notcapable" | |
151 | $ req |
|
157 | $ req | |
152 | pushing to http://localhost:$HGPORT/ |
|
158 | pushing to http://localhost:$HGPORT/ | |
153 | searching for changes |
|
159 | searching for changes | |
154 | remote: adding changesets |
|
160 | remote: adding changesets | |
155 | remote: adding manifests |
|
161 | remote: adding manifests | |
156 | remote: adding file changes |
|
162 | remote: adding file changes | |
157 | remote: added 1 changesets with 1 changes to 1 files |
|
163 | remote: added 1 changesets with 1 changes to 1 files | |
158 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
164 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
159 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
165 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
160 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
166 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
161 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
167 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
162 | % serve errors |
|
168 | % serve errors | |
163 | $ hg rollback |
|
169 | $ hg rollback | |
164 | repository tip rolled back to revision 0 (undo serve) |
|
170 | repository tip rolled back to revision 0 (undo serve) | |
165 |
|
171 | |||
166 | expect success, server lacks the unbundlehash capability |
|
172 | expect success, server lacks the unbundlehash capability | |
167 |
|
173 | |||
168 | $ CAP=unbundlehash |
|
174 | $ CAP=unbundlehash | |
169 | $ . "$TESTDIR/notcapable" |
|
175 | $ . "$TESTDIR/notcapable" | |
170 | $ req |
|
176 | $ req | |
171 | pushing to http://localhost:$HGPORT/ |
|
177 | pushing to http://localhost:$HGPORT/ | |
172 | searching for changes |
|
178 | searching for changes | |
173 | remote: adding changesets |
|
179 | remote: adding changesets | |
174 | remote: adding manifests |
|
180 | remote: adding manifests | |
175 | remote: adding file changes |
|
181 | remote: adding file changes | |
176 | remote: added 1 changesets with 1 changes to 1 files |
|
182 | remote: added 1 changesets with 1 changes to 1 files | |
177 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
183 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
178 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
184 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
179 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
185 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
180 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
186 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
181 | % serve errors |
|
187 | % serve errors | |
182 | $ hg rollback |
|
188 | $ hg rollback | |
183 | repository tip rolled back to revision 0 (undo serve) |
|
189 | repository tip rolled back to revision 0 (undo serve) | |
184 |
|
190 | |||
185 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but |
|
191 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but | |
186 | has no parameter |
|
192 | has no parameter | |
187 |
|
193 | |||
188 | $ cat <<EOF > notcapable-unbundleparam.py |
|
194 | $ cat <<EOF > notcapable-unbundleparam.py | |
189 | > from mercurial import extensions, httppeer |
|
195 | > from mercurial import extensions, httppeer | |
190 | > def capable(orig, self, name): |
|
196 | > def capable(orig, self, name): | |
191 | > if name == 'unbundle': |
|
197 | > if name == 'unbundle': | |
192 | > return True |
|
198 | > return True | |
193 | > return orig(self, name) |
|
199 | > return orig(self, name) | |
194 | > def uisetup(ui): |
|
200 | > def uisetup(ui): | |
195 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) |
|
201 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) | |
196 | > EOF |
|
202 | > EOF | |
197 | $ cp $HGRCPATH $HGRCPATH.orig |
|
203 | $ cp $HGRCPATH $HGRCPATH.orig | |
198 | $ cat <<EOF >> $HGRCPATH |
|
204 | $ cat <<EOF >> $HGRCPATH | |
199 | > [extensions] |
|
205 | > [extensions] | |
200 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py |
|
206 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py | |
201 | > EOF |
|
207 | > EOF | |
202 | $ req |
|
208 | $ req | |
203 | pushing to http://localhost:$HGPORT/ |
|
209 | pushing to http://localhost:$HGPORT/ | |
204 | searching for changes |
|
210 | searching for changes | |
205 | remote: adding changesets |
|
211 | remote: adding changesets | |
206 | remote: adding manifests |
|
212 | remote: adding manifests | |
207 | remote: adding file changes |
|
213 | remote: adding file changes | |
208 | remote: added 1 changesets with 1 changes to 1 files |
|
214 | remote: added 1 changesets with 1 changes to 1 files | |
209 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
215 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
210 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
216 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
211 | remote: changegroup hook: * (glob) |
|
217 | remote: changegroup hook: * (glob) | |
212 | % serve errors |
|
218 | % serve errors | |
213 | $ hg rollback |
|
219 | $ hg rollback | |
214 | repository tip rolled back to revision 0 (undo serve) |
|
220 | repository tip rolled back to revision 0 (undo serve) | |
215 | $ mv $HGRCPATH.orig $HGRCPATH |
|
221 | $ mv $HGRCPATH.orig $HGRCPATH | |
216 |
|
222 | |||
217 | Test pushing to a publishing repository with a failing prepushkey hook |
|
223 | Test pushing to a publishing repository with a failing prepushkey hook | |
218 |
|
224 | |||
219 | $ cat > .hg/hgrc <<EOF |
|
225 | $ cat > .hg/hgrc <<EOF | |
220 | > [web] |
|
226 | > [web] | |
221 | > push_ssl = false |
|
227 | > push_ssl = false | |
222 | > allow_push = * |
|
228 | > allow_push = * | |
223 | > [hooks] |
|
229 | > [hooks] | |
224 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
230 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
225 | > [devel] |
|
231 | > [devel] | |
226 | > legacy.exchange=phases |
|
232 | > legacy.exchange=phases | |
227 | > EOF |
|
233 | > EOF | |
228 |
|
234 | |||
229 | #if bundle1 |
|
235 | #if bundle1 | |
230 | Bundle1 works because a) phases are updated as part of changegroup application |
|
236 | Bundle1 works because a) phases are updated as part of changegroup application | |
231 | and b) client checks phases after the "unbundle" command. Since it sees no |
|
237 | and b) client checks phases after the "unbundle" command. Since it sees no | |
232 | phase changes are necessary, it doesn't send the "pushkey" command and the |
|
238 | phase changes are necessary, it doesn't send the "pushkey" command and the | |
233 | prepushkey hook never has to fire. |
|
239 | prepushkey hook never has to fire. | |
234 |
|
240 | |||
235 | $ req |
|
241 | $ req | |
236 | pushing to http://localhost:$HGPORT/ |
|
242 | pushing to http://localhost:$HGPORT/ | |
237 | searching for changes |
|
243 | searching for changes | |
238 | remote: adding changesets |
|
244 | remote: adding changesets | |
239 | remote: adding manifests |
|
245 | remote: adding manifests | |
240 | remote: adding file changes |
|
246 | remote: adding file changes | |
241 | remote: added 1 changesets with 1 changes to 1 files |
|
247 | remote: added 1 changesets with 1 changes to 1 files | |
242 | % serve errors |
|
248 | % serve errors | |
243 |
|
249 | |||
244 | #endif |
|
250 | #endif | |
245 |
|
251 | |||
246 | #if bundle2 |
|
252 | #if bundle2 | |
247 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction |
|
253 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction | |
248 | and fails the entire push. |
|
254 | and fails the entire push. | |
249 | $ req |
|
255 | $ req | |
250 | pushing to http://localhost:$HGPORT/ |
|
256 | pushing to http://localhost:$HGPORT/ | |
251 | searching for changes |
|
257 | searching for changes | |
252 | remote: adding changesets |
|
258 | remote: adding changesets | |
253 | remote: adding manifests |
|
259 | remote: adding manifests | |
254 | remote: adding file changes |
|
260 | remote: adding file changes | |
255 | remote: added 1 changesets with 1 changes to 1 files |
|
261 | remote: added 1 changesets with 1 changes to 1 files | |
256 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
262 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
257 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
263 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
258 | remote: transaction abort! |
|
264 | remote: transaction abort! | |
259 | remote: rollback completed |
|
265 | remote: rollback completed | |
260 | abort: updating ba677d0156c1 to public failed |
|
266 | abort: updating ba677d0156c1 to public failed | |
261 | % serve errors |
|
267 | % serve errors | |
262 | [255] |
|
268 | [255] | |
263 |
|
269 | |||
264 | #endif |
|
270 | #endif | |
265 |
|
271 | |||
266 | Now remove the failing prepushkey hook. |
|
272 | Now remove the failing prepushkey hook. | |
267 |
|
273 | |||
268 | $ cat >> .hg/hgrc <<EOF |
|
274 | $ cat >> .hg/hgrc <<EOF | |
269 | > [hooks] |
|
275 | > [hooks] | |
270 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
276 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
271 | > EOF |
|
277 | > EOF | |
272 |
|
278 | |||
273 | We don't need to test bundle1 because it succeeded above. |
|
279 | We don't need to test bundle1 because it succeeded above. | |
274 |
|
280 | |||
275 | #if bundle2 |
|
281 | #if bundle2 | |
276 | $ req |
|
282 | $ req | |
277 | pushing to http://localhost:$HGPORT/ |
|
283 | pushing to http://localhost:$HGPORT/ | |
278 | searching for changes |
|
284 | searching for changes | |
279 | remote: adding changesets |
|
285 | remote: adding changesets | |
280 | remote: adding manifests |
|
286 | remote: adding manifests | |
281 | remote: adding file changes |
|
287 | remote: adding file changes | |
282 | remote: added 1 changesets with 1 changes to 1 files |
|
288 | remote: added 1 changesets with 1 changes to 1 files | |
283 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
289 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
284 | % serve errors |
|
290 | % serve errors | |
285 | #endif |
|
291 | #endif | |
286 |
|
292 | |||
287 | $ hg --config extensions.strip= strip -r 1: |
|
293 | $ hg --config extensions.strip= strip -r 1: | |
288 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
294 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
289 |
|
295 | |||
290 | Now do a variant of the above, except on a non-publishing repository |
|
296 | Now do a variant of the above, except on a non-publishing repository | |
291 |
|
297 | |||
292 | $ cat >> .hg/hgrc <<EOF |
|
298 | $ cat >> .hg/hgrc <<EOF | |
293 | > [phases] |
|
299 | > [phases] | |
294 | > publish = false |
|
300 | > publish = false | |
295 | > [hooks] |
|
301 | > [hooks] | |
296 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
302 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
297 | > EOF |
|
303 | > EOF | |
298 |
|
304 | |||
299 | #if bundle1 |
|
305 | #if bundle1 | |
300 | $ req |
|
306 | $ req | |
301 | pushing to http://localhost:$HGPORT/ |
|
307 | pushing to http://localhost:$HGPORT/ | |
302 | searching for changes |
|
308 | searching for changes | |
303 | remote: adding changesets |
|
309 | remote: adding changesets | |
304 | remote: adding manifests |
|
310 | remote: adding manifests | |
305 | remote: adding file changes |
|
311 | remote: adding file changes | |
306 | remote: added 1 changesets with 1 changes to 1 files |
|
312 | remote: added 1 changesets with 1 changes to 1 files | |
307 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
313 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
308 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
314 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
309 | updating ba677d0156c1 to public failed! |
|
315 | updating ba677d0156c1 to public failed! | |
310 | % serve errors |
|
316 | % serve errors | |
311 | #endif |
|
317 | #endif | |
312 |
|
318 | |||
313 | #if bundle2 |
|
319 | #if bundle2 | |
314 | $ req |
|
320 | $ req | |
315 | pushing to http://localhost:$HGPORT/ |
|
321 | pushing to http://localhost:$HGPORT/ | |
316 | searching for changes |
|
322 | searching for changes | |
317 | remote: adding changesets |
|
323 | remote: adding changesets | |
318 | remote: adding manifests |
|
324 | remote: adding manifests | |
319 | remote: adding file changes |
|
325 | remote: adding file changes | |
320 | remote: added 1 changesets with 1 changes to 1 files |
|
326 | remote: added 1 changesets with 1 changes to 1 files | |
321 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
327 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
322 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
328 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
323 | remote: transaction abort! |
|
329 | remote: transaction abort! | |
324 | remote: rollback completed |
|
330 | remote: rollback completed | |
325 | abort: updating ba677d0156c1 to public failed |
|
331 | abort: updating ba677d0156c1 to public failed | |
326 | % serve errors |
|
332 | % serve errors | |
327 | [255] |
|
333 | [255] | |
328 | #endif |
|
334 | #endif | |
329 |
|
335 | |||
330 | Make phases updates work |
|
336 | Make phases updates work | |
331 |
|
337 | |||
332 | $ cat >> .hg/hgrc <<EOF |
|
338 | $ cat >> .hg/hgrc <<EOF | |
333 | > [hooks] |
|
339 | > [hooks] | |
334 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
340 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
335 | > EOF |
|
341 | > EOF | |
336 |
|
342 | |||
337 | #if bundle1 |
|
343 | #if bundle1 | |
338 | $ req |
|
344 | $ req | |
339 | pushing to http://localhost:$HGPORT/ |
|
345 | pushing to http://localhost:$HGPORT/ | |
340 | searching for changes |
|
346 | searching for changes | |
341 | no changes found |
|
347 | no changes found | |
342 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
348 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
343 | % serve errors |
|
349 | % serve errors | |
344 | [1] |
|
350 | [1] | |
345 | #endif |
|
351 | #endif | |
346 |
|
352 | |||
347 | #if bundle2 |
|
353 | #if bundle2 | |
348 | $ req |
|
354 | $ req | |
349 | pushing to http://localhost:$HGPORT/ |
|
355 | pushing to http://localhost:$HGPORT/ | |
350 | searching for changes |
|
356 | searching for changes | |
351 | remote: adding changesets |
|
357 | remote: adding changesets | |
352 | remote: adding manifests |
|
358 | remote: adding manifests | |
353 | remote: adding file changes |
|
359 | remote: adding file changes | |
354 | remote: added 1 changesets with 1 changes to 1 files |
|
360 | remote: added 1 changesets with 1 changes to 1 files | |
355 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
361 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
356 | % serve errors |
|
362 | % serve errors | |
357 | #endif |
|
363 | #endif | |
358 |
|
364 | |||
359 | $ hg --config extensions.strip= strip -r 1: |
|
365 | $ hg --config extensions.strip= strip -r 1: | |
360 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
366 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
361 |
|
367 | |||
362 | #if bundle2 |
|
368 | #if bundle2 | |
363 |
|
369 | |||
364 | $ cat > .hg/hgrc <<EOF |
|
370 | $ cat > .hg/hgrc <<EOF | |
365 | > [web] |
|
371 | > [web] | |
366 | > push_ssl = false |
|
372 | > push_ssl = false | |
367 | > allow_push = * |
|
373 | > allow_push = * | |
368 | > [experimental] |
|
374 | > [experimental] | |
369 | > httppostargs=true |
|
375 | > httppostargs=true | |
370 | > EOF |
|
376 | > EOF | |
371 | $ req |
|
377 | $ req | |
372 | pushing to http://localhost:$HGPORT/ |
|
378 | pushing to http://localhost:$HGPORT/ | |
373 | searching for changes |
|
379 | searching for changes | |
374 | remote: adding changesets |
|
380 | remote: adding changesets | |
375 | remote: adding manifests |
|
381 | remote: adding manifests | |
376 | remote: adding file changes |
|
382 | remote: adding file changes | |
377 | remote: added 1 changesets with 1 changes to 1 files |
|
383 | remote: added 1 changesets with 1 changes to 1 files | |
378 | % serve errors |
|
384 | % serve errors | |
379 |
|
385 | |||
380 | #endif |
|
386 | #endif | |
381 |
|
387 | |||
382 | $ cd .. |
|
388 | $ cd .. | |
383 |
|
389 | |||
384 | Pushing via hgwebdir works |
|
390 | Pushing via hgwebdir works | |
385 |
|
391 | |||
386 | $ hg init hgwebdir |
|
392 | $ hg init hgwebdir | |
387 | $ cd hgwebdir |
|
393 | $ cd hgwebdir | |
388 | $ echo 0 > a |
|
394 | $ echo 0 > a | |
389 | $ hg -q commit -A -m initial |
|
395 | $ hg -q commit -A -m initial | |
390 | $ cd .. |
|
396 | $ cd .. | |
391 |
|
397 | |||
392 | $ cat > web.conf << EOF |
|
398 | $ cat > web.conf << EOF | |
393 | > [paths] |
|
399 | > [paths] | |
394 | > / = * |
|
400 | > / = * | |
395 | > [web] |
|
401 | > [web] | |
396 | > push_ssl = false |
|
402 | > push_ssl = false | |
397 | > allow_push = * |
|
403 | > allow_push = * | |
398 | > EOF |
|
404 | > EOF | |
399 |
|
405 | |||
400 | $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid |
|
406 | $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid | |
401 | $ cat hg.pid >> $DAEMON_PIDS |
|
407 | $ cat hg.pid >> $DAEMON_PIDS | |
402 |
|
408 | |||
403 | $ hg clone http://localhost:$HGPORT/hgwebdir hgwebdir-local |
|
409 | $ hg clone http://localhost:$HGPORT/hgwebdir hgwebdir-local | |
404 | requesting all changes |
|
410 | requesting all changes | |
405 | adding changesets |
|
411 | adding changesets | |
406 | adding manifests |
|
412 | adding manifests | |
407 | adding file changes |
|
413 | adding file changes | |
408 | added 1 changesets with 1 changes to 1 files |
|
414 | added 1 changesets with 1 changes to 1 files | |
409 | new changesets 98a3f8f02ba7 |
|
415 | new changesets 98a3f8f02ba7 | |
410 | updating to branch default |
|
416 | updating to branch default | |
411 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
417 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
412 | $ cd hgwebdir-local |
|
418 | $ cd hgwebdir-local | |
413 | $ echo commit > a |
|
419 | $ echo commit > a | |
414 | $ hg commit -m 'local commit' |
|
420 | $ hg commit -m 'local commit' | |
415 |
|
421 | |||
416 | $ hg push |
|
422 | $ hg push | |
417 | pushing to http://localhost:$HGPORT/hgwebdir |
|
423 | pushing to http://localhost:$HGPORT/hgwebdir | |
418 | searching for changes |
|
424 | searching for changes | |
419 | remote: adding changesets |
|
425 | remote: adding changesets | |
420 | remote: adding manifests |
|
426 | remote: adding manifests | |
421 | remote: adding file changes |
|
427 | remote: adding file changes | |
422 | remote: added 1 changesets with 1 changes to 1 files |
|
428 | remote: added 1 changesets with 1 changes to 1 files | |
423 |
|
429 | |||
424 | $ killdaemons.py |
|
430 | $ killdaemons.py | |
425 |
|
431 | |||
426 | $ cd .. |
|
432 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now