| 1 |
.\" Man page generated from reStructuredText. |
| 2 |
. |
| 3 |
.TH HG 1 "" "" "Mercurial Manual" |
| 4 |
.SH NAME |
| 5 |
hg \- Mercurial source code management system |
| 6 |
. |
| 7 |
.nr rst2man-indent-level 0 |
| 8 |
. |
| 9 |
.de1 rstReportMargin |
| 10 |
\\$1 \\n[an-margin] |
| 11 |
level \\n[rst2man-indent-level] |
| 12 |
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 13 |
- |
| 14 |
\\n[rst2man-indent0] |
| 15 |
\\n[rst2man-indent1] |
| 16 |
\\n[rst2man-indent2] |
| 17 |
.. |
| 18 |
.de1 INDENT |
| 19 |
.\" .rstReportMargin pre: |
| 20 |
. RS \\$1 |
| 21 |
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 22 |
. nr rst2man-indent-level +1 |
| 23 |
.\" .rstReportMargin post: |
| 24 |
.. |
| 25 |
.de UNINDENT |
| 26 |
. RE |
| 27 |
.\" indent \\n[an-margin] |
| 28 |
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 29 |
.nr rst2man-indent-level -1 |
| 30 |
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 31 |
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 32 |
.. |
| 33 |
.SH SYNOPSIS |
| 34 |
.sp |
| 35 |
\fBhg\fP \fIcommand\fP [\fIoption\fP]... [\fIargument\fP]... |
| 36 |
.SH DESCRIPTION |
| 37 |
.sp |
| 38 |
The \fBhg\fP command provides a command line interface to the Mercurial |
| 39 |
system. |
| 40 |
.SH COMMAND ELEMENTS |
| 41 |
.INDENT 0.0 |
| 42 |
.TP |
| 43 |
.B files... |
| 44 |
. |
| 45 |
indicates one or more filename or relative path filenames; see |
| 46 |
\%File Name Patterns\: for information on pattern matching |
| 47 |
.TP |
| 48 |
.B path |
| 49 |
. |
| 50 |
indicates a path on the local machine |
| 51 |
.TP |
| 52 |
.B revision |
| 53 |
. |
| 54 |
indicates a changeset which can be specified as a changeset |
| 55 |
revision number, a tag, or a unique substring of the changeset |
| 56 |
hash value |
| 57 |
.TP |
| 58 |
.B repository path |
| 59 |
. |
| 60 |
either the pathname of a local repository or the URI of a remote |
| 61 |
repository. |
| 62 |
.UNINDENT |
| 63 |
.SH OPTIONS |
| 64 |
.INDENT 0.0 |
| 65 |
.TP |
| 66 |
.BI \-R, \-\-repository \ <REPO> |
| 67 |
. |
| 68 |
repository root directory or name of overlay bundle file |
| 69 |
.TP |
| 70 |
.BI \-\-cwd \ <DIR> |
| 71 |
. |
| 72 |
change working directory |
| 73 |
.TP |
| 74 |
.B \-y, \-\-noninteractive |
| 75 |
. |
| 76 |
do not prompt, automatically pick the first choice for all prompts |
| 77 |
.TP |
| 78 |
.B \-q, \-\-quiet |
| 79 |
. |
| 80 |
suppress output |
| 81 |
.TP |
| 82 |
.B \-v, \-\-verbose |
| 83 |
. |
| 84 |
enable additional output |
| 85 |
.TP |
| 86 |
.BI \-\-color \ <TYPE> |
| 87 |
. |
| 88 |
when to colorize (boolean, always, auto, never, or debug) |
| 89 |
.TP |
| 90 |
.BI \-\-config \ <CONFIG[+]> |
| 91 |
. |
| 92 |
set/override config option (use \(aqsection.name=value\(aq) |
| 93 |
.TP |
| 94 |
.BI \-\-config\-file \ <HGRC[+]> |
| 95 |
. |
| 96 |
load config file to set/override config options |
| 97 |
.TP |
| 98 |
.B \-\-debug |
| 99 |
. |
| 100 |
enable debugging output |
| 101 |
.TP |
| 102 |
.B \-\-debugger |
| 103 |
. |
| 104 |
start debugger |
| 105 |
.TP |
| 106 |
.BI \-\-encoding \ <ENCODE> |
| 107 |
. |
| 108 |
set the charset encoding (default: UTF\-8) |
| 109 |
.TP |
| 110 |
.BI \-\-encodingmode \ <MODE> |
| 111 |
. |
| 112 |
set the charset encoding mode (default: strict) |
| 113 |
.TP |
| 114 |
.B \-\-traceback |
| 115 |
. |
| 116 |
always print a traceback on exception |
| 117 |
.TP |
| 118 |
.B \-\-time |
| 119 |
. |
| 120 |
time how long the command takes |
| 121 |
.TP |
| 122 |
.B \-\-profile |
| 123 |
. |
| 124 |
print command execution profile |
| 125 |
.TP |
| 126 |
.B \-\-version |
| 127 |
. |
| 128 |
output version information and exit |
| 129 |
.TP |
| 130 |
.B \-h, \-\-help |
| 131 |
. |
| 132 |
display help and exit |
| 133 |
.TP |
| 134 |
.B \-\-hidden |
| 135 |
. |
| 136 |
consider hidden changesets |
| 137 |
.TP |
| 138 |
.BI \-\-pager \ <TYPE> |
| 139 |
. |
| 140 |
when to paginate (boolean, always, auto, or never) (default: auto) |
| 141 |
.UNINDENT |
| 142 |
.sp |
| 143 |
[+] marked option can be specified multiple times |
| 144 |
.SH COMMANDS |
| 145 |
.SS Repository creation |
| 146 |
.SS clone |
| 147 |
.sp |
| 148 |
make a copy of an existing repository: |
| 149 |
.sp |
| 150 |
.nf |
| 151 |
.ft C |
| 152 |
hg clone [OPTION]... SOURCE [DEST] |
| 153 |
.ft P |
| 154 |
.fi |
| 155 |
.sp |
| 156 |
Create a copy of an existing repository in a new directory. |
| 157 |
.sp |
| 158 |
If no destination directory name is specified, it defaults to the |
| 159 |
basename of the source. |
| 160 |
.sp |
| 161 |
The location of the source is added to the new repository\(aqs |
| 162 |
\fB.hg/hgrc\fP file, as the default to be used for future pulls. |
| 163 |
.sp |
| 164 |
Only local paths and \fBssh://\fP URLs are supported as |
| 165 |
destinations. For \fBssh://\fP destinations, no working directory or |
| 166 |
\fB.hg/hgrc\fP will be created on the remote side. |
| 167 |
.sp |
| 168 |
If the source repository has a bookmark called \(aq@\(aq set, that |
| 169 |
revision will be checked out in the new repository by default. |
| 170 |
.sp |
| 171 |
To check out a particular version, use \-u/\-\-update, or |
| 172 |
\-U/\-\-noupdate to create a clone with no working directory. |
| 173 |
.sp |
| 174 |
To pull only a subset of changesets, specify one or more revisions |
| 175 |
identifiers with \-r/\-\-rev or branches with \-b/\-\-branch. The |
| 176 |
resulting clone will contain only the specified changesets and |
| 177 |
their ancestors. These options (or \(aqclone src#rev dest\(aq) imply |
| 178 |
\-\-pull, even for local source repositories. |
| 179 |
.sp |
| 180 |
In normal clone mode, the remote normalizes repository data into a common |
| 181 |
exchange format and the receiving end translates this data into its local |
| 182 |
storage format. \-\-stream activates a different clone mode that essentially |
| 183 |
copies repository files from the remote with minimal data processing. This |
| 184 |
significantly reduces the CPU cost of a clone both remotely and locally. |
| 185 |
However, it often increases the transferred data size by 30\-40%. This can |
| 186 |
result in substantially faster clones where I/O throughput is plentiful, |
| 187 |
especially for larger repositories. A side\-effect of \-\-stream clones is |
| 188 |
that storage settings and requirements on the remote are applied locally: |
| 189 |
a modern client may inherit legacy or inefficient storage used by the |
| 190 |
remote or a legacy Mercurial client may not be able to clone from a |
| 191 |
modern Mercurial remote. |
| 192 |
.IP Note |
| 193 |
. |
| 194 |
Specifying a tag will include the tagged changeset but not the |
| 195 |
changeset containing the tag. |
| 196 |
.RE |
| 197 |
.sp |
| 198 |
For efficiency, hardlinks are used for cloning whenever the |
| 199 |
source and destination are on the same filesystem (note this |
| 200 |
applies only to the repository data, not to the working |
| 201 |
directory). Some filesystems, such as AFS, implement hardlinking |
| 202 |
incorrectly, but do not report errors. In these cases, use the |
| 203 |
\-\-pull option to avoid hardlinking. |
| 204 |
.sp |
| 205 |
Mercurial will update the working directory to the first applicable |
| 206 |
revision from this list: |
| 207 |
.INDENT 0.0 |
| 208 |
.IP a. 3 |
| 209 |
. |
| 210 |
null if \-U or the source repository has no changesets |
| 211 |
.IP b. 3 |
| 212 |
. |
| 213 |
if \-u . and the source repository is local, the first parent of |
| 214 |
the source repository\(aqs working directory |
| 215 |
.IP c. 3 |
| 216 |
. |
| 217 |
the changeset specified with \-u (if a branch name, this means the |
| 218 |
latest head of that branch) |
| 219 |
.IP d. 3 |
| 220 |
. |
| 221 |
the changeset specified with \-r |
| 222 |
.IP e. 3 |
| 223 |
. |
| 224 |
the tipmost head specified with \-b |
| 225 |
.IP f. 3 |
| 226 |
. |
| 227 |
the tipmost head specified with the url#branch source syntax |
| 228 |
.IP g. 3 |
| 229 |
. |
| 230 |
the revision marked with the \(aq@\(aq bookmark, if present |
| 231 |
.IP h. 3 |
| 232 |
. |
| 233 |
the tipmost head of the default branch |
| 234 |
.IP i. 3 |
| 235 |
. |
| 236 |
tip |
| 237 |
.UNINDENT |
| 238 |
.sp |
| 239 |
When cloning from servers that support it, Mercurial may fetch |
| 240 |
pre\-generated data from a server\-advertised URL or inline from the |
| 241 |
same stream. When this is done, hooks operating on incoming changesets |
| 242 |
and changegroups may fire more than once, once for each pre\-generated |
| 243 |
bundle and as well as for any additional remaining data. In addition, |
| 244 |
if an error occurs, the repository may be rolled back to a partial |
| 245 |
clone. This behavior may change in future releases. |
| 246 |
See \%\fBhg help \-e clonebundles\fP\: for more. |
| 247 |
.sp |
| 248 |
Examples: |
| 249 |
.INDENT 0.0 |
| 250 |
.IP \(bu 2 |
| 251 |
. |
| 252 |
clone a remote repository to a new directory named hg/: |
| 253 |
.sp |
| 254 |
.nf |
| 255 |
.ft C |
| 256 |
hg clone https://www.mercurial\-scm.org/repo/hg/ |
| 257 |
.ft P |
| 258 |
.fi |
| 259 |
.IP \(bu 2 |
| 260 |
. |
| 261 |
create a lightweight local clone: |
| 262 |
.sp |
| 263 |
.nf |
| 264 |
.ft C |
| 265 |
hg clone project/ project\-feature/ |
| 266 |
.ft P |
| 267 |
.fi |
| 268 |
.IP \(bu 2 |
| 269 |
. |
| 270 |
clone from an absolute path on an ssh server (note double\-slash): |
| 271 |
.sp |
| 272 |
.nf |
| 273 |
.ft C |
| 274 |
hg clone ssh://user@server//home/projects/alpha/ |
| 275 |
.ft P |
| 276 |
.fi |
| 277 |
.IP \(bu 2 |
| 278 |
. |
| 279 |
do a streaming clone while checking out a specified version: |
| 280 |
.sp |
| 281 |
.nf |
| 282 |
.ft C |
| 283 |
hg clone \-\-stream http://server/repo \-u 1.5 |
| 284 |
.ft P |
| 285 |
.fi |
| 286 |
.IP \(bu 2 |
| 287 |
. |
| 288 |
create a repository without changesets after a particular revision: |
| 289 |
.sp |
| 290 |
.nf |
| 291 |
.ft C |
| 292 |
hg clone \-r 04e544 experimental/ good/ |
| 293 |
.ft P |
| 294 |
.fi |
| 295 |
.IP \(bu 2 |
| 296 |
. |
| 297 |
clone (and track) a particular named branch: |
| 298 |
.sp |
| 299 |
.nf |
| 300 |
.ft C |
| 301 |
hg clone https://www.mercurial\-scm.org/repo/hg/#stable |
| 302 |
.ft P |
| 303 |
.fi |
| 304 |
.UNINDENT |
| 305 |
.sp |
| 306 |
See \%\fBhg help urls\fP\: for details on specifying URLs. |
| 307 |
.sp |
| 308 |
Returns 0 on success. |
| 309 |
.sp |
| 310 |
Options: |
| 311 |
.INDENT 0.0 |
| 312 |
.TP |
| 313 |
.B \-U, \-\-noupdate |
| 314 |
. |
| 315 |
the clone will include an empty working directory (only a repository) |
| 316 |
.TP |
| 317 |
.BI \-u, \-\-updaterev \ <REV> |
| 318 |
. |
| 319 |
revision, tag, or branch to check out |
| 320 |
.TP |
| 321 |
.BI \-r, \-\-rev \ <REV[+]> |
| 322 |
. |
| 323 |
do not clone everything, but include this changeset and its ancestors |
| 324 |
.TP |
| 325 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 326 |
. |
| 327 |
do not clone everything, but include this branch\(aqs changesets and their ancestors |
| 328 |
.TP |
| 329 |
.B \-\-pull |
| 330 |
. |
| 331 |
use pull protocol to copy metadata |
| 332 |
.TP |
| 333 |
.B \-\-uncompressed |
| 334 |
. |
| 335 |
an alias to \-\-stream (DEPRECATED) |
| 336 |
.TP |
| 337 |
.B \-\-stream |
| 338 |
. |
| 339 |
clone with minimal data processing |
| 340 |
.TP |
| 341 |
.BI \-e, \-\-ssh \ <CMD> |
| 342 |
. |
| 343 |
specify ssh command to use |
| 344 |
.TP |
| 345 |
.BI \-\-remotecmd \ <CMD> |
| 346 |
. |
| 347 |
specify hg command to run on the remote side |
| 348 |
.TP |
| 349 |
.B \-\-insecure |
| 350 |
. |
| 351 |
do not verify server certificate (ignoring web.cacerts config) |
| 352 |
.UNINDENT |
| 353 |
.sp |
| 354 |
[+] marked option can be specified multiple times |
| 355 |
.SS init |
| 356 |
.sp |
| 357 |
create a new repository in the given directory: |
| 358 |
.sp |
| 359 |
.nf |
| 360 |
.ft C |
| 361 |
hg init [\-e CMD] [\-\-remotecmd CMD] [DEST] |
| 362 |
.ft P |
| 363 |
.fi |
| 364 |
.sp |
| 365 |
Initialize a new repository in the given directory. If the given |
| 366 |
directory does not exist, it will be created. |
| 367 |
.sp |
| 368 |
If no directory is given, the current directory is used. |
| 369 |
.sp |
| 370 |
It is possible to specify an \fBssh://\fP URL as the destination. |
| 371 |
See \%\fBhg help urls\fP\: for more information. |
| 372 |
.sp |
| 373 |
Returns 0 on success. |
| 374 |
.sp |
| 375 |
Options: |
| 376 |
.INDENT 0.0 |
| 377 |
.TP |
| 378 |
.BI \-e, \-\-ssh \ <CMD> |
| 379 |
. |
| 380 |
specify ssh command to use |
| 381 |
.TP |
| 382 |
.BI \-\-remotecmd \ <CMD> |
| 383 |
. |
| 384 |
specify hg command to run on the remote side |
| 385 |
.TP |
| 386 |
.B \-\-insecure |
| 387 |
. |
| 388 |
do not verify server certificate (ignoring web.cacerts config) |
| 389 |
.UNINDENT |
| 390 |
.SS Remote repository management |
| 391 |
.SS incoming |
| 392 |
.sp |
| 393 |
show new changesets found in source: |
| 394 |
.sp |
| 395 |
.nf |
| 396 |
.ft C |
| 397 |
hg incoming [\-p] [\-n] [\-M] [\-f] [\-r REV]... [\-\-bundle FILENAME] [SOURCE] |
| 398 |
.ft P |
| 399 |
.fi |
| 400 |
.sp |
| 401 |
Show new changesets found in the specified path/URL or the default |
| 402 |
pull location. These are the changesets that would have been pulled |
| 403 |
by \%\fBhg pull\fP\: at the time you issued this command. |
| 404 |
.sp |
| 405 |
See pull for valid source format details. |
| 406 |
.sp |
| 407 |
With \-B/\-\-bookmarks, the result of bookmark comparison between |
| 408 |
local and remote repositories is displayed. With \-v/\-\-verbose, |
| 409 |
status is also displayed for each bookmark like below: |
| 410 |
.sp |
| 411 |
.nf |
| 412 |
.ft C |
| 413 |
BM1 01234567890a added |
| 414 |
BM2 1234567890ab advanced |
| 415 |
BM3 234567890abc diverged |
| 416 |
BM4 34567890abcd changed |
| 417 |
.ft P |
| 418 |
.fi |
| 419 |
.sp |
| 420 |
The action taken locally when pulling depends on the |
| 421 |
status of each bookmark: |
| 422 |
.INDENT 0.0 |
| 423 |
.TP |
| 424 |
.B \fBadded\fP |
| 425 |
.sp |
| 426 |
pull will create it |
| 427 |
.TP |
| 428 |
.B \fBadvanced\fP |
| 429 |
.sp |
| 430 |
pull will update it |
| 431 |
.TP |
| 432 |
.B \fBdiverged\fP |
| 433 |
.sp |
| 434 |
pull will create a divergent bookmark |
| 435 |
.TP |
| 436 |
.B \fBchanged\fP |
| 437 |
.sp |
| 438 |
result depends on remote changesets |
| 439 |
.UNINDENT |
| 440 |
.sp |
| 441 |
From the point of view of pulling behavior, bookmark |
| 442 |
existing only in the remote repository are treated as \fBadded\fP, |
| 443 |
even if it is in fact locally deleted. |
| 444 |
.sp |
| 445 |
For remote repository, using \-\-bundle avoids downloading the |
| 446 |
changesets twice if the incoming is followed by a pull. |
| 447 |
.sp |
| 448 |
Examples: |
| 449 |
.INDENT 0.0 |
| 450 |
.IP \(bu 2 |
| 451 |
. |
| 452 |
show incoming changes with patches and full description: |
| 453 |
.sp |
| 454 |
.nf |
| 455 |
.ft C |
| 456 |
hg incoming \-vp |
| 457 |
.ft P |
| 458 |
.fi |
| 459 |
.IP \(bu 2 |
| 460 |
. |
| 461 |
show incoming changes excluding merges, store a bundle: |
| 462 |
.sp |
| 463 |
.nf |
| 464 |
.ft C |
| 465 |
hg in \-vpM \-\-bundle incoming.hg |
| 466 |
hg pull incoming.hg |
| 467 |
.ft P |
| 468 |
.fi |
| 469 |
.IP \(bu 2 |
| 470 |
. |
| 471 |
briefly list changes inside a bundle: |
| 472 |
.sp |
| 473 |
.nf |
| 474 |
.ft C |
| 475 |
hg in changes.hg \-T "{desc|firstline}\en" |
| 476 |
.ft P |
| 477 |
.fi |
| 478 |
.UNINDENT |
| 479 |
.sp |
| 480 |
Returns 0 if there are incoming changes, 1 otherwise. |
| 481 |
.sp |
| 482 |
Options: |
| 483 |
.INDENT 0.0 |
| 484 |
.TP |
| 485 |
.B \-f, \-\-force |
| 486 |
. |
| 487 |
run even if remote repository is unrelated |
| 488 |
.TP |
| 489 |
.B \-n, \-\-newest\-first |
| 490 |
. |
| 491 |
show newest record first |
| 492 |
.TP |
| 493 |
.BI \-\-bundle \ <FILE> |
| 494 |
. |
| 495 |
file to store the bundles into |
| 496 |
.TP |
| 497 |
.BI \-r, \-\-rev \ <REV[+]> |
| 498 |
. |
| 499 |
a remote changeset intended to be added |
| 500 |
.TP |
| 501 |
.B \-B, \-\-bookmarks |
| 502 |
. |
| 503 |
compare bookmarks |
| 504 |
.TP |
| 505 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 506 |
. |
| 507 |
a specific branch you would like to pull |
| 508 |
.TP |
| 509 |
.B \-\-remote\-hidden |
| 510 |
. |
| 511 |
include changesets hidden on the remote (EXPERIMENTAL) |
| 512 |
.TP |
| 513 |
.B \-p, \-\-patch |
| 514 |
. |
| 515 |
show patch |
| 516 |
.TP |
| 517 |
.B \-g, \-\-git |
| 518 |
. |
| 519 |
use git extended diff format |
| 520 |
.TP |
| 521 |
.BI \-l, \-\-limit \ <NUM> |
| 522 |
. |
| 523 |
limit number of changes displayed |
| 524 |
.TP |
| 525 |
.B \-M, \-\-no\-merges |
| 526 |
. |
| 527 |
do not show merges |
| 528 |
.TP |
| 529 |
.B \-\-stat |
| 530 |
. |
| 531 |
output diffstat\-style summary of changes |
| 532 |
.TP |
| 533 |
.B \-G, \-\-graph |
| 534 |
. |
| 535 |
show the revision DAG |
| 536 |
.TP |
| 537 |
.BI \-\-style \ <STYLE> |
| 538 |
. |
| 539 |
display using template map file (DEPRECATED) |
| 540 |
.TP |
| 541 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 542 |
. |
| 543 |
display with template |
| 544 |
.TP |
| 545 |
.BI \-e, \-\-ssh \ <CMD> |
| 546 |
. |
| 547 |
specify ssh command to use |
| 548 |
.TP |
| 549 |
.BI \-\-remotecmd \ <CMD> |
| 550 |
. |
| 551 |
specify hg command to run on the remote side |
| 552 |
.TP |
| 553 |
.B \-\-insecure |
| 554 |
. |
| 555 |
do not verify server certificate (ignoring web.cacerts config) |
| 556 |
.TP |
| 557 |
.B \-S, \-\-subrepos |
| 558 |
. |
| 559 |
recurse into subrepositories |
| 560 |
.UNINDENT |
| 561 |
.sp |
| 562 |
[+] marked option can be specified multiple times |
| 563 |
.\" |
| 564 |
. |
| 565 |
.INDENT 0.0 |
| 566 |
.INDENT 3.5 |
| 567 |
.sp |
| 568 |
aliases: in |
| 569 |
.UNINDENT |
| 570 |
.UNINDENT |
| 571 |
.SS outgoing |
| 572 |
.sp |
| 573 |
show changesets not found in the destination: |
| 574 |
.sp |
| 575 |
.nf |
| 576 |
.ft C |
| 577 |
hg outgoing [\-M] [\-p] [\-n] [\-f] [\-r REV]... [DEST]... |
| 578 |
.ft P |
| 579 |
.fi |
| 580 |
.sp |
| 581 |
Show changesets not found in the specified destination repository |
| 582 |
or the default push location. These are the changesets that would |
| 583 |
be pushed if a push was requested. |
| 584 |
.sp |
| 585 |
See pull for details of valid destination formats. |
| 586 |
.sp |
| 587 |
With \-B/\-\-bookmarks, the result of bookmark comparison between |
| 588 |
local and remote repositories is displayed. With \-v/\-\-verbose, |
| 589 |
status is also displayed for each bookmark like below: |
| 590 |
.sp |
| 591 |
.nf |
| 592 |
.ft C |
| 593 |
BM1 01234567890a added |
| 594 |
BM2 deleted |
| 595 |
BM3 234567890abc advanced |
| 596 |
BM4 34567890abcd diverged |
| 597 |
BM5 4567890abcde changed |
| 598 |
.ft P |
| 599 |
.fi |
| 600 |
.sp |
| 601 |
The action taken when pushing depends on the |
| 602 |
status of each bookmark: |
| 603 |
.INDENT 0.0 |
| 604 |
.TP |
| 605 |
.B \fBadded\fP |
| 606 |
.sp |
| 607 |
push with \fB\-B\fP will create it |
| 608 |
.TP |
| 609 |
.B \fBdeleted\fP |
| 610 |
.sp |
| 611 |
push with \fB\-B\fP will delete it |
| 612 |
.TP |
| 613 |
.B \fBadvanced\fP |
| 614 |
.sp |
| 615 |
push will update it |
| 616 |
.TP |
| 617 |
.B \fBdiverged\fP |
| 618 |
.sp |
| 619 |
push with \fB\-B\fP will update it |
| 620 |
.TP |
| 621 |
.B \fBchanged\fP |
| 622 |
.sp |
| 623 |
push with \fB\-B\fP will update it |
| 624 |
.UNINDENT |
| 625 |
.sp |
| 626 |
From the point of view of pushing behavior, bookmarks |
| 627 |
existing only in the remote repository are treated as |
| 628 |
\fBdeleted\fP, even if it is in fact added remotely. |
| 629 |
.sp |
| 630 |
Returns 0 if there are outgoing changes, 1 otherwise. |
| 631 |
.sp |
| 632 |
Options: |
| 633 |
.INDENT 0.0 |
| 634 |
.TP |
| 635 |
.B \-f, \-\-force |
| 636 |
. |
| 637 |
run even when the destination is unrelated |
| 638 |
.TP |
| 639 |
.BI \-r, \-\-rev \ <REV[+]> |
| 640 |
. |
| 641 |
a changeset intended to be included in the destination |
| 642 |
.TP |
| 643 |
.B \-n, \-\-newest\-first |
| 644 |
. |
| 645 |
show newest record first |
| 646 |
.TP |
| 647 |
.B \-B, \-\-bookmarks |
| 648 |
. |
| 649 |
compare bookmarks |
| 650 |
.TP |
| 651 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 652 |
. |
| 653 |
a specific branch you would like to push |
| 654 |
.TP |
| 655 |
.B \-p, \-\-patch |
| 656 |
. |
| 657 |
show patch |
| 658 |
.TP |
| 659 |
.B \-g, \-\-git |
| 660 |
. |
| 661 |
use git extended diff format |
| 662 |
.TP |
| 663 |
.BI \-l, \-\-limit \ <NUM> |
| 664 |
. |
| 665 |
limit number of changes displayed |
| 666 |
.TP |
| 667 |
.B \-M, \-\-no\-merges |
| 668 |
. |
| 669 |
do not show merges |
| 670 |
.TP |
| 671 |
.B \-\-stat |
| 672 |
. |
| 673 |
output diffstat\-style summary of changes |
| 674 |
.TP |
| 675 |
.B \-G, \-\-graph |
| 676 |
. |
| 677 |
show the revision DAG |
| 678 |
.TP |
| 679 |
.BI \-\-style \ <STYLE> |
| 680 |
. |
| 681 |
display using template map file (DEPRECATED) |
| 682 |
.TP |
| 683 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 684 |
. |
| 685 |
display with template |
| 686 |
.TP |
| 687 |
.BI \-e, \-\-ssh \ <CMD> |
| 688 |
. |
| 689 |
specify ssh command to use |
| 690 |
.TP |
| 691 |
.BI \-\-remotecmd \ <CMD> |
| 692 |
. |
| 693 |
specify hg command to run on the remote side |
| 694 |
.TP |
| 695 |
.B \-\-insecure |
| 696 |
. |
| 697 |
do not verify server certificate (ignoring web.cacerts config) |
| 698 |
.TP |
| 699 |
.B \-S, \-\-subrepos |
| 700 |
. |
| 701 |
recurse into subrepositories |
| 702 |
.UNINDENT |
| 703 |
.sp |
| 704 |
[+] marked option can be specified multiple times |
| 705 |
.\" |
| 706 |
. |
| 707 |
.INDENT 0.0 |
| 708 |
.INDENT 3.5 |
| 709 |
.sp |
| 710 |
aliases: out |
| 711 |
.UNINDENT |
| 712 |
.UNINDENT |
| 713 |
.SS paths |
| 714 |
.sp |
| 715 |
show aliases for remote repositories: |
| 716 |
.sp |
| 717 |
.nf |
| 718 |
.ft C |
| 719 |
hg paths [NAME] |
| 720 |
.ft P |
| 721 |
.fi |
| 722 |
.sp |
| 723 |
Show definition of symbolic path name NAME. If no name is given, |
| 724 |
show definition of all available names. |
| 725 |
.sp |
| 726 |
Option \-q/\-\-quiet suppresses all output when searching for NAME |
| 727 |
and shows only the path names when listing all definitions. |
| 728 |
.sp |
| 729 |
Path names are defined in the [paths] section of your |
| 730 |
configuration file and in \fB/etc/mercurial/hgrc\fP. If run inside a |
| 731 |
repository, \fB.hg/hgrc\fP is used, too. |
| 732 |
.sp |
| 733 |
The path names \fBdefault\fP and \fBdefault\-push\fP have a special |
| 734 |
meaning. When performing a push or pull operation, they are used |
| 735 |
as fallbacks if no location is specified on the command\-line. |
| 736 |
When \fBdefault\-push\fP is set, it will be used for push and |
| 737 |
\fBdefault\fP will be used for pull; otherwise \fBdefault\fP is used |
| 738 |
as the fallback for both. When cloning a repository, the clone |
| 739 |
source is written as \fBdefault\fP in \fB.hg/hgrc\fP. |
| 740 |
.IP Note |
| 741 |
. |
| 742 |
\fBdefault\fP and \fBdefault\-push\fP apply to all inbound (e.g. |
| 743 |
\%\fBhg incoming\fP\:) and outbound (e.g. \%\fBhg outgoing\fP\:, \%\fBhg email\fP\: |
| 744 |
and \%\fBhg bundle\fP\:) operations. |
| 745 |
.RE |
| 746 |
.sp |
| 747 |
See \%\fBhg help urls\fP\: for more information. |
| 748 |
.sp |
| 749 |
Template: |
| 750 |
.sp |
| 751 |
The following keywords are supported. See also \%\fBhg help templates\fP\:. |
| 752 |
.INDENT 0.0 |
| 753 |
.TP |
| 754 |
.B name |
| 755 |
. |
| 756 |
String. Symbolic name of the path alias. |
| 757 |
.TP |
| 758 |
.B pushurl |
| 759 |
. |
| 760 |
String. URL for push operations. |
| 761 |
.TP |
| 762 |
.B url |
| 763 |
. |
| 764 |
String. URL or directory path for the other operations. |
| 765 |
.UNINDENT |
| 766 |
.sp |
| 767 |
Returns 0 on success. |
| 768 |
.sp |
| 769 |
Options: |
| 770 |
.INDENT 0.0 |
| 771 |
.TP |
| 772 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 773 |
. |
| 774 |
display with template |
| 775 |
.UNINDENT |
| 776 |
.SS pull |
| 777 |
.sp |
| 778 |
pull changes from the specified source: |
| 779 |
.sp |
| 780 |
.nf |
| 781 |
.ft C |
| 782 |
hg pull [\-u] [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [SOURCE]... |
| 783 |
.ft P |
| 784 |
.fi |
| 785 |
.sp |
| 786 |
Pull changes from a remote repository to a local one. |
| 787 |
.sp |
| 788 |
This finds all changes from the repository at the specified path |
| 789 |
or URL and adds them to a local repository (the current one unless |
| 790 |
\-R is specified). By default, this does not update the copy of the |
| 791 |
project in the working directory. |
| 792 |
.sp |
| 793 |
When cloning from servers that support it, Mercurial may fetch |
| 794 |
pre\-generated data. When this is done, hooks operating on incoming |
| 795 |
changesets and changegroups may fire more than once, once for each |
| 796 |
pre\-generated bundle and as well as for any additional remaining |
| 797 |
data. See \%\fBhg help \-e clonebundles\fP\: for more. |
| 798 |
.sp |
| 799 |
Use \%\fBhg incoming\fP\: if you want to see what would have been added |
| 800 |
by a pull at the time you issued this command. If you then decide |
| 801 |
to add those changes to the repository, you should use \%\fBhg pull |
| 802 |
\-r X\fP\: where \fBX\fP is the last changeset listed by \%\fBhg incoming\fP\:. |
| 803 |
.sp |
| 804 |
If SOURCE is omitted, the \(aqdefault\(aq path will be used. |
| 805 |
See \%\fBhg help urls\fP\: for more information. |
| 806 |
.sp |
| 807 |
If multiple sources are specified, they will be pulled sequentially as if |
| 808 |
the command was run multiple times. If \-\-update is specified, the command |
| 809 |
will stop at the first failed \-\-update. |
| 810 |
.sp |
| 811 |
Specifying bookmark as \fB.\fP is equivalent to specifying the active |
| 812 |
bookmark\(aqs name. |
| 813 |
.sp |
| 814 |
One can use the \fI\-\-remote\-hidden\fP flag to pull changesets |
| 815 |
hidden on the remote. This flag is "best effort", and will only |
| 816 |
work if the server supports the feature and is configured to |
| 817 |
allow the user to access hidden changesets. This option is |
| 818 |
experimental and backwards compatibility is not guaranteed. |
| 819 |
.sp |
| 820 |
Returns 0 on success, 1 if an update had unresolved files. |
| 821 |
.sp |
| 822 |
Options: |
| 823 |
.INDENT 0.0 |
| 824 |
.TP |
| 825 |
.B \-u, \-\-update |
| 826 |
. |
| 827 |
update to new branch head if new descendants were pulled |
| 828 |
.TP |
| 829 |
.B \-f, \-\-force |
| 830 |
. |
| 831 |
run even when remote repository is unrelated |
| 832 |
.TP |
| 833 |
.B \-\-confirm |
| 834 |
. |
| 835 |
confirm pull before applying changes |
| 836 |
.TP |
| 837 |
.BI \-r, \-\-rev \ <REV[+]> |
| 838 |
. |
| 839 |
a remote changeset intended to be added |
| 840 |
.TP |
| 841 |
.BI \-B, \-\-bookmark \ <BOOKMARK[+]> |
| 842 |
. |
| 843 |
bookmark to pull |
| 844 |
.TP |
| 845 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 846 |
. |
| 847 |
a specific branch you would like to pull |
| 848 |
.TP |
| 849 |
.B \-\-remote\-hidden |
| 850 |
. |
| 851 |
include changesets hidden on the remote (EXPERIMENTAL) |
| 852 |
.TP |
| 853 |
.BI \-e, \-\-ssh \ <CMD> |
| 854 |
. |
| 855 |
specify ssh command to use |
| 856 |
.TP |
| 857 |
.BI \-\-remotecmd \ <CMD> |
| 858 |
. |
| 859 |
specify hg command to run on the remote side |
| 860 |
.TP |
| 861 |
.B \-\-insecure |
| 862 |
. |
| 863 |
do not verify server certificate (ignoring web.cacerts config) |
| 864 |
.UNINDENT |
| 865 |
.sp |
| 866 |
[+] marked option can be specified multiple times |
| 867 |
.SS push |
| 868 |
.sp |
| 869 |
push changes to the specified destination: |
| 870 |
.sp |
| 871 |
.nf |
| 872 |
.ft C |
| 873 |
hg push [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [DEST]... |
| 874 |
.ft P |
| 875 |
.fi |
| 876 |
.sp |
| 877 |
Push changesets from the local repository to the specified |
| 878 |
destination. |
| 879 |
.sp |
| 880 |
This operation is symmetrical to pull: it is identical to a pull |
| 881 |
in the destination repository from the current one. |
| 882 |
.sp |
| 883 |
By default, push will not allow creation of new heads at the |
| 884 |
destination, since multiple heads would make it unclear which head |
| 885 |
to use. In this situation, it is recommended to pull and merge |
| 886 |
before pushing. |
| 887 |
.sp |
| 888 |
Use \-\-new\-branch if you want to allow push to create a new named |
| 889 |
branch that is not present at the destination. This allows you to |
| 890 |
only create a new branch without forcing other changes. |
| 891 |
.IP Note |
| 892 |
. |
| 893 |
Extra care should be taken with the \-f/\-\-force option, |
| 894 |
which will push all new heads on all branches, an action which will |
| 895 |
almost always cause confusion for collaborators. |
| 896 |
.RE |
| 897 |
.sp |
| 898 |
If \-r/\-\-rev is used, the specified revision and all its ancestors |
| 899 |
will be pushed to the remote repository. |
| 900 |
.sp |
| 901 |
If \-B/\-\-bookmark is used, the specified bookmarked revision, its |
| 902 |
ancestors, and the bookmark will be pushed to the remote |
| 903 |
repository. Specifying \fB.\fP is equivalent to specifying the active |
| 904 |
bookmark\(aqs name. Use the \-\-all\-bookmarks option for pushing all |
| 905 |
current bookmarks. |
| 906 |
.sp |
| 907 |
Please see \%\fBhg help urls\fP\: for important details about \fBssh://\fP |
| 908 |
URLs. If DESTINATION is omitted, a default path will be used. |
| 909 |
.sp |
| 910 |
When passed multiple destinations, push will process them one after the |
| 911 |
other, but stop should an error occur. |
| 912 |
.sp |
| 913 |
The \-\-pushvars option sends strings to the server that become |
| 914 |
environment variables prepended with \fBHG_USERVAR_\fP. For example, |
| 915 |
\fB\-\-pushvars ENABLE_FEATURE=true\fP, provides the server side hooks with |
| 916 |
\fBHG_USERVAR_ENABLE_FEATURE=true\fP as part of their environment. |
| 917 |
.sp |
| 918 |
pushvars can provide for user\-overridable hooks as well as set debug |
| 919 |
levels. One example is having a hook that blocks commits containing |
| 920 |
conflict markers, but enables the user to override the hook if the file |
| 921 |
is using conflict markers for testing purposes or the file format has |
| 922 |
strings that look like conflict markers. |
| 923 |
.sp |
| 924 |
By default, servers will ignore \fI\-\-pushvars\fP. To enable it add the |
| 925 |
following to your configuration file: |
| 926 |
.sp |
| 927 |
.nf |
| 928 |
.ft C |
| 929 |
[push] |
| 930 |
pushvars.server = true |
| 931 |
.ft P |
| 932 |
.fi |
| 933 |
.sp |
| 934 |
Returns 0 if push was successful, 1 if nothing to push. |
| 935 |
.sp |
| 936 |
Options: |
| 937 |
.INDENT 0.0 |
| 938 |
.TP |
| 939 |
.B \-f, \-\-force |
| 940 |
. |
| 941 |
force push |
| 942 |
.TP |
| 943 |
.BI \-r, \-\-rev \ <REV[+]> |
| 944 |
. |
| 945 |
a changeset intended to be included in the destination |
| 946 |
.TP |
| 947 |
.BI \-B, \-\-bookmark \ <BOOKMARK[+]> |
| 948 |
. |
| 949 |
bookmark to push |
| 950 |
.TP |
| 951 |
.B \-\-all\-bookmarks |
| 952 |
. |
| 953 |
push all bookmarks (EXPERIMENTAL) |
| 954 |
.TP |
| 955 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 956 |
. |
| 957 |
a specific branch you would like to push |
| 958 |
.TP |
| 959 |
.B \-\-new\-branch |
| 960 |
. |
| 961 |
allow pushing a new branch |
| 962 |
.TP |
| 963 |
.BI \-\-pushvars \ <VALUE[+]> |
| 964 |
. |
| 965 |
variables that can be sent to server (ADVANCED) |
| 966 |
.TP |
| 967 |
.B \-\-publish |
| 968 |
. |
| 969 |
push the changeset as public (EXPERIMENTAL) |
| 970 |
.TP |
| 971 |
.BI \-e, \-\-ssh \ <CMD> |
| 972 |
. |
| 973 |
specify ssh command to use |
| 974 |
.TP |
| 975 |
.BI \-\-remotecmd \ <CMD> |
| 976 |
. |
| 977 |
specify hg command to run on the remote side |
| 978 |
.TP |
| 979 |
.B \-\-insecure |
| 980 |
. |
| 981 |
do not verify server certificate (ignoring web.cacerts config) |
| 982 |
.UNINDENT |
| 983 |
.sp |
| 984 |
[+] marked option can be specified multiple times |
| 985 |
.SS serve |
| 986 |
.sp |
| 987 |
start stand\-alone webserver: |
| 988 |
.sp |
| 989 |
.nf |
| 990 |
.ft C |
| 991 |
hg serve [OPTION]... |
| 992 |
.ft P |
| 993 |
.fi |
| 994 |
.sp |
| 995 |
Start a local HTTP repository browser and pull server. You can use |
| 996 |
this for ad\-hoc sharing and browsing of repositories. It is |
| 997 |
recommended to use a real web server to serve a repository for |
| 998 |
longer periods of time. |
| 999 |
.sp |
| 1000 |
Please note that the server does not implement access control. |
| 1001 |
This means that, by default, anybody can read from the server and |
| 1002 |
nobody can write to it by default. Set the \fBweb.allow\-push\fP |
| 1003 |
option to \fB*\fP to allow everybody to push to the server. You |
| 1004 |
should use a real web server if you need to authenticate users. |
| 1005 |
.sp |
| 1006 |
By default, the server logs accesses to stdout and errors to |
| 1007 |
stderr. Use the \-A/\-\-accesslog and \-E/\-\-errorlog options to log to |
| 1008 |
files. |
| 1009 |
.sp |
| 1010 |
To have the server choose a free port number to listen on, specify |
| 1011 |
a port number of 0; in this case, the server will print the port |
| 1012 |
number it uses. |
| 1013 |
.sp |
| 1014 |
Returns 0 on success. |
| 1015 |
.sp |
| 1016 |
Options: |
| 1017 |
.INDENT 0.0 |
| 1018 |
.TP |
| 1019 |
.BI \-A, \-\-accesslog \ <FILE> |
| 1020 |
. |
| 1021 |
name of access log file to write to |
| 1022 |
.TP |
| 1023 |
.B \-d, \-\-daemon |
| 1024 |
. |
| 1025 |
run server in background |
| 1026 |
.TP |
| 1027 |
.BI \-\-daemon\-postexec \ <VALUE[+]> |
| 1028 |
. |
| 1029 |
used internally by daemon mode |
| 1030 |
.TP |
| 1031 |
.BI \-E, \-\-errorlog \ <FILE> |
| 1032 |
. |
| 1033 |
name of error log file to write to |
| 1034 |
.TP |
| 1035 |
.BI \-p, \-\-port \ <PORT> |
| 1036 |
. |
| 1037 |
port to listen on (default: 8000) |
| 1038 |
.TP |
| 1039 |
.BI \-a, \-\-address \ <ADDR> |
| 1040 |
. |
| 1041 |
address to listen on (default: all interfaces) |
| 1042 |
.TP |
| 1043 |
.BI \-\-prefix \ <PREFIX> |
| 1044 |
. |
| 1045 |
prefix path to serve from (default: server root) |
| 1046 |
.TP |
| 1047 |
.BI \-n, \-\-name \ <NAME> |
| 1048 |
. |
| 1049 |
name to show in web pages (default: working directory) |
| 1050 |
.TP |
| 1051 |
.BI \-\-web\-conf \ <FILE> |
| 1052 |
. |
| 1053 |
name of the hgweb config file (see \(aqhg help hgweb\(aq) |
| 1054 |
.TP |
| 1055 |
.BI \-\-webdir\-conf \ <FILE> |
| 1056 |
. |
| 1057 |
name of the hgweb config file (DEPRECATED) |
| 1058 |
.TP |
| 1059 |
.BI \-\-pid\-file \ <FILE> |
| 1060 |
. |
| 1061 |
name of file to write process ID to |
| 1062 |
.TP |
| 1063 |
.B \-\-stdio |
| 1064 |
. |
| 1065 |
for remote clients (ADVANCED) |
| 1066 |
.TP |
| 1067 |
.BI \-\-cmdserver \ <MODE> |
| 1068 |
. |
| 1069 |
for remote clients (ADVANCED) |
| 1070 |
.TP |
| 1071 |
.BI \-t, \-\-templates \ <TEMPLATE> |
| 1072 |
. |
| 1073 |
web templates to use |
| 1074 |
.TP |
| 1075 |
.BI \-\-style \ <STYLE> |
| 1076 |
. |
| 1077 |
template style to use |
| 1078 |
.TP |
| 1079 |
.B \-6, \-\-ipv6 |
| 1080 |
. |
| 1081 |
use IPv6 instead of IPv4 |
| 1082 |
.TP |
| 1083 |
.BI \-\-certificate \ <FILE> |
| 1084 |
. |
| 1085 |
SSL certificate file |
| 1086 |
.TP |
| 1087 |
.B \-\-print\-url |
| 1088 |
. |
| 1089 |
start and print only the URL |
| 1090 |
.TP |
| 1091 |
.B \-S, \-\-subrepos |
| 1092 |
. |
| 1093 |
recurse into subrepositories |
| 1094 |
.UNINDENT |
| 1095 |
.sp |
| 1096 |
[+] marked option can be specified multiple times |
| 1097 |
.SS Change creation |
| 1098 |
.SS commit |
| 1099 |
.sp |
| 1100 |
commit the specified files or all outstanding changes: |
| 1101 |
.sp |
| 1102 |
.nf |
| 1103 |
.ft C |
| 1104 |
hg commit [OPTION]... [FILE]... |
| 1105 |
.ft P |
| 1106 |
.fi |
| 1107 |
.sp |
| 1108 |
Commit changes to the given files into the repository. Unlike a |
| 1109 |
centralized SCM, this operation is a local operation. See |
| 1110 |
\%\fBhg push\fP\: for a way to actively distribute your changes. |
| 1111 |
.sp |
| 1112 |
If a list of files is omitted, all changes reported by \%\fBhg status\fP\: |
| 1113 |
will be committed. |
| 1114 |
.sp |
| 1115 |
If you are committing the result of a merge, do not provide any |
| 1116 |
filenames or \-I/\-X filters. |
| 1117 |
.sp |
| 1118 |
If no commit message is specified, Mercurial starts your |
| 1119 |
configured editor where you can enter a message. In case your |
| 1120 |
commit fails, you will find a backup of your message in |
| 1121 |
\fB.hg/last\-message.txt\fP. |
| 1122 |
.sp |
| 1123 |
The \-\-close\-branch flag can be used to mark the current branch |
| 1124 |
head closed. When all heads of a branch are closed, the branch |
| 1125 |
will be considered closed and no longer listed. |
| 1126 |
.sp |
| 1127 |
The \-\-amend flag can be used to amend the parent of the |
| 1128 |
working directory with a new commit that contains the changes |
| 1129 |
in the parent in addition to those currently reported by \%\fBhg status\fP\:, |
| 1130 |
if there are any. The old commit is stored in a backup bundle in |
| 1131 |
\fB.hg/strip\-backup\fP (see \%\fBhg help bundle\fP\: and \%\fBhg help unbundle\fP\: |
| 1132 |
on how to restore it). |
| 1133 |
.sp |
| 1134 |
Message, user and date are taken from the amended commit unless |
| 1135 |
specified. When a message isn\(aqt specified on the command line, |
| 1136 |
the editor will open with the message of the amended commit. |
| 1137 |
.sp |
| 1138 |
It is not possible to amend public changesets (see \%\fBhg help phases\fP\:) |
| 1139 |
or changesets that have children. |
| 1140 |
.sp |
| 1141 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 1142 |
.sp |
| 1143 |
Returns 0 on success, 1 if nothing changed. |
| 1144 |
.sp |
| 1145 |
Examples: |
| 1146 |
.INDENT 0.0 |
| 1147 |
.IP \(bu 2 |
| 1148 |
. |
| 1149 |
commit all files ending in .py: |
| 1150 |
.sp |
| 1151 |
.nf |
| 1152 |
.ft C |
| 1153 |
hg commit \-\-include "set:**.py" |
| 1154 |
.ft P |
| 1155 |
.fi |
| 1156 |
.IP \(bu 2 |
| 1157 |
. |
| 1158 |
commit all non\-binary files: |
| 1159 |
.sp |
| 1160 |
.nf |
| 1161 |
.ft C |
| 1162 |
hg commit \-\-exclude "set:binary()" |
| 1163 |
.ft P |
| 1164 |
.fi |
| 1165 |
.IP \(bu 2 |
| 1166 |
. |
| 1167 |
amend the current commit and set the date to now: |
| 1168 |
.sp |
| 1169 |
.nf |
| 1170 |
.ft C |
| 1171 |
hg commit \-\-amend \-\-date now |
| 1172 |
.ft P |
| 1173 |
.fi |
| 1174 |
.UNINDENT |
| 1175 |
.sp |
| 1176 |
Options: |
| 1177 |
.INDENT 0.0 |
| 1178 |
.TP |
| 1179 |
.B \-A, \-\-addremove |
| 1180 |
. |
| 1181 |
mark new/missing files as added/removed before committing |
| 1182 |
.TP |
| 1183 |
.B \-\-close\-branch |
| 1184 |
. |
| 1185 |
mark a branch head as closed |
| 1186 |
.TP |
| 1187 |
.B \-\-amend |
| 1188 |
. |
| 1189 |
amend the parent of the working directory |
| 1190 |
.TP |
| 1191 |
.B \-s, \-\-secret |
| 1192 |
. |
| 1193 |
use the secret phase for committing |
| 1194 |
.TP |
| 1195 |
.B \-\-draft |
| 1196 |
. |
| 1197 |
use the draft phase for committing |
| 1198 |
.TP |
| 1199 |
.B \-e, \-\-edit |
| 1200 |
. |
| 1201 |
invoke editor on commit messages |
| 1202 |
.TP |
| 1203 |
.B \-\-force\-close\-branch |
| 1204 |
. |
| 1205 |
forcibly close branch from a non\-head changeset (ADVANCED) |
| 1206 |
.TP |
| 1207 |
.B \-i, \-\-interactive |
| 1208 |
. |
| 1209 |
use interactive mode |
| 1210 |
.TP |
| 1211 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 1212 |
. |
| 1213 |
include names matching the given patterns |
| 1214 |
.TP |
| 1215 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 1216 |
. |
| 1217 |
exclude names matching the given patterns |
| 1218 |
.TP |
| 1219 |
.BI \-m, \-\-message \ <TEXT> |
| 1220 |
. |
| 1221 |
use text as commit message |
| 1222 |
.TP |
| 1223 |
.BI \-l, \-\-logfile \ <FILE> |
| 1224 |
. |
| 1225 |
read commit message from file |
| 1226 |
.TP |
| 1227 |
.BI \-d, \-\-date \ <DATE> |
| 1228 |
. |
| 1229 |
record the specified date as commit date |
| 1230 |
.TP |
| 1231 |
.BI \-u, \-\-user \ <USER> |
| 1232 |
. |
| 1233 |
record the specified user as committer |
| 1234 |
.TP |
| 1235 |
.B \-S, \-\-subrepos |
| 1236 |
. |
| 1237 |
recurse into subrepositories |
| 1238 |
.UNINDENT |
| 1239 |
.sp |
| 1240 |
[+] marked option can be specified multiple times |
| 1241 |
.\" |
| 1242 |
. |
| 1243 |
.INDENT 0.0 |
| 1244 |
.INDENT 3.5 |
| 1245 |
.sp |
| 1246 |
aliases: ci |
| 1247 |
.UNINDENT |
| 1248 |
.UNINDENT |
| 1249 |
.SS Change manipulation |
| 1250 |
.SS abort |
| 1251 |
.sp |
| 1252 |
abort an unfinished operation (EXPERIMENTAL): |
| 1253 |
.sp |
| 1254 |
.nf |
| 1255 |
.ft C |
| 1256 |
hg abort |
| 1257 |
.ft P |
| 1258 |
.fi |
| 1259 |
.sp |
| 1260 |
Aborts a multistep operation like graft, histedit, rebase, merge, |
| 1261 |
and unshelve if they are in an unfinished state. |
| 1262 |
.sp |
| 1263 |
use \-\-dry\-run/\-n to dry run the command. |
| 1264 |
.sp |
| 1265 |
Options: |
| 1266 |
.INDENT 0.0 |
| 1267 |
.TP |
| 1268 |
.B \-n, \-\-dry\-run |
| 1269 |
. |
| 1270 |
do not perform actions, just print output |
| 1271 |
.UNINDENT |
| 1272 |
.SS backout |
| 1273 |
.sp |
| 1274 |
reverse effect of earlier changeset: |
| 1275 |
.sp |
| 1276 |
.nf |
| 1277 |
.ft C |
| 1278 |
hg backout [OPTION]... [\-r] REV |
| 1279 |
.ft P |
| 1280 |
.fi |
| 1281 |
.sp |
| 1282 |
Prepare a new changeset with the effect of REV undone in the |
| 1283 |
current working directory. If no conflicts were encountered, |
| 1284 |
it will be committed immediately. |
| 1285 |
.sp |
| 1286 |
If REV is the parent of the working directory, then this new changeset |
| 1287 |
is committed automatically (unless \-\-no\-commit is specified). |
| 1288 |
.IP Note |
| 1289 |
. |
| 1290 |
\%\fBhg backout\fP\: cannot be used to fix either an unwanted or |
| 1291 |
incorrect merge. |
| 1292 |
.RE |
| 1293 |
.sp |
| 1294 |
Examples: |
| 1295 |
.INDENT 0.0 |
| 1296 |
.IP \(bu 2 |
| 1297 |
. |
| 1298 |
Reverse the effect of the parent of the working directory. |
| 1299 |
This backout will be committed immediately: |
| 1300 |
.sp |
| 1301 |
.nf |
| 1302 |
.ft C |
| 1303 |
hg backout \-r . |
| 1304 |
.ft P |
| 1305 |
.fi |
| 1306 |
.IP \(bu 2 |
| 1307 |
. |
| 1308 |
Reverse the effect of previous bad revision 23: |
| 1309 |
.sp |
| 1310 |
.nf |
| 1311 |
.ft C |
| 1312 |
hg backout \-r 23 |
| 1313 |
.ft P |
| 1314 |
.fi |
| 1315 |
.IP \(bu 2 |
| 1316 |
. |
| 1317 |
Reverse the effect of previous bad revision 23 and |
| 1318 |
leave changes uncommitted: |
| 1319 |
.sp |
| 1320 |
.nf |
| 1321 |
.ft C |
| 1322 |
hg backout \-r 23 \-\-no\-commit |
| 1323 |
hg commit \-m "Backout revision 23" |
| 1324 |
.ft P |
| 1325 |
.fi |
| 1326 |
.UNINDENT |
| 1327 |
.sp |
| 1328 |
By default, the pending changeset will have one parent, |
| 1329 |
maintaining a linear history. With \-\-merge, the pending |
| 1330 |
changeset will instead have two parents: the old parent of the |
| 1331 |
working directory and a new child of REV that simply undoes REV. |
| 1332 |
.sp |
| 1333 |
Before version 1.7, the behavior without \-\-merge was equivalent |
| 1334 |
to specifying \-\-merge followed by \%\fBhg update \-\-clean .\fP\: to |
| 1335 |
cancel the merge and leave the child of REV as a head to be |
| 1336 |
merged separately. |
| 1337 |
.sp |
| 1338 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 1339 |
.sp |
| 1340 |
See \%\fBhg help revert\fP\: for a way to restore files to the state |
| 1341 |
of another revision. |
| 1342 |
.sp |
| 1343 |
Returns 0 on success, 1 if nothing to backout or there are unresolved |
| 1344 |
files. |
| 1345 |
.sp |
| 1346 |
Options: |
| 1347 |
.INDENT 0.0 |
| 1348 |
.TP |
| 1349 |
.B \-\-merge |
| 1350 |
. |
| 1351 |
merge with old dirstate parent after backout |
| 1352 |
.TP |
| 1353 |
.B \-\-commit |
| 1354 |
. |
| 1355 |
commit if no conflicts were encountered (DEPRECATED) |
| 1356 |
.TP |
| 1357 |
.B \-\-no\-commit |
| 1358 |
. |
| 1359 |
do not commit |
| 1360 |
.TP |
| 1361 |
.BI \-\-parent \ <REV> |
| 1362 |
. |
| 1363 |
parent to choose when backing out merge (DEPRECATED) |
| 1364 |
.TP |
| 1365 |
.BI \-r, \-\-rev \ <REV> |
| 1366 |
. |
| 1367 |
revision to backout |
| 1368 |
.TP |
| 1369 |
.B \-e, \-\-edit |
| 1370 |
. |
| 1371 |
invoke editor on commit messages |
| 1372 |
.TP |
| 1373 |
.BI \-t, \-\-tool \ <TOOL> |
| 1374 |
. |
| 1375 |
specify merge tool |
| 1376 |
.TP |
| 1377 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 1378 |
. |
| 1379 |
include names matching the given patterns |
| 1380 |
.TP |
| 1381 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 1382 |
. |
| 1383 |
exclude names matching the given patterns |
| 1384 |
.TP |
| 1385 |
.BI \-m, \-\-message \ <TEXT> |
| 1386 |
. |
| 1387 |
use text as commit message |
| 1388 |
.TP |
| 1389 |
.BI \-l, \-\-logfile \ <FILE> |
| 1390 |
. |
| 1391 |
read commit message from file |
| 1392 |
.TP |
| 1393 |
.BI \-d, \-\-date \ <DATE> |
| 1394 |
. |
| 1395 |
record the specified date as commit date |
| 1396 |
.TP |
| 1397 |
.BI \-u, \-\-user \ <USER> |
| 1398 |
. |
| 1399 |
record the specified user as committer |
| 1400 |
.UNINDENT |
| 1401 |
.sp |
| 1402 |
[+] marked option can be specified multiple times |
| 1403 |
.SS continue |
| 1404 |
.sp |
| 1405 |
resumes an interrupted operation (EXPERIMENTAL): |
| 1406 |
.sp |
| 1407 |
.nf |
| 1408 |
.ft C |
| 1409 |
hg continue |
| 1410 |
.ft P |
| 1411 |
.fi |
| 1412 |
.sp |
| 1413 |
Finishes a multistep operation like graft, histedit, rebase, merge, |
| 1414 |
and unshelve if they are in an interrupted state. |
| 1415 |
.sp |
| 1416 |
use \-\-dry\-run/\-n to dry run the command. |
| 1417 |
.sp |
| 1418 |
Options: |
| 1419 |
.INDENT 0.0 |
| 1420 |
.TP |
| 1421 |
.B \-n, \-\-dry\-run |
| 1422 |
. |
| 1423 |
do not perform actions, just print output |
| 1424 |
.UNINDENT |
| 1425 |
.SS graft |
| 1426 |
.sp |
| 1427 |
copy changes from other branches onto the current branch: |
| 1428 |
.sp |
| 1429 |
.nf |
| 1430 |
.ft C |
| 1431 |
hg graft [OPTION]... [\-r REV]... REV... |
| 1432 |
.ft P |
| 1433 |
.fi |
| 1434 |
.sp |
| 1435 |
This command uses Mercurial\(aqs merge logic to copy individual |
| 1436 |
changes from other branches without merging branches in the |
| 1437 |
history graph. This is sometimes known as \(aqbackporting\(aq or |
| 1438 |
\(aqcherry\-picking\(aq. By default, graft will copy user, date, and |
| 1439 |
description from the source changesets. |
| 1440 |
.sp |
| 1441 |
Changesets that are ancestors of the current revision, that have |
| 1442 |
already been grafted, or that are merges will be skipped. |
| 1443 |
.sp |
| 1444 |
If \-\-log is specified, log messages will have a comment appended |
| 1445 |
of the form: |
| 1446 |
.sp |
| 1447 |
.nf |
| 1448 |
.ft C |
| 1449 |
(grafted from CHANGESETHASH) |
| 1450 |
.ft P |
| 1451 |
.fi |
| 1452 |
.sp |
| 1453 |
If \-\-force is specified, revisions will be grafted even if they |
| 1454 |
are already ancestors of, or have been grafted to, the destination. |
| 1455 |
This is useful when the revisions have since been backed out. |
| 1456 |
.sp |
| 1457 |
If a graft merge results in conflicts, the graft process is |
| 1458 |
interrupted so that the current merge can be manually resolved. |
| 1459 |
Once all conflicts are addressed, the graft process can be |
| 1460 |
continued with the \-c/\-\-continue option. |
| 1461 |
.sp |
| 1462 |
The \-c/\-\-continue option reapplies all the earlier options. |
| 1463 |
.sp |
| 1464 |
The \-\-base option exposes more of how graft internally uses merge with a |
| 1465 |
custom base revision. \-\-base can be used to specify another ancestor than |
| 1466 |
the first and only parent. |
| 1467 |
.sp |
| 1468 |
The command: |
| 1469 |
.sp |
| 1470 |
.nf |
| 1471 |
.ft C |
| 1472 |
hg graft \-r 345 \-\-base 234 |
| 1473 |
.ft P |
| 1474 |
.fi |
| 1475 |
.sp |
| 1476 |
is thus pretty much the same as: |
| 1477 |
.sp |
| 1478 |
.nf |
| 1479 |
.ft C |
| 1480 |
hg diff \-\-from 234 \-\-to 345 | hg import |
| 1481 |
.ft P |
| 1482 |
.fi |
| 1483 |
.sp |
| 1484 |
but using merge to resolve conflicts and track moved files. |
| 1485 |
.sp |
| 1486 |
The result of a merge can thus be backported as a single commit by |
| 1487 |
specifying one of the merge parents as base, and thus effectively |
| 1488 |
grafting the changes from the other side. |
| 1489 |
.sp |
| 1490 |
It is also possible to collapse multiple changesets and clean up history |
| 1491 |
by specifying another ancestor as base, much like rebase \-\-collapse |
| 1492 |
\-\-keep. |
| 1493 |
.sp |
| 1494 |
The commit message can be tweaked after the fact using commit \-\-amend . |
| 1495 |
.sp |
| 1496 |
For using non\-ancestors as the base to backout changes, see the backout |
| 1497 |
command and the hidden \-\-parent option. |
| 1498 |
.sp |
| 1499 |
The experimental \-\-to option allows grafting a revision in\-memory, |
| 1500 |
independent of the working copy. Merge conflicts are not currently |
| 1501 |
supported, and the operation will be aborted if the configured tool |
| 1502 |
cannot handle the conflicts that might be encountered. |
| 1503 |
.sp |
| 1504 |
As the operation is performed in\-memory, the on\-disk files will not be |
| 1505 |
modified, and some hooks might not be run. |
| 1506 |
.sp |
| 1507 |
Examples: |
| 1508 |
.INDENT 0.0 |
| 1509 |
.IP \(bu 2 |
| 1510 |
. |
| 1511 |
copy a single change to the stable branch and edit its description: |
| 1512 |
.sp |
| 1513 |
.nf |
| 1514 |
.ft C |
| 1515 |
hg update stable |
| 1516 |
hg graft \-\-edit 9393 |
| 1517 |
.ft P |
| 1518 |
.fi |
| 1519 |
.IP \(bu 2 |
| 1520 |
. |
| 1521 |
graft a range of changesets with one exception, updating dates: |
| 1522 |
.sp |
| 1523 |
.nf |
| 1524 |
.ft C |
| 1525 |
hg graft \-D "2085::2093 and not 2091" |
| 1526 |
.ft P |
| 1527 |
.fi |
| 1528 |
.IP \(bu 2 |
| 1529 |
. |
| 1530 |
continue a graft after resolving conflicts: |
| 1531 |
.sp |
| 1532 |
.nf |
| 1533 |
.ft C |
| 1534 |
hg graft \-c |
| 1535 |
.ft P |
| 1536 |
.fi |
| 1537 |
.IP \(bu 2 |
| 1538 |
. |
| 1539 |
show the source of a grafted changeset: |
| 1540 |
.sp |
| 1541 |
.nf |
| 1542 |
.ft C |
| 1543 |
hg log \-\-debug \-r . |
| 1544 |
.ft P |
| 1545 |
.fi |
| 1546 |
.IP \(bu 2 |
| 1547 |
. |
| 1548 |
show revisions sorted by date: |
| 1549 |
.sp |
| 1550 |
.nf |
| 1551 |
.ft C |
| 1552 |
hg log \-r "sort(all(), date)" |
| 1553 |
.ft P |
| 1554 |
.fi |
| 1555 |
.IP \(bu 2 |
| 1556 |
. |
| 1557 |
backport the result of a merge as a single commit: |
| 1558 |
.sp |
| 1559 |
.nf |
| 1560 |
.ft C |
| 1561 |
hg graft \-r 123 \-\-base 123^ |
| 1562 |
.ft P |
| 1563 |
.fi |
| 1564 |
.IP \(bu 2 |
| 1565 |
. |
| 1566 |
land a feature branch as one changeset: |
| 1567 |
.sp |
| 1568 |
.nf |
| 1569 |
.ft C |
| 1570 |
hg up \-cr default |
| 1571 |
hg graft \-r featureX \-\-base "ancestor(\(aqfeatureX\(aq, \(aqdefault\(aq)" |
| 1572 |
.ft P |
| 1573 |
.fi |
| 1574 |
.UNINDENT |
| 1575 |
.sp |
| 1576 |
See \%\fBhg help revisions\fP\: for more about specifying revisions. |
| 1577 |
.sp |
| 1578 |
Returns 0 on successful completion, 1 if there are unresolved files. |
| 1579 |
.sp |
| 1580 |
Options: |
| 1581 |
.INDENT 0.0 |
| 1582 |
.TP |
| 1583 |
.BI \-r, \-\-rev \ <REV[+]> |
| 1584 |
. |
| 1585 |
revisions to graft |
| 1586 |
.TP |
| 1587 |
.BI \-\-base \ <REV> |
| 1588 |
. |
| 1589 |
base revision when doing the graft merge (ADVANCED) |
| 1590 |
.TP |
| 1591 |
.BI \-\-to \ <VALUE> |
| 1592 |
. |
| 1593 |
graft to this destination, in\-memory (EXPERIMENTAL) |
| 1594 |
.TP |
| 1595 |
.B \-c, \-\-continue |
| 1596 |
. |
| 1597 |
resume interrupted graft |
| 1598 |
.TP |
| 1599 |
.B \-\-stop |
| 1600 |
. |
| 1601 |
stop interrupted graft |
| 1602 |
.TP |
| 1603 |
.B \-\-abort |
| 1604 |
. |
| 1605 |
abort interrupted graft |
| 1606 |
.TP |
| 1607 |
.B \-e, \-\-edit |
| 1608 |
. |
| 1609 |
invoke editor on commit messages |
| 1610 |
.TP |
| 1611 |
.B \-\-log |
| 1612 |
. |
| 1613 |
append graft info to log message |
| 1614 |
.TP |
| 1615 |
.B \-\-no\-commit |
| 1616 |
. |
| 1617 |
don\(aqt commit, just apply the changes in working directory |
| 1618 |
.TP |
| 1619 |
.B \-f, \-\-force |
| 1620 |
. |
| 1621 |
force graft |
| 1622 |
.TP |
| 1623 |
.B \-D, \-\-currentdate |
| 1624 |
. |
| 1625 |
record the current date as commit date |
| 1626 |
.TP |
| 1627 |
.B \-U, \-\-currentuser |
| 1628 |
. |
| 1629 |
record the current user as committer |
| 1630 |
.TP |
| 1631 |
.BI \-d, \-\-date \ <DATE> |
| 1632 |
. |
| 1633 |
record the specified date as commit date |
| 1634 |
.TP |
| 1635 |
.BI \-u, \-\-user \ <USER> |
| 1636 |
. |
| 1637 |
record the specified user as committer |
| 1638 |
.TP |
| 1639 |
.BI \-t, \-\-tool \ <TOOL> |
| 1640 |
. |
| 1641 |
specify merge tool |
| 1642 |
.TP |
| 1643 |
.B \-n, \-\-dry\-run |
| 1644 |
. |
| 1645 |
do not perform actions, just print output |
| 1646 |
.UNINDENT |
| 1647 |
.sp |
| 1648 |
[+] marked option can be specified multiple times |
| 1649 |
.SS merge |
| 1650 |
.sp |
| 1651 |
merge another revision into working directory: |
| 1652 |
.sp |
| 1653 |
.nf |
| 1654 |
.ft C |
| 1655 |
hg merge [\-P] [[\-r] REV] |
| 1656 |
.ft P |
| 1657 |
.fi |
| 1658 |
.sp |
| 1659 |
The current working directory is updated with all changes made in |
| 1660 |
the requested revision since the last common predecessor revision. |
| 1661 |
.sp |
| 1662 |
Files that changed between either parent are marked as changed for |
| 1663 |
the next commit and a commit must be performed before any further |
| 1664 |
updates to the repository are allowed. The next commit will have |
| 1665 |
two parents. |
| 1666 |
.sp |
| 1667 |
\fB\-\-tool\fP can be used to specify the merge tool used for file |
| 1668 |
merges. It overrides the HGMERGE environment variable and your |
| 1669 |
configuration files. See \%\fBhg help merge\-tools\fP\: for options. |
| 1670 |
.sp |
| 1671 |
If no revision is specified, the working directory\(aqs parent is a |
| 1672 |
head revision, and the current branch contains exactly one other |
| 1673 |
head, the other head is merged with by default. Otherwise, an |
| 1674 |
explicit revision with which to merge must be provided. |
| 1675 |
.sp |
| 1676 |
See \%\fBhg help resolve\fP\: for information on handling file conflicts. |
| 1677 |
.sp |
| 1678 |
To undo an uncommitted merge, use \%\fBhg merge \-\-abort\fP\: which |
| 1679 |
will check out a clean copy of the original merge parent, losing |
| 1680 |
all changes. |
| 1681 |
.sp |
| 1682 |
Returns 0 on success, 1 if there are unresolved files. |
| 1683 |
.sp |
| 1684 |
Options: |
| 1685 |
.INDENT 0.0 |
| 1686 |
.TP |
| 1687 |
.B \-f, \-\-force |
| 1688 |
. |
| 1689 |
force a merge including outstanding changes (DEPRECATED) |
| 1690 |
.TP |
| 1691 |
.BI \-r, \-\-rev \ <REV> |
| 1692 |
. |
| 1693 |
revision to merge |
| 1694 |
.TP |
| 1695 |
.B \-P, \-\-preview |
| 1696 |
. |
| 1697 |
review revisions to merge (no merge is performed) |
| 1698 |
.TP |
| 1699 |
.B \-\-abort |
| 1700 |
. |
| 1701 |
abort the ongoing merge |
| 1702 |
.TP |
| 1703 |
.BI \-t, \-\-tool \ <TOOL> |
| 1704 |
. |
| 1705 |
specify merge tool |
| 1706 |
.UNINDENT |
| 1707 |
.SS Change organization |
| 1708 |
.SS bookmarks |
| 1709 |
.sp |
| 1710 |
create a new bookmark or list existing bookmarks: |
| 1711 |
.sp |
| 1712 |
.nf |
| 1713 |
.ft C |
| 1714 |
hg bookmarks [OPTIONS]... [NAME]... |
| 1715 |
.ft P |
| 1716 |
.fi |
| 1717 |
.sp |
| 1718 |
Bookmarks are labels on changesets to help track lines of development. |
| 1719 |
Bookmarks are unversioned and can be moved, renamed and deleted. |
| 1720 |
Deleting or moving a bookmark has no effect on the associated changesets. |
| 1721 |
.sp |
| 1722 |
Creating or updating to a bookmark causes it to be marked as \(aqactive\(aq. |
| 1723 |
The active bookmark is indicated with a \(aq*\(aq. |
| 1724 |
When a commit is made, the active bookmark will advance to the new commit. |
| 1725 |
A plain \%\fBhg update\fP\: will also advance an active bookmark, if possible. |
| 1726 |
Updating away from a bookmark will cause it to be deactivated. |
| 1727 |
.sp |
| 1728 |
Bookmarks can be pushed and pulled between repositories (see |
| 1729 |
\%\fBhg help push\fP\: and \%\fBhg help pull\fP\:). If a shared bookmark has |
| 1730 |
diverged, a new \(aqdivergent bookmark\(aq of the form \%\(aqname@path\:\(aq will |
| 1731 |
be created. Using \%\fBhg merge\fP\: will resolve the divergence. |
| 1732 |
.sp |
| 1733 |
Specifying bookmark as \(aq.\(aq to \-m/\-d/\-l options is equivalent to specifying |
| 1734 |
the active bookmark\(aqs name. |
| 1735 |
.sp |
| 1736 |
A bookmark named \(aq@\(aq has the special property that \%\fBhg clone\fP\: will |
| 1737 |
check it out by default if it exists. |
| 1738 |
.sp |
| 1739 |
Template: |
| 1740 |
.sp |
| 1741 |
The following keywords are supported in addition to the common template |
| 1742 |
keywords and functions such as \fB{bookmark}\fP. See also |
| 1743 |
\%\fBhg help templates\fP\:. |
| 1744 |
.INDENT 0.0 |
| 1745 |
.TP |
| 1746 |
.B active |
| 1747 |
. |
| 1748 |
Boolean. True if the bookmark is active. |
| 1749 |
.UNINDENT |
| 1750 |
.sp |
| 1751 |
Examples: |
| 1752 |
.INDENT 0.0 |
| 1753 |
.IP \(bu 2 |
| 1754 |
. |
| 1755 |
create an active bookmark for a new line of development: |
| 1756 |
.sp |
| 1757 |
.nf |
| 1758 |
.ft C |
| 1759 |
hg book new\-feature |
| 1760 |
.ft P |
| 1761 |
.fi |
| 1762 |
.IP \(bu 2 |
| 1763 |
. |
| 1764 |
create an inactive bookmark as a place marker: |
| 1765 |
.sp |
| 1766 |
.nf |
| 1767 |
.ft C |
| 1768 |
hg book \-i reviewed |
| 1769 |
.ft P |
| 1770 |
.fi |
| 1771 |
.IP \(bu 2 |
| 1772 |
. |
| 1773 |
create an inactive bookmark on another changeset: |
| 1774 |
.sp |
| 1775 |
.nf |
| 1776 |
.ft C |
| 1777 |
hg book \-r .^ tested |
| 1778 |
.ft P |
| 1779 |
.fi |
| 1780 |
.IP \(bu 2 |
| 1781 |
. |
| 1782 |
rename bookmark turkey to dinner: |
| 1783 |
.sp |
| 1784 |
.nf |
| 1785 |
.ft C |
| 1786 |
hg book \-m turkey dinner |
| 1787 |
.ft P |
| 1788 |
.fi |
| 1789 |
.IP \(bu 2 |
| 1790 |
. |
| 1791 |
move the \(aq@\(aq bookmark from another branch: |
| 1792 |
.sp |
| 1793 |
.nf |
| 1794 |
.ft C |
| 1795 |
hg book \-f @ |
| 1796 |
.ft P |
| 1797 |
.fi |
| 1798 |
.IP \(bu 2 |
| 1799 |
. |
| 1800 |
print only the active bookmark name: |
| 1801 |
.sp |
| 1802 |
.nf |
| 1803 |
.ft C |
| 1804 |
hg book \-ql . |
| 1805 |
.ft P |
| 1806 |
.fi |
| 1807 |
.UNINDENT |
| 1808 |
.sp |
| 1809 |
Options: |
| 1810 |
.INDENT 0.0 |
| 1811 |
.TP |
| 1812 |
.B \-f, \-\-force |
| 1813 |
. |
| 1814 |
force |
| 1815 |
.TP |
| 1816 |
.BI \-r, \-\-rev \ <REV> |
| 1817 |
. |
| 1818 |
revision for bookmark action |
| 1819 |
.TP |
| 1820 |
.B \-d, \-\-delete |
| 1821 |
. |
| 1822 |
delete a given bookmark |
| 1823 |
.TP |
| 1824 |
.BI \-m, \-\-rename \ <OLD> |
| 1825 |
. |
| 1826 |
rename a given bookmark |
| 1827 |
.TP |
| 1828 |
.B \-i, \-\-inactive |
| 1829 |
. |
| 1830 |
mark a bookmark inactive |
| 1831 |
.TP |
| 1832 |
.B \-l, \-\-list |
| 1833 |
. |
| 1834 |
list existing bookmarks |
| 1835 |
.TP |
| 1836 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 1837 |
. |
| 1838 |
display with template |
| 1839 |
.UNINDENT |
| 1840 |
.\" |
| 1841 |
. |
| 1842 |
.INDENT 0.0 |
| 1843 |
.INDENT 3.5 |
| 1844 |
.sp |
| 1845 |
aliases: bookmark |
| 1846 |
.UNINDENT |
| 1847 |
.UNINDENT |
| 1848 |
.SS branch |
| 1849 |
.sp |
| 1850 |
set or show the current branch name: |
| 1851 |
.sp |
| 1852 |
.nf |
| 1853 |
.ft C |
| 1854 |
hg branch [\-fC] [NAME] |
| 1855 |
.ft P |
| 1856 |
.fi |
| 1857 |
.IP Note |
| 1858 |
. |
| 1859 |
Branch names are permanent and global. Use \%\fBhg bookmark\fP\: to create a |
| 1860 |
light\-weight bookmark instead. See \%\fBhg help glossary\fP\: for more |
| 1861 |
information about named branches and bookmarks. |
| 1862 |
.RE |
| 1863 |
.sp |
| 1864 |
With no argument, show the current branch name. With one argument, |
| 1865 |
set the working directory branch name (the branch will not exist |
| 1866 |
in the repository until the next commit). Standard practice |
| 1867 |
recommends that primary development take place on the \(aqdefault\(aq |
| 1868 |
branch. |
| 1869 |
.sp |
| 1870 |
Unless \-f/\-\-force is specified, branch will not let you set a |
| 1871 |
branch name that already exists. |
| 1872 |
.sp |
| 1873 |
Use \-C/\-\-clean to reset the working directory branch to that of |
| 1874 |
the parent of the working directory, negating a previous branch |
| 1875 |
change. |
| 1876 |
.sp |
| 1877 |
Use the command \%\fBhg update\fP\: to switch to an existing branch. Use |
| 1878 |
\%\fBhg commit \-\-close\-branch\fP\: to mark this branch head as closed. |
| 1879 |
When all heads of a branch are closed, the branch will be |
| 1880 |
considered closed. |
| 1881 |
.sp |
| 1882 |
Returns 0 on success. |
| 1883 |
.sp |
| 1884 |
Options: |
| 1885 |
.INDENT 0.0 |
| 1886 |
.TP |
| 1887 |
.B \-f, \-\-force |
| 1888 |
. |
| 1889 |
set branch name even if it shadows an existing branch |
| 1890 |
.TP |
| 1891 |
.B \-C, \-\-clean |
| 1892 |
. |
| 1893 |
reset branch name to parent branch name |
| 1894 |
.TP |
| 1895 |
.BI \-r, \-\-rev \ <VALUE[+]> |
| 1896 |
. |
| 1897 |
change branches of the given revs (EXPERIMENTAL) |
| 1898 |
.UNINDENT |
| 1899 |
.sp |
| 1900 |
[+] marked option can be specified multiple times |
| 1901 |
.SS branches |
| 1902 |
.sp |
| 1903 |
list repository named branches: |
| 1904 |
.sp |
| 1905 |
.nf |
| 1906 |
.ft C |
| 1907 |
hg branches [\-c] |
| 1908 |
.ft P |
| 1909 |
.fi |
| 1910 |
.sp |
| 1911 |
List the repository\(aqs named branches, indicating which ones are |
| 1912 |
inactive. If \-c/\-\-closed is specified, also list branches which have |
| 1913 |
been marked closed (see \%\fBhg commit \-\-close\-branch\fP\:). |
| 1914 |
.sp |
| 1915 |
Use the command \%\fBhg update\fP\: to switch to an existing branch. |
| 1916 |
.sp |
| 1917 |
Template: |
| 1918 |
.sp |
| 1919 |
The following keywords are supported in addition to the common template |
| 1920 |
keywords and functions such as \fB{branch}\fP. See also |
| 1921 |
\%\fBhg help templates\fP\:. |
| 1922 |
.INDENT 0.0 |
| 1923 |
.TP |
| 1924 |
.B active |
| 1925 |
. |
| 1926 |
Boolean. True if the branch is active. |
| 1927 |
.TP |
| 1928 |
.B closed |
| 1929 |
. |
| 1930 |
Boolean. True if the branch is closed. |
| 1931 |
.TP |
| 1932 |
.B current |
| 1933 |
. |
| 1934 |
Boolean. True if it is the current branch. |
| 1935 |
.UNINDENT |
| 1936 |
.sp |
| 1937 |
Returns 0. |
| 1938 |
.sp |
| 1939 |
Options: |
| 1940 |
.INDENT 0.0 |
| 1941 |
.TP |
| 1942 |
.B \-a, \-\-active |
| 1943 |
. |
| 1944 |
show only branches that have unmerged heads (DEPRECATED) |
| 1945 |
.TP |
| 1946 |
.B \-c, \-\-closed |
| 1947 |
. |
| 1948 |
show normal and closed branches |
| 1949 |
.TP |
| 1950 |
.BI \-r, \-\-rev \ <VALUE[+]> |
| 1951 |
. |
| 1952 |
show branch name(s) of the given rev |
| 1953 |
.TP |
| 1954 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 1955 |
. |
| 1956 |
display with template |
| 1957 |
.UNINDENT |
| 1958 |
.sp |
| 1959 |
[+] marked option can be specified multiple times |
| 1960 |
.SS phase |
| 1961 |
.sp |
| 1962 |
set or show the current phase name: |
| 1963 |
.sp |
| 1964 |
.nf |
| 1965 |
.ft C |
| 1966 |
hg phase [\-p|\-d|\-s] [\-f] [\-r] [REV...] |
| 1967 |
.ft P |
| 1968 |
.fi |
| 1969 |
.sp |
| 1970 |
With no argument, show the phase name of the current revision(s). |
| 1971 |
.sp |
| 1972 |
With one of \-p/\-\-public, \-d/\-\-draft or \-s/\-\-secret, change the |
| 1973 |
phase value of the specified revisions. |
| 1974 |
.sp |
| 1975 |
Unless \-f/\-\-force is specified, \%\fBhg phase\fP\: won\(aqt move changesets from a |
| 1976 |
lower phase to a higher phase. Phases are ordered as follows: |
| 1977 |
.sp |
| 1978 |
.nf |
| 1979 |
.ft C |
| 1980 |
public < draft < secret |
| 1981 |
.ft P |
| 1982 |
.fi |
| 1983 |
.sp |
| 1984 |
Returns 0 on success, 1 if some phases could not be changed. |
| 1985 |
.sp |
| 1986 |
(For more information about the phases concept, see \%\fBhg help phases\fP\:.) |
| 1987 |
.sp |
| 1988 |
Options: |
| 1989 |
.INDENT 0.0 |
| 1990 |
.TP |
| 1991 |
.B \-p, \-\-public |
| 1992 |
. |
| 1993 |
set changeset phase to public |
| 1994 |
.TP |
| 1995 |
.B \-d, \-\-draft |
| 1996 |
. |
| 1997 |
set changeset phase to draft |
| 1998 |
.TP |
| 1999 |
.B \-s, \-\-secret |
| 2000 |
. |
| 2001 |
set changeset phase to secret |
| 2002 |
.TP |
| 2003 |
.B \-f, \-\-force |
| 2004 |
. |
| 2005 |
allow to move boundary backward |
| 2006 |
.TP |
| 2007 |
.BI \-r, \-\-rev \ <REV[+]> |
| 2008 |
. |
| 2009 |
target revision |
| 2010 |
.UNINDENT |
| 2011 |
.sp |
| 2012 |
[+] marked option can be specified multiple times |
| 2013 |
.SS tag |
| 2014 |
.sp |
| 2015 |
add one or more tags for the current or given revision: |
| 2016 |
.sp |
| 2017 |
.nf |
| 2018 |
.ft C |
| 2019 |
hg tag [\-f] [\-l] [\-m TEXT] [\-d DATE] [\-u USER] [\-r REV] NAME... |
| 2020 |
.ft P |
| 2021 |
.fi |
| 2022 |
.sp |
| 2023 |
Name a particular revision using <name>. |
| 2024 |
.sp |
| 2025 |
Tags are used to name particular revisions of the repository and are |
| 2026 |
very useful to compare different revisions, to go back to significant |
| 2027 |
earlier versions or to mark branch points as releases, etc. Changing |
| 2028 |
an existing tag is normally disallowed; use \-f/\-\-force to override. |
| 2029 |
.sp |
| 2030 |
If no revision is given, the parent of the working directory is |
| 2031 |
used. |
| 2032 |
.sp |
| 2033 |
To facilitate version control, distribution, and merging of tags, |
| 2034 |
they are stored as a file named ".hgtags" which is managed similarly |
| 2035 |
to other project files and can be hand\-edited if necessary. This |
| 2036 |
also means that tagging creates a new commit. The file |
| 2037 |
".hg/localtags" is used for local tags (not shared among |
| 2038 |
repositories). |
| 2039 |
.sp |
| 2040 |
Tag commits are usually made at the head of a branch. If the parent |
| 2041 |
of the working directory is not a branch head, \%\fBhg tag\fP\: aborts; use |
| 2042 |
\-f/\-\-force to force the tag commit to be based on a non\-head |
| 2043 |
changeset. |
| 2044 |
.sp |
| 2045 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 2046 |
.sp |
| 2047 |
Since tag names have priority over branch names during revision |
| 2048 |
lookup, using an existing branch name as a tag name is discouraged. |
| 2049 |
.sp |
| 2050 |
Returns 0 on success. |
| 2051 |
.sp |
| 2052 |
Options: |
| 2053 |
.INDENT 0.0 |
| 2054 |
.TP |
| 2055 |
.B \-f, \-\-force |
| 2056 |
. |
| 2057 |
force tag |
| 2058 |
.TP |
| 2059 |
.B \-l, \-\-local |
| 2060 |
. |
| 2061 |
make the tag local |
| 2062 |
.TP |
| 2063 |
.BI \-r, \-\-rev \ <REV> |
| 2064 |
. |
| 2065 |
revision to tag |
| 2066 |
.TP |
| 2067 |
.B \-\-remove |
| 2068 |
. |
| 2069 |
remove a tag |
| 2070 |
.TP |
| 2071 |
.B \-e, \-\-edit |
| 2072 |
. |
| 2073 |
invoke editor on commit messages |
| 2074 |
.TP |
| 2075 |
.BI \-m, \-\-message \ <TEXT> |
| 2076 |
. |
| 2077 |
use text as commit message |
| 2078 |
.TP |
| 2079 |
.BI \-d, \-\-date \ <DATE> |
| 2080 |
. |
| 2081 |
record the specified date as commit date |
| 2082 |
.TP |
| 2083 |
.BI \-u, \-\-user \ <USER> |
| 2084 |
. |
| 2085 |
record the specified user as committer |
| 2086 |
.UNINDENT |
| 2087 |
.SS tags |
| 2088 |
.sp |
| 2089 |
list repository tags: |
| 2090 |
.sp |
| 2091 |
.nf |
| 2092 |
.ft C |
| 2093 |
hg tags |
| 2094 |
.ft P |
| 2095 |
.fi |
| 2096 |
.sp |
| 2097 |
This lists both regular and local tags. When the \-v/\-\-verbose |
| 2098 |
switch is used, a third column "local" is printed for local tags. |
| 2099 |
When the \-q/\-\-quiet switch is used, only the tag name is printed. |
| 2100 |
.sp |
| 2101 |
Template: |
| 2102 |
.sp |
| 2103 |
The following keywords are supported in addition to the common template |
| 2104 |
keywords and functions such as \fB{tag}\fP. See also |
| 2105 |
\%\fBhg help templates\fP\:. |
| 2106 |
.INDENT 0.0 |
| 2107 |
.TP |
| 2108 |
.B type |
| 2109 |
. |
| 2110 |
String. \fBlocal\fP for local tags. |
| 2111 |
.UNINDENT |
| 2112 |
.sp |
| 2113 |
Returns 0 on success. |
| 2114 |
.sp |
| 2115 |
Options: |
| 2116 |
.INDENT 0.0 |
| 2117 |
.TP |
| 2118 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 2119 |
. |
| 2120 |
display with template |
| 2121 |
.UNINDENT |
| 2122 |
.SS File content management |
| 2123 |
.SS annotate |
| 2124 |
.sp |
| 2125 |
show changeset information by line for each file: |
| 2126 |
.sp |
| 2127 |
.nf |
| 2128 |
.ft C |
| 2129 |
hg annotate [\-r REV] [\-f] [\-a] [\-u] [\-d] [\-n] [\-c] [\-l] FILE... |
| 2130 |
.ft P |
| 2131 |
.fi |
| 2132 |
.sp |
| 2133 |
List changes in files, showing the revision id responsible for |
| 2134 |
each line. |
| 2135 |
.sp |
| 2136 |
This command is useful for discovering when a change was made and |
| 2137 |
by whom. |
| 2138 |
.sp |
| 2139 |
If you include \-\-file, \-\-user, or \-\-date, the revision number is |
| 2140 |
suppressed unless you also include \-\-number. |
| 2141 |
.sp |
| 2142 |
Without the \-a/\-\-text option, annotate will avoid processing files |
| 2143 |
it detects as binary. With \-a, annotate will annotate the file |
| 2144 |
anyway, although the results will probably be neither useful |
| 2145 |
nor desirable. |
| 2146 |
.sp |
| 2147 |
Use \-L/\-\-line\-range FILE,M:N options to filter the output to the lines |
| 2148 |
from M to N in FILE. This option is incompatible with \-\-no\-follow and |
| 2149 |
cannot be combined with file pattern arguments. When combined with \-\-rev |
| 2150 |
the line ranges refer to the state of the file at the requested revision. |
| 2151 |
.sp |
| 2152 |
Template: |
| 2153 |
.sp |
| 2154 |
The following keywords are supported in addition to the common template |
| 2155 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 2156 |
.INDENT 0.0 |
| 2157 |
.TP |
| 2158 |
.B lines |
| 2159 |
. |
| 2160 |
List of lines with annotation data. |
| 2161 |
.TP |
| 2162 |
.B path |
| 2163 |
. |
| 2164 |
String. Repository\-absolute path of the specified file. |
| 2165 |
.UNINDENT |
| 2166 |
.sp |
| 2167 |
And each entry of \fB{lines}\fP provides the following sub\-keywords in |
| 2168 |
addition to \fB{date}\fP, \fB{node}\fP, \fB{rev}\fP, \fB{user}\fP, etc. |
| 2169 |
.INDENT 0.0 |
| 2170 |
.TP |
| 2171 |
.B line |
| 2172 |
. |
| 2173 |
String. Line content. |
| 2174 |
.TP |
| 2175 |
.B lineno |
| 2176 |
. |
| 2177 |
Integer. Line number at that revision. |
| 2178 |
.TP |
| 2179 |
.B path |
| 2180 |
. |
| 2181 |
String. Repository\-absolute path of the file at that revision. |
| 2182 |
.UNINDENT |
| 2183 |
.sp |
| 2184 |
See \%\fBhg help templates.operators\fP\: for the list expansion syntax. |
| 2185 |
.sp |
| 2186 |
Returns 0 on success. |
| 2187 |
.sp |
| 2188 |
Options: |
| 2189 |
.INDENT 0.0 |
| 2190 |
.TP |
| 2191 |
.BI \-r, \-\-rev \ <REV> |
| 2192 |
. |
| 2193 |
annotate the specified revision |
| 2194 |
.TP |
| 2195 |
.B \-\-follow |
| 2196 |
. |
| 2197 |
follow copies/renames and list the filename (DEPRECATED) |
| 2198 |
.TP |
| 2199 |
.B \-\-no\-follow |
| 2200 |
. |
| 2201 |
don\(aqt follow copies and renames |
| 2202 |
.TP |
| 2203 |
.B \-a, \-\-text |
| 2204 |
. |
| 2205 |
treat all files as text |
| 2206 |
.TP |
| 2207 |
.B \-u, \-\-user |
| 2208 |
. |
| 2209 |
list the author (long with \-v) |
| 2210 |
.TP |
| 2211 |
.B \-f, \-\-file |
| 2212 |
. |
| 2213 |
list the filename |
| 2214 |
.TP |
| 2215 |
.B \-d, \-\-date |
| 2216 |
. |
| 2217 |
list the date (short with \-q) |
| 2218 |
.TP |
| 2219 |
.B \-n, \-\-number |
| 2220 |
. |
| 2221 |
list the revision number (default) |
| 2222 |
.TP |
| 2223 |
.B \-c, \-\-changeset |
| 2224 |
. |
| 2225 |
list the changeset |
| 2226 |
.TP |
| 2227 |
.B \-l, \-\-line\-number |
| 2228 |
. |
| 2229 |
show line number at the first appearance |
| 2230 |
.TP |
| 2231 |
.BI \-\-skip \ <REV[+]> |
| 2232 |
. |
| 2233 |
revset to not display (EXPERIMENTAL) |
| 2234 |
.TP |
| 2235 |
.BI \-L, \-\-line\-range \ <FILE,RANGE[+]> |
| 2236 |
. |
| 2237 |
follow line range of specified file (EXPERIMENTAL) |
| 2238 |
.TP |
| 2239 |
.B \-w, \-\-ignore\-all\-space |
| 2240 |
. |
| 2241 |
ignore white space when comparing lines |
| 2242 |
.TP |
| 2243 |
.B \-b, \-\-ignore\-space\-change |
| 2244 |
. |
| 2245 |
ignore changes in the amount of white space |
| 2246 |
.TP |
| 2247 |
.B \-B, \-\-ignore\-blank\-lines |
| 2248 |
. |
| 2249 |
ignore changes whose lines are all blank |
| 2250 |
.TP |
| 2251 |
.B \-Z, \-\-ignore\-space\-at\-eol |
| 2252 |
. |
| 2253 |
ignore changes in whitespace at EOL |
| 2254 |
.TP |
| 2255 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 2256 |
. |
| 2257 |
include names matching the given patterns |
| 2258 |
.TP |
| 2259 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 2260 |
. |
| 2261 |
exclude names matching the given patterns |
| 2262 |
.TP |
| 2263 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 2264 |
. |
| 2265 |
display with template |
| 2266 |
.UNINDENT |
| 2267 |
.sp |
| 2268 |
[+] marked option can be specified multiple times |
| 2269 |
.\" |
| 2270 |
. |
| 2271 |
.INDENT 0.0 |
| 2272 |
.INDENT 3.5 |
| 2273 |
.sp |
| 2274 |
aliases: blame |
| 2275 |
.UNINDENT |
| 2276 |
.UNINDENT |
| 2277 |
.SS cat |
| 2278 |
.sp |
| 2279 |
output the current or given revision of files: |
| 2280 |
.sp |
| 2281 |
.nf |
| 2282 |
.ft C |
| 2283 |
hg cat [OPTION]... FILE... |
| 2284 |
.ft P |
| 2285 |
.fi |
| 2286 |
.sp |
| 2287 |
Print the specified files as they were at the given revision. If |
| 2288 |
no revision is given, the parent of the working directory is used. |
| 2289 |
.sp |
| 2290 |
Output may be to a file, in which case the name of the file is |
| 2291 |
given using a template string. See \%\fBhg help templates\fP\:. In addition |
| 2292 |
to the common template keywords, the following formatting rules are |
| 2293 |
supported: |
| 2294 |
.INDENT 0.0 |
| 2295 |
.TP |
| 2296 |
.B \fB%%\fP |
| 2297 |
.sp |
| 2298 |
literal "%" character |
| 2299 |
.TP |
| 2300 |
.B \fB%s\fP |
| 2301 |
.sp |
| 2302 |
basename of file being printed |
| 2303 |
.TP |
| 2304 |
.B \fB%d\fP |
| 2305 |
.sp |
| 2306 |
dirname of file being printed, or \(aq.\(aq if in repository root |
| 2307 |
.TP |
| 2308 |
.B \fB%p\fP |
| 2309 |
.sp |
| 2310 |
root\-relative path name of file being printed |
| 2311 |
.TP |
| 2312 |
.B \fB%H\fP |
| 2313 |
.sp |
| 2314 |
changeset hash (40 hexadecimal digits) |
| 2315 |
.TP |
| 2316 |
.B \fB%R\fP |
| 2317 |
.sp |
| 2318 |
changeset revision number |
| 2319 |
.TP |
| 2320 |
.B \fB%h\fP |
| 2321 |
.sp |
| 2322 |
short\-form changeset hash (12 hexadecimal digits) |
| 2323 |
.TP |
| 2324 |
.B \fB%r\fP |
| 2325 |
.sp |
| 2326 |
zero\-padded changeset revision number |
| 2327 |
.TP |
| 2328 |
.B \fB%b\fP |
| 2329 |
.sp |
| 2330 |
basename of the exporting repository |
| 2331 |
.TP |
| 2332 |
.B \fB\e\fP |
| 2333 |
.sp |
| 2334 |
literal "" character |
| 2335 |
.UNINDENT |
| 2336 |
.sp |
| 2337 |
Template: |
| 2338 |
.sp |
| 2339 |
The following keywords are supported in addition to the common template |
| 2340 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 2341 |
.INDENT 0.0 |
| 2342 |
.TP |
| 2343 |
.B data |
| 2344 |
. |
| 2345 |
String. File content. |
| 2346 |
.TP |
| 2347 |
.B path |
| 2348 |
. |
| 2349 |
String. Repository\-absolute path of the file. |
| 2350 |
.UNINDENT |
| 2351 |
.sp |
| 2352 |
Returns 0 on success. |
| 2353 |
.sp |
| 2354 |
Options: |
| 2355 |
.INDENT 0.0 |
| 2356 |
.TP |
| 2357 |
.BI \-o, \-\-output \ <FORMAT> |
| 2358 |
. |
| 2359 |
print output to file with formatted name |
| 2360 |
.TP |
| 2361 |
.BI \-r, \-\-rev \ <REV> |
| 2362 |
. |
| 2363 |
print the given revision |
| 2364 |
.TP |
| 2365 |
.B \-\-decode |
| 2366 |
. |
| 2367 |
apply any matching decode filter |
| 2368 |
.TP |
| 2369 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 2370 |
. |
| 2371 |
include names matching the given patterns |
| 2372 |
.TP |
| 2373 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 2374 |
. |
| 2375 |
exclude names matching the given patterns |
| 2376 |
.TP |
| 2377 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 2378 |
. |
| 2379 |
display with template |
| 2380 |
.UNINDENT |
| 2381 |
.sp |
| 2382 |
[+] marked option can be specified multiple times |
| 2383 |
.SS copy |
| 2384 |
.sp |
| 2385 |
mark files as copied for the next commit: |
| 2386 |
.sp |
| 2387 |
.nf |
| 2388 |
.ft C |
| 2389 |
hg copy [OPTION]... (SOURCE... DEST | \-\-forget DEST...) |
| 2390 |
.ft P |
| 2391 |
.fi |
| 2392 |
.sp |
| 2393 |
Mark dest as having copies of source files. If dest is a |
| 2394 |
directory, copies are put in that directory. If dest is a file, |
| 2395 |
the source must be a single file. |
| 2396 |
.sp |
| 2397 |
By default, this command copies the contents of files as they |
| 2398 |
exist in the working directory. If invoked with \-A/\-\-after, the |
| 2399 |
operation is recorded, but no copying is performed. |
| 2400 |
.sp |
| 2401 |
To undo marking a destination file as copied, use \-\-forget. With that |
| 2402 |
option, all given (positional) arguments are unmarked as copies. The |
| 2403 |
destination file(s) will be left in place (still tracked). Note that |
| 2404 |
\%\fBhg copy \-\-forget\fP\: behaves the same way as \%\fBhg rename \-\-forget\fP\:. |
| 2405 |
.sp |
| 2406 |
This command takes effect with the next commit by default. |
| 2407 |
.sp |
| 2408 |
Returns 0 on success, 1 if errors are encountered. |
| 2409 |
.sp |
| 2410 |
Options: |
| 2411 |
.INDENT 0.0 |
| 2412 |
.TP |
| 2413 |
.B \-\-forget |
| 2414 |
. |
| 2415 |
unmark a destination file as copied |
| 2416 |
.TP |
| 2417 |
.B \-A, \-\-after |
| 2418 |
. |
| 2419 |
record a copy that has already occurred |
| 2420 |
.TP |
| 2421 |
.BI \-\-at\-rev \ <REV> |
| 2422 |
. |
| 2423 |
(un)mark copies in the given revision (EXPERIMENTAL) |
| 2424 |
.TP |
| 2425 |
.B \-f, \-\-force |
| 2426 |
. |
| 2427 |
forcibly copy over an existing managed file |
| 2428 |
.TP |
| 2429 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 2430 |
. |
| 2431 |
include names matching the given patterns |
| 2432 |
.TP |
| 2433 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 2434 |
. |
| 2435 |
exclude names matching the given patterns |
| 2436 |
.TP |
| 2437 |
.B \-n, \-\-dry\-run |
| 2438 |
. |
| 2439 |
do not perform actions, just print output |
| 2440 |
.UNINDENT |
| 2441 |
.sp |
| 2442 |
[+] marked option can be specified multiple times |
| 2443 |
.\" |
| 2444 |
. |
| 2445 |
.INDENT 0.0 |
| 2446 |
.INDENT 3.5 |
| 2447 |
.sp |
| 2448 |
aliases: cp |
| 2449 |
.UNINDENT |
| 2450 |
.UNINDENT |
| 2451 |
.SS diff |
| 2452 |
.sp |
| 2453 |
diff repository (or selected files): |
| 2454 |
.sp |
| 2455 |
.nf |
| 2456 |
.ft C |
| 2457 |
hg diff [OPTION]... ([\-c REV] | [\-\-from REV1] [\-\-to REV2]) [FILE]... |
| 2458 |
.ft P |
| 2459 |
.fi |
| 2460 |
.sp |
| 2461 |
Show differences between revisions for the specified files. |
| 2462 |
.sp |
| 2463 |
Differences between files are shown using the unified diff format. |
| 2464 |
.IP Note |
| 2465 |
. |
| 2466 |
\%\fBhg diff\fP\: may generate unexpected results for merges, as it will |
| 2467 |
default to comparing against the working directory\(aqs first |
| 2468 |
parent changeset if no revisions are specified. To diff against the |
| 2469 |
conflict regions, you can use \fI\-\-config diff.merge=yes\fP. |
| 2470 |
.RE |
| 2471 |
.sp |
| 2472 |
By default, the working directory files are compared to its first parent. To |
| 2473 |
see the differences from another revision, use \-\-from. To see the difference |
| 2474 |
to another revision, use \-\-to. For example, \%\fBhg diff \-\-from .^\fP\: will show |
| 2475 |
the differences from the working copy\(aqs grandparent to the working copy, |
| 2476 |
\%\fBhg diff \-\-to .\fP\: will show the diff from the working copy to its parent |
| 2477 |
(i.e. the reverse of the default), and \%\fBhg diff \-\-from 1.0 \-\-to 1.2\fP\: will |
| 2478 |
show the diff between those two revisions. |
| 2479 |
.sp |
| 2480 |
Alternatively you can specify \-c/\-\-change with a revision to see the changes |
| 2481 |
in that changeset relative to its first parent (i.e. \%\fBhg diff \-c 42\fP\: is |
| 2482 |
equivalent to \%\fBhg diff \-\-from 42^ \-\-to 42\fP\:) |
| 2483 |
.sp |
| 2484 |
Without the \-a/\-\-text option, diff will avoid generating diffs of |
| 2485 |
files it detects as binary. With \-a, diff will generate a diff |
| 2486 |
anyway, probably with undesirable results. |
| 2487 |
.sp |
| 2488 |
Use the \-g/\-\-git option to generate diffs in the git extended diff |
| 2489 |
format. For more information, read \%\fBhg help diffs\fP\:. |
| 2490 |
.sp |
| 2491 |
Examples: |
| 2492 |
.INDENT 0.0 |
| 2493 |
.IP \(bu 2 |
| 2494 |
. |
| 2495 |
compare a file in the current working directory to its parent: |
| 2496 |
.sp |
| 2497 |
.nf |
| 2498 |
.ft C |
| 2499 |
hg diff foo.c |
| 2500 |
.ft P |
| 2501 |
.fi |
| 2502 |
.IP \(bu 2 |
| 2503 |
. |
| 2504 |
compare two historical versions of a directory, with rename info: |
| 2505 |
.sp |
| 2506 |
.nf |
| 2507 |
.ft C |
| 2508 |
hg diff \-\-git \-\-from 1.0 \-\-to 1.2 lib/ |
| 2509 |
.ft P |
| 2510 |
.fi |
| 2511 |
.IP \(bu 2 |
| 2512 |
. |
| 2513 |
get change stats relative to the last change on some date: |
| 2514 |
.sp |
| 2515 |
.nf |
| 2516 |
.ft C |
| 2517 |
hg diff \-\-stat \-\-from "date(\(aqmay 2\(aq)" |
| 2518 |
.ft P |
| 2519 |
.fi |
| 2520 |
.IP \(bu 2 |
| 2521 |
. |
| 2522 |
diff all newly\-added files that contain a keyword: |
| 2523 |
.sp |
| 2524 |
.nf |
| 2525 |
.ft C |
| 2526 |
hg diff "set:added() and grep(GNU)" |
| 2527 |
.ft P |
| 2528 |
.fi |
| 2529 |
.IP \(bu 2 |
| 2530 |
. |
| 2531 |
compare a revision and its parents: |
| 2532 |
.sp |
| 2533 |
.nf |
| 2534 |
.ft C |
| 2535 |
hg diff \-c 9353 # compare against first parent |
| 2536 |
hg diff \-\-from 9353^ \-\-to 9353 # same using revset syntax |
| 2537 |
hg diff \-\-from 9353^2 \-\-to 9353 # compare against the second parent |
| 2538 |
.ft P |
| 2539 |
.fi |
| 2540 |
.UNINDENT |
| 2541 |
.sp |
| 2542 |
Returns 0 on success. |
| 2543 |
.sp |
| 2544 |
Options: |
| 2545 |
.INDENT 0.0 |
| 2546 |
.TP |
| 2547 |
.BI \-r, \-\-rev \ <REV[+]> |
| 2548 |
. |
| 2549 |
revision (DEPRECATED) |
| 2550 |
.TP |
| 2551 |
.BI \-\-from \ <REV1> |
| 2552 |
. |
| 2553 |
revision to diff from |
| 2554 |
.TP |
| 2555 |
.BI \-\-to \ <REV2> |
| 2556 |
. |
| 2557 |
revision to diff to |
| 2558 |
.TP |
| 2559 |
.BI \-c, \-\-change \ <REV> |
| 2560 |
. |
| 2561 |
change made by revision |
| 2562 |
.TP |
| 2563 |
.B \-\-ignore\-changes\-from\-ancestors |
| 2564 |
. |
| 2565 |
only compare the change made by the selected revision (EXPERIMENTAL) |
| 2566 |
.TP |
| 2567 |
.B \-a, \-\-text |
| 2568 |
. |
| 2569 |
treat all files as text |
| 2570 |
.TP |
| 2571 |
.B \-g, \-\-git |
| 2572 |
. |
| 2573 |
use git extended diff format (DEFAULT: diff.git) |
| 2574 |
.TP |
| 2575 |
.B \-\-binary |
| 2576 |
. |
| 2577 |
generate binary diffs in git mode (default) |
| 2578 |
.TP |
| 2579 |
.B \-\-nodates |
| 2580 |
. |
| 2581 |
omit dates from diff headers |
| 2582 |
.TP |
| 2583 |
.B \-\-noprefix |
| 2584 |
. |
| 2585 |
omit a/ and b/ prefixes from filenames |
| 2586 |
.TP |
| 2587 |
.B \-p, \-\-show\-function |
| 2588 |
. |
| 2589 |
show which function each change is in (DEFAULT: diff.showfunc) |
| 2590 |
.TP |
| 2591 |
.B \-\-reverse |
| 2592 |
. |
| 2593 |
produce a diff that undoes the changes |
| 2594 |
.TP |
| 2595 |
.B \-w, \-\-ignore\-all\-space |
| 2596 |
. |
| 2597 |
ignore white space when comparing lines |
| 2598 |
.TP |
| 2599 |
.B \-b, \-\-ignore\-space\-change |
| 2600 |
. |
| 2601 |
ignore changes in the amount of white space |
| 2602 |
.TP |
| 2603 |
.B \-B, \-\-ignore\-blank\-lines |
| 2604 |
. |
| 2605 |
ignore changes whose lines are all blank |
| 2606 |
.TP |
| 2607 |
.B \-Z, \-\-ignore\-space\-at\-eol |
| 2608 |
. |
| 2609 |
ignore changes in whitespace at EOL |
| 2610 |
.TP |
| 2611 |
.BI \-U, \-\-unified \ <NUM> |
| 2612 |
. |
| 2613 |
number of lines of context to show |
| 2614 |
.TP |
| 2615 |
.B \-\-stat |
| 2616 |
. |
| 2617 |
output diffstat\-style summary of changes |
| 2618 |
.TP |
| 2619 |
.BI \-\-root \ <DIR> |
| 2620 |
. |
| 2621 |
produce diffs relative to subdirectory |
| 2622 |
.TP |
| 2623 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 2624 |
. |
| 2625 |
include names matching the given patterns |
| 2626 |
.TP |
| 2627 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 2628 |
. |
| 2629 |
exclude names matching the given patterns |
| 2630 |
.TP |
| 2631 |
.B \-S, \-\-subrepos |
| 2632 |
. |
| 2633 |
recurse into subrepositories |
| 2634 |
.UNINDENT |
| 2635 |
.sp |
| 2636 |
[+] marked option can be specified multiple times |
| 2637 |
.SS grep |
| 2638 |
.sp |
| 2639 |
search for a pattern in specified files: |
| 2640 |
.sp |
| 2641 |
.nf |
| 2642 |
.ft C |
| 2643 |
hg grep [\-\-diff] [OPTION]... PATTERN [FILE]... |
| 2644 |
.ft P |
| 2645 |
.fi |
| 2646 |
.sp |
| 2647 |
Search the working directory or revision history for a regular |
| 2648 |
expression in the specified files for the entire repository. |
| 2649 |
.sp |
| 2650 |
By default, grep searches the repository files in the working |
| 2651 |
directory and prints the files where it finds a match. To specify |
| 2652 |
historical revisions instead of the working directory, use the |
| 2653 |
\-\-rev flag. |
| 2654 |
.sp |
| 2655 |
To search instead historical revision differences that contains a |
| 2656 |
change in match status ("\-" for a match that becomes a non\-match, |
| 2657 |
or "+" for a non\-match that becomes a match), use the \-\-diff flag. |
| 2658 |
.sp |
| 2659 |
PATTERN can be any Python (roughly Perl\-compatible) regular |
| 2660 |
expression. |
| 2661 |
.sp |
| 2662 |
If no FILEs are specified and the \-\-rev flag isn\(aqt supplied, all |
| 2663 |
files in the working directory are searched. When using the \-\-rev |
| 2664 |
flag and specifying FILEs, use the \-\-follow argument to also |
| 2665 |
follow the specified FILEs across renames and copies. |
| 2666 |
.sp |
| 2667 |
Template: |
| 2668 |
.sp |
| 2669 |
The following keywords are supported in addition to the common template |
| 2670 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 2671 |
.INDENT 0.0 |
| 2672 |
.TP |
| 2673 |
.B change |
| 2674 |
. |
| 2675 |
String. Character denoting insertion \fB+\fP or removal \fB\-\fP. |
| 2676 |
Available if \fB\-\-diff\fP is specified. |
| 2677 |
.TP |
| 2678 |
.B lineno |
| 2679 |
. |
| 2680 |
Integer. Line number of the match. |
| 2681 |
.TP |
| 2682 |
.B path |
| 2683 |
. |
| 2684 |
String. Repository\-absolute path of the file. |
| 2685 |
.TP |
| 2686 |
.B texts |
| 2687 |
. |
| 2688 |
List of text chunks. |
| 2689 |
.UNINDENT |
| 2690 |
.sp |
| 2691 |
And each entry of \fB{texts}\fP provides the following sub\-keywords. |
| 2692 |
.INDENT 0.0 |
| 2693 |
.TP |
| 2694 |
.B matched |
| 2695 |
. |
| 2696 |
Boolean. True if the chunk matches the specified pattern. |
| 2697 |
.TP |
| 2698 |
.B text |
| 2699 |
. |
| 2700 |
String. Chunk content. |
| 2701 |
.UNINDENT |
| 2702 |
.sp |
| 2703 |
See \%\fBhg help templates.operators\fP\: for the list expansion syntax. |
| 2704 |
.sp |
| 2705 |
Returns 0 if a match is found, 1 otherwise. |
| 2706 |
.sp |
| 2707 |
Options: |
| 2708 |
.INDENT 0.0 |
| 2709 |
.TP |
| 2710 |
.B \-0, \-\-print0 |
| 2711 |
. |
| 2712 |
end fields with NUL |
| 2713 |
.TP |
| 2714 |
.B \-\-all |
| 2715 |
. |
| 2716 |
an alias to \-\-diff (DEPRECATED) |
| 2717 |
.TP |
| 2718 |
.B \-\-diff |
| 2719 |
. |
| 2720 |
search revision differences for when the pattern was added or removed |
| 2721 |
.TP |
| 2722 |
.B \-a, \-\-text |
| 2723 |
. |
| 2724 |
treat all files as text |
| 2725 |
.TP |
| 2726 |
.B \-f, \-\-follow |
| 2727 |
. |
| 2728 |
follow changeset history, or file history across copies and renames |
| 2729 |
.TP |
| 2730 |
.B \-i, \-\-ignore\-case |
| 2731 |
. |
| 2732 |
ignore case when matching |
| 2733 |
.TP |
| 2734 |
.B \-l, \-\-files\-with\-matches |
| 2735 |
. |
| 2736 |
print only filenames and revisions that match |
| 2737 |
.TP |
| 2738 |
.B \-n, \-\-line\-number |
| 2739 |
. |
| 2740 |
print matching line numbers |
| 2741 |
.TP |
| 2742 |
.BI \-r, \-\-rev \ <REV[+]> |
| 2743 |
. |
| 2744 |
search files changed within revision range |
| 2745 |
.TP |
| 2746 |
.B \-\-all\-files |
| 2747 |
. |
| 2748 |
include all files in the changeset while grepping (DEPRECATED) |
| 2749 |
.TP |
| 2750 |
.B \-u, \-\-user |
| 2751 |
. |
| 2752 |
list the author (long with \-v) |
| 2753 |
.TP |
| 2754 |
.B \-d, \-\-date |
| 2755 |
. |
| 2756 |
list the date (short with \-q) |
| 2757 |
.TP |
| 2758 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 2759 |
. |
| 2760 |
display with template |
| 2761 |
.TP |
| 2762 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 2763 |
. |
| 2764 |
include names matching the given patterns |
| 2765 |
.TP |
| 2766 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 2767 |
. |
| 2768 |
exclude names matching the given patterns |
| 2769 |
.UNINDENT |
| 2770 |
.sp |
| 2771 |
[+] marked option can be specified multiple times |
| 2772 |
.SS Change navigation |
| 2773 |
.SS bisect |
| 2774 |
.sp |
| 2775 |
subdivision search of changesets: |
| 2776 |
.sp |
| 2777 |
.nf |
| 2778 |
.ft C |
| 2779 |
hg bisect [\-gbsr] [\-U] [\-c CMD] [REV] |
| 2780 |
.ft P |
| 2781 |
.fi |
| 2782 |
.sp |
| 2783 |
This command helps to find changesets which introduce problems. To |
| 2784 |
use, mark the earliest changeset you know exhibits the problem as |
| 2785 |
bad, then mark the latest changeset which is free from the problem |
| 2786 |
as good. Bisect will update your working directory to a revision |
| 2787 |
for testing (unless the \-U/\-\-noupdate option is specified). Once |
| 2788 |
you have performed tests, mark the working directory as good or |
| 2789 |
bad, and bisect will either update to another candidate changeset |
| 2790 |
or announce that it has found the bad revision. |
| 2791 |
.sp |
| 2792 |
As a shortcut, you can also use the revision argument to mark a |
| 2793 |
revision as good or bad without checking it out first. |
| 2794 |
.sp |
| 2795 |
If you supply a command, it will be used for automatic bisection. |
| 2796 |
The environment variable HG_NODE will contain the ID of the |
| 2797 |
changeset being tested. The exit status of the command will be |
| 2798 |
used to mark revisions as good or bad: status 0 means good, 125 |
| 2799 |
means to skip the revision, 127 (command not found) will abort the |
| 2800 |
bisection, and any other non\-zero exit status means the revision |
| 2801 |
is bad. |
| 2802 |
.sp |
| 2803 |
Some examples: |
| 2804 |
.INDENT 0.0 |
| 2805 |
.IP \(bu 2 |
| 2806 |
. |
| 2807 |
start a bisection with known bad revision 34, and good revision 12: |
| 2808 |
.sp |
| 2809 |
.nf |
| 2810 |
.ft C |
| 2811 |
hg bisect \-\-bad 34 |
| 2812 |
hg bisect \-\-good 12 |
| 2813 |
.ft P |
| 2814 |
.fi |
| 2815 |
.IP \(bu 2 |
| 2816 |
. |
| 2817 |
advance the current bisection by marking current revision as good or |
| 2818 |
bad: |
| 2819 |
.sp |
| 2820 |
.nf |
| 2821 |
.ft C |
| 2822 |
hg bisect \-\-good |
| 2823 |
hg bisect \-\-bad |
| 2824 |
.ft P |
| 2825 |
.fi |
| 2826 |
.IP \(bu 2 |
| 2827 |
. |
| 2828 |
mark the current revision, or a known revision, to be skipped (e.g. if |
| 2829 |
that revision is not usable because of another issue): |
| 2830 |
.sp |
| 2831 |
.nf |
| 2832 |
.ft C |
| 2833 |
hg bisect \-\-skip |
| 2834 |
hg bisect \-\-skip 23 |
| 2835 |
.ft P |
| 2836 |
.fi |
| 2837 |
.IP \(bu 2 |
| 2838 |
. |
| 2839 |
skip all revisions that do not touch directories \fBfoo\fP or \fBbar\fP: |
| 2840 |
.sp |
| 2841 |
.nf |
| 2842 |
.ft C |
| 2843 |
hg bisect \-\-skip "!( file(\(aqpath:foo\(aq) & file(\(aqpath:bar\(aq) )" |
| 2844 |
.ft P |
| 2845 |
.fi |
| 2846 |
.IP \(bu 2 |
| 2847 |
. |
| 2848 |
forget the current bisection: |
| 2849 |
.sp |
| 2850 |
.nf |
| 2851 |
.ft C |
| 2852 |
hg bisect \-\-reset |
| 2853 |
.ft P |
| 2854 |
.fi |
| 2855 |
.IP \(bu 2 |
| 2856 |
. |
| 2857 |
use \(aqmake && make tests\(aq to automatically find the first broken |
| 2858 |
revision: |
| 2859 |
.sp |
| 2860 |
.nf |
| 2861 |
.ft C |
| 2862 |
hg bisect \-\-reset |
| 2863 |
hg bisect \-\-bad 34 |
| 2864 |
hg bisect \-\-good 12 |
| 2865 |
hg bisect \-\-command "make && make tests" |
| 2866 |
.ft P |
| 2867 |
.fi |
| 2868 |
.IP \(bu 2 |
| 2869 |
. |
| 2870 |
see all changesets whose states are already known in the current |
| 2871 |
bisection: |
| 2872 |
.sp |
| 2873 |
.nf |
| 2874 |
.ft C |
| 2875 |
hg log \-r "bisect(pruned)" |
| 2876 |
.ft P |
| 2877 |
.fi |
| 2878 |
.IP \(bu 2 |
| 2879 |
. |
| 2880 |
see the changeset currently being bisected (especially useful |
| 2881 |
if running with \-U/\-\-noupdate): |
| 2882 |
.sp |
| 2883 |
.nf |
| 2884 |
.ft C |
| 2885 |
hg log \-r "bisect(current)" |
| 2886 |
.ft P |
| 2887 |
.fi |
| 2888 |
.IP \(bu 2 |
| 2889 |
. |
| 2890 |
see all changesets that took part in the current bisection: |
| 2891 |
.sp |
| 2892 |
.nf |
| 2893 |
.ft C |
| 2894 |
hg log \-r "bisect(range)" |
| 2895 |
.ft P |
| 2896 |
.fi |
| 2897 |
.IP \(bu 2 |
| 2898 |
. |
| 2899 |
you can even get a nice graph: |
| 2900 |
.sp |
| 2901 |
.nf |
| 2902 |
.ft C |
| 2903 |
hg log \-\-graph \-r "bisect(range)" |
| 2904 |
.ft P |
| 2905 |
.fi |
| 2906 |
.UNINDENT |
| 2907 |
.sp |
| 2908 |
See \%\fBhg help revisions.bisect\fP\: for more about the \fIbisect()\fP predicate. |
| 2909 |
.sp |
| 2910 |
Returns 0 on success. |
| 2911 |
.sp |
| 2912 |
Options: |
| 2913 |
.INDENT 0.0 |
| 2914 |
.TP |
| 2915 |
.B \-r, \-\-reset |
| 2916 |
. |
| 2917 |
reset bisect state |
| 2918 |
.TP |
| 2919 |
.B \-g, \-\-good |
| 2920 |
. |
| 2921 |
mark changeset good |
| 2922 |
.TP |
| 2923 |
.B \-b, \-\-bad |
| 2924 |
. |
| 2925 |
mark changeset bad |
| 2926 |
.TP |
| 2927 |
.B \-s, \-\-skip |
| 2928 |
. |
| 2929 |
skip testing changeset |
| 2930 |
.TP |
| 2931 |
.B \-e, \-\-extend |
| 2932 |
. |
| 2933 |
extend the bisect range |
| 2934 |
.TP |
| 2935 |
.BI \-c, \-\-command \ <CMD> |
| 2936 |
. |
| 2937 |
use command to check changeset state |
| 2938 |
.TP |
| 2939 |
.B \-U, \-\-noupdate |
| 2940 |
. |
| 2941 |
do not update to target |
| 2942 |
.UNINDENT |
| 2943 |
.SS heads |
| 2944 |
.sp |
| 2945 |
show branch heads: |
| 2946 |
.sp |
| 2947 |
.nf |
| 2948 |
.ft C |
| 2949 |
hg heads [\-ct] [\-r STARTREV] [REV]... |
| 2950 |
.ft P |
| 2951 |
.fi |
| 2952 |
.sp |
| 2953 |
With no arguments, show all open branch heads in the repository. |
| 2954 |
Branch heads are changesets that have no descendants on the |
| 2955 |
same branch. They are where development generally takes place and |
| 2956 |
are the usual targets for update and merge operations. |
| 2957 |
.sp |
| 2958 |
If one or more REVs are given, only open branch heads on the |
| 2959 |
branches associated with the specified changesets are shown. This |
| 2960 |
means that you can use \%\fBhg heads .\fP\: to see the heads on the |
| 2961 |
currently checked\-out branch. |
| 2962 |
.sp |
| 2963 |
If \-c/\-\-closed is specified, also show branch heads marked closed |
| 2964 |
(see \%\fBhg commit \-\-close\-branch\fP\:). |
| 2965 |
.sp |
| 2966 |
If STARTREV is specified, only those heads that are descendants of |
| 2967 |
STARTREV will be displayed. |
| 2968 |
.sp |
| 2969 |
If \-t/\-\-topo is specified, named branch mechanics will be ignored and only |
| 2970 |
topological heads (changesets with no children) will be shown. |
| 2971 |
.sp |
| 2972 |
Returns 0 if matching heads are found, 1 if not. |
| 2973 |
.sp |
| 2974 |
Options: |
| 2975 |
.INDENT 0.0 |
| 2976 |
.TP |
| 2977 |
.BI \-r, \-\-rev \ <STARTREV> |
| 2978 |
. |
| 2979 |
show only heads which are descendants of STARTREV |
| 2980 |
.TP |
| 2981 |
.B \-t, \-\-topo |
| 2982 |
. |
| 2983 |
show topological heads only |
| 2984 |
.TP |
| 2985 |
.B \-a, \-\-active |
| 2986 |
. |
| 2987 |
show active branchheads only (DEPRECATED) |
| 2988 |
.TP |
| 2989 |
.B \-c, \-\-closed |
| 2990 |
. |
| 2991 |
show normal and closed branch heads |
| 2992 |
.TP |
| 2993 |
.BI \-\-style \ <STYLE> |
| 2994 |
. |
| 2995 |
display using template map file (DEPRECATED) |
| 2996 |
.TP |
| 2997 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 2998 |
. |
| 2999 |
display with template |
| 3000 |
.UNINDENT |
| 3001 |
.SS identify |
| 3002 |
.sp |
| 3003 |
identify the working directory or specified revision: |
| 3004 |
.sp |
| 3005 |
.nf |
| 3006 |
.ft C |
| 3007 |
hg identify [\-nibtB] [\-r REV] [SOURCE] |
| 3008 |
.ft P |
| 3009 |
.fi |
| 3010 |
.sp |
| 3011 |
Print a summary identifying the repository state at REV using one or |
| 3012 |
two parent hash identifiers, followed by a "+" if the working |
| 3013 |
directory has uncommitted changes, the branch name (if not default), |
| 3014 |
a list of tags, and a list of bookmarks. |
| 3015 |
.sp |
| 3016 |
When REV is not given, print a summary of the current state of the |
| 3017 |
repository including the working directory. Specify \-r. to get information |
| 3018 |
of the working directory parent without scanning uncommitted changes. |
| 3019 |
.sp |
| 3020 |
Specifying a path to a repository root or Mercurial bundle will |
| 3021 |
cause lookup to operate on that repository/bundle. |
| 3022 |
.sp |
| 3023 |
Template: |
| 3024 |
.sp |
| 3025 |
The following keywords are supported in addition to the common template |
| 3026 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 3027 |
.INDENT 0.0 |
| 3028 |
.TP |
| 3029 |
.B dirty |
| 3030 |
. |
| 3031 |
String. Character \fB+\fP denoting if the working directory has |
| 3032 |
uncommitted changes. |
| 3033 |
.TP |
| 3034 |
.B id |
| 3035 |
. |
| 3036 |
String. One or two nodes, optionally followed by \fB+\fP. |
| 3037 |
.TP |
| 3038 |
.B parents |
| 3039 |
. |
| 3040 |
List of strings. Parent nodes of the changeset. |
| 3041 |
.UNINDENT |
| 3042 |
.sp |
| 3043 |
Examples: |
| 3044 |
.INDENT 0.0 |
| 3045 |
.IP \(bu 2 |
| 3046 |
. |
| 3047 |
generate a build identifier for the working directory: |
| 3048 |
.sp |
| 3049 |
.nf |
| 3050 |
.ft C |
| 3051 |
hg id \-\-id > build\-id.dat |
| 3052 |
.ft P |
| 3053 |
.fi |
| 3054 |
.IP \(bu 2 |
| 3055 |
. |
| 3056 |
find the revision corresponding to a tag: |
| 3057 |
.sp |
| 3058 |
.nf |
| 3059 |
.ft C |
| 3060 |
hg id \-n \-r 1.3 |
| 3061 |
.ft P |
| 3062 |
.fi |
| 3063 |
.IP \(bu 2 |
| 3064 |
. |
| 3065 |
check the most recent revision of a remote repository: |
| 3066 |
.sp |
| 3067 |
.nf |
| 3068 |
.ft C |
| 3069 |
hg id \-r tip https://www.mercurial\-scm.org/repo/hg/ |
| 3070 |
.ft P |
| 3071 |
.fi |
| 3072 |
.UNINDENT |
| 3073 |
.sp |
| 3074 |
See \%\fBhg log\fP\: for generating more information about specific revisions, |
| 3075 |
including full hash identifiers. |
| 3076 |
.sp |
| 3077 |
Returns 0 if successful. |
| 3078 |
.sp |
| 3079 |
Options: |
| 3080 |
.INDENT 0.0 |
| 3081 |
.TP |
| 3082 |
.BI \-r, \-\-rev \ <REV> |
| 3083 |
. |
| 3084 |
identify the specified revision |
| 3085 |
.TP |
| 3086 |
.B \-n, \-\-num |
| 3087 |
. |
| 3088 |
show local revision number |
| 3089 |
.TP |
| 3090 |
.B \-i, \-\-id |
| 3091 |
. |
| 3092 |
show global revision id |
| 3093 |
.TP |
| 3094 |
.B \-b, \-\-branch |
| 3095 |
. |
| 3096 |
show branch |
| 3097 |
.TP |
| 3098 |
.B \-t, \-\-tags |
| 3099 |
. |
| 3100 |
show tags |
| 3101 |
.TP |
| 3102 |
.B \-B, \-\-bookmarks |
| 3103 |
. |
| 3104 |
show bookmarks |
| 3105 |
.TP |
| 3106 |
.BI \-e, \-\-ssh \ <CMD> |
| 3107 |
. |
| 3108 |
specify ssh command to use |
| 3109 |
.TP |
| 3110 |
.BI \-\-remotecmd \ <CMD> |
| 3111 |
. |
| 3112 |
specify hg command to run on the remote side |
| 3113 |
.TP |
| 3114 |
.B \-\-insecure |
| 3115 |
. |
| 3116 |
do not verify server certificate (ignoring web.cacerts config) |
| 3117 |
.TP |
| 3118 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 3119 |
. |
| 3120 |
display with template |
| 3121 |
.UNINDENT |
| 3122 |
.\" |
| 3123 |
. |
| 3124 |
.INDENT 0.0 |
| 3125 |
.INDENT 3.5 |
| 3126 |
.sp |
| 3127 |
aliases: id |
| 3128 |
.UNINDENT |
| 3129 |
.UNINDENT |
| 3130 |
.SS log |
| 3131 |
.sp |
| 3132 |
show revision history of entire repository or files: |
| 3133 |
.sp |
| 3134 |
.nf |
| 3135 |
.ft C |
| 3136 |
hg log [OPTION]... [FILE] |
| 3137 |
.ft P |
| 3138 |
.fi |
| 3139 |
.sp |
| 3140 |
Print the revision history of the specified files or the entire |
| 3141 |
project. |
| 3142 |
.sp |
| 3143 |
If no revision range is specified, the default is \fBtip:0\fP unless |
| 3144 |
\-\-follow is set. |
| 3145 |
.sp |
| 3146 |
File history is shown without following rename or copy history of |
| 3147 |
files. Use \-f/\-\-follow with a filename to follow history across |
| 3148 |
renames and copies. \-\-follow without a filename will only show |
| 3149 |
ancestors of the starting revisions. The starting revisions can be |
| 3150 |
specified by \-r/\-\-rev, which default to the working directory parent. |
| 3151 |
.sp |
| 3152 |
By default this command prints revision number and changeset id, |
| 3153 |
tags, non\-trivial parents, user, date and time, and a summary for |
| 3154 |
each commit. When the \-v/\-\-verbose switch is used, the list of |
| 3155 |
changed files and full commit message are shown. |
| 3156 |
.sp |
| 3157 |
With \-\-graph the revisions are shown as an ASCII art DAG with the most |
| 3158 |
recent changeset at the top. |
| 3159 |
\(aqo\(aq is a changeset, \(aq@\(aq is a working directory parent, \(aq%\(aq is a changeset |
| 3160 |
involved in an unresolved merge conflict, \(aq_\(aq closes a branch, |
| 3161 |
\(aqx\(aq is obsolete, \(aq*\(aq is unstable, and \(aq+\(aq represents a fork where the |
| 3162 |
changeset from the lines below is a parent of the \(aqo\(aq merge on the same |
| 3163 |
line. |
| 3164 |
Paths in the DAG are represented with \(aq|\(aq, \(aq/\(aq and so forth. \(aq:\(aq in place |
| 3165 |
of a \(aq|\(aq indicates one or more revisions in a path are omitted. |
| 3166 |
.sp |
| 3167 |
Use \-L/\-\-line\-range FILE,M:N options to follow the history of lines |
| 3168 |
from M to N in FILE. With \-p/\-\-patch only diff hunks affecting |
| 3169 |
specified line range will be shown. This option requires \-\-follow; |
| 3170 |
it can be specified multiple times. Currently, this option is not |
| 3171 |
compatible with \-\-graph. This option is experimental. |
| 3172 |
.IP Note |
| 3173 |
. |
| 3174 |
\%\fBhg log \-\-patch\fP\: may generate unexpected diff output for merge |
| 3175 |
changesets, as it will only compare the merge changeset against |
| 3176 |
its first parent. Also, only files different from BOTH parents |
| 3177 |
will appear in files:. |
| 3178 |
.RE |
| 3179 |
.IP Note |
| 3180 |
. |
| 3181 |
For performance reasons, \%\fBhg log FILE\fP\: may omit duplicate changes |
| 3182 |
made on branches and will not show removals or mode changes. To |
| 3183 |
see all such changes, use the \-\-removed switch. |
| 3184 |
.RE |
| 3185 |
.IP Note |
| 3186 |
. |
| 3187 |
The history resulting from \-L/\-\-line\-range options depends on diff |
| 3188 |
options; for instance if white\-spaces are ignored, respective changes |
| 3189 |
with only white\-spaces in specified line range will not be listed. |
| 3190 |
.RE |
| 3191 |
.sp |
| 3192 |
Some examples: |
| 3193 |
.INDENT 0.0 |
| 3194 |
.IP \(bu 2 |
| 3195 |
. |
| 3196 |
changesets with full descriptions and file lists: |
| 3197 |
.sp |
| 3198 |
.nf |
| 3199 |
.ft C |
| 3200 |
hg log \-v |
| 3201 |
.ft P |
| 3202 |
.fi |
| 3203 |
.IP \(bu 2 |
| 3204 |
. |
| 3205 |
changesets ancestral to the working directory: |
| 3206 |
.sp |
| 3207 |
.nf |
| 3208 |
.ft C |
| 3209 |
hg log \-f |
| 3210 |
.ft P |
| 3211 |
.fi |
| 3212 |
.IP \(bu 2 |
| 3213 |
. |
| 3214 |
last 10 commits on the current branch: |
| 3215 |
.sp |
| 3216 |
.nf |
| 3217 |
.ft C |
| 3218 |
hg log \-l 10 \-b . |
| 3219 |
.ft P |
| 3220 |
.fi |
| 3221 |
.IP \(bu 2 |
| 3222 |
. |
| 3223 |
changesets showing all modifications of a file, including removals: |
| 3224 |
.sp |
| 3225 |
.nf |
| 3226 |
.ft C |
| 3227 |
hg log \-\-removed file.c |
| 3228 |
.ft P |
| 3229 |
.fi |
| 3230 |
.IP \(bu 2 |
| 3231 |
. |
| 3232 |
all changesets that touch a directory, with diffs, excluding merges: |
| 3233 |
.sp |
| 3234 |
.nf |
| 3235 |
.ft C |
| 3236 |
hg log \-Mp lib/ |
| 3237 |
.ft P |
| 3238 |
.fi |
| 3239 |
.IP \(bu 2 |
| 3240 |
. |
| 3241 |
all revision numbers that match a keyword: |
| 3242 |
.sp |
| 3243 |
.nf |
| 3244 |
.ft C |
| 3245 |
hg log \-k bug \-\-template "{rev}\en" |
| 3246 |
.ft P |
| 3247 |
.fi |
| 3248 |
.IP \(bu 2 |
| 3249 |
. |
| 3250 |
the full hash identifier of the working directory parent: |
| 3251 |
.sp |
| 3252 |
.nf |
| 3253 |
.ft C |
| 3254 |
hg log \-r . \-\-template "{node}\en" |
| 3255 |
.ft P |
| 3256 |
.fi |
| 3257 |
.IP \(bu 2 |
| 3258 |
. |
| 3259 |
list available log templates: |
| 3260 |
.sp |
| 3261 |
.nf |
| 3262 |
.ft C |
| 3263 |
hg log \-T list |
| 3264 |
.ft P |
| 3265 |
.fi |
| 3266 |
.IP \(bu 2 |
| 3267 |
. |
| 3268 |
check if a given changeset is included in a tagged release: |
| 3269 |
.sp |
| 3270 |
.nf |
| 3271 |
.ft C |
| 3272 |
hg log \-r "a21ccf and ancestor(1.9)" |
| 3273 |
.ft P |
| 3274 |
.fi |
| 3275 |
.IP \(bu 2 |
| 3276 |
. |
| 3277 |
find all changesets by some user in a date range: |
| 3278 |
.sp |
| 3279 |
.nf |
| 3280 |
.ft C |
| 3281 |
hg log \-k alice \-d "may 2008 to jul 2008" |
| 3282 |
.ft P |
| 3283 |
.fi |
| 3284 |
.IP \(bu 2 |
| 3285 |
. |
| 3286 |
summary of all changesets after the last tag: |
| 3287 |
.sp |
| 3288 |
.nf |
| 3289 |
.ft C |
| 3290 |
hg log \-r "last(tagged())::" \-\-template "{desc|firstline}\en" |
| 3291 |
.ft P |
| 3292 |
.fi |
| 3293 |
.IP \(bu 2 |
| 3294 |
. |
| 3295 |
changesets touching lines 13 to 23 for file.c: |
| 3296 |
.sp |
| 3297 |
.nf |
| 3298 |
.ft C |
| 3299 |
hg log \-L file.c,13:23 |
| 3300 |
.ft P |
| 3301 |
.fi |
| 3302 |
.IP \(bu 2 |
| 3303 |
. |
| 3304 |
changesets touching lines 13 to 23 for file.c and lines 2 to 6 of |
| 3305 |
main.c with patch: |
| 3306 |
.sp |
| 3307 |
.nf |
| 3308 |
.ft C |
| 3309 |
hg log \-L file.c,13:23 \-L main.c,2:6 \-p |
| 3310 |
.ft P |
| 3311 |
.fi |
| 3312 |
.UNINDENT |
| 3313 |
.sp |
| 3314 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 3315 |
.sp |
| 3316 |
See \%\fBhg help revisions\fP\: for more about specifying and ordering |
| 3317 |
revisions. |
| 3318 |
.sp |
| 3319 |
See \%\fBhg help templates\fP\: for more about pre\-packaged styles and |
| 3320 |
specifying custom templates. The default template used by the log |
| 3321 |
command can be customized via the \fBcommand\-templates.log\fP configuration |
| 3322 |
setting. |
| 3323 |
.sp |
| 3324 |
Returns 0 on success. |
| 3325 |
.sp |
| 3326 |
Options: |
| 3327 |
.INDENT 0.0 |
| 3328 |
.TP |
| 3329 |
.B \-f, \-\-follow |
| 3330 |
. |
| 3331 |
follow changeset history, or file history across copies and renames |
| 3332 |
.TP |
| 3333 |
.B \-\-follow\-first |
| 3334 |
. |
| 3335 |
only follow the first parent of merge changesets (DEPRECATED) |
| 3336 |
.TP |
| 3337 |
.BI \-d, \-\-date \ <DATE> |
| 3338 |
. |
| 3339 |
show revisions matching date spec |
| 3340 |
.TP |
| 3341 |
.B \-C, \-\-copies |
| 3342 |
. |
| 3343 |
show copied files |
| 3344 |
.TP |
| 3345 |
.BI \-k, \-\-keyword \ <TEXT[+]> |
| 3346 |
. |
| 3347 |
do case\-insensitive search for a given text |
| 3348 |
.TP |
| 3349 |
.BI \-r, \-\-rev \ <REV[+]> |
| 3350 |
. |
| 3351 |
revisions to select or follow from |
| 3352 |
.TP |
| 3353 |
.BI \-L, \-\-line\-range \ <FILE,RANGE[+]> |
| 3354 |
. |
| 3355 |
follow line range of specified file (EXPERIMENTAL) |
| 3356 |
.TP |
| 3357 |
.B \-\-removed |
| 3358 |
. |
| 3359 |
include revisions where files were removed |
| 3360 |
.TP |
| 3361 |
.B \-m, \-\-only\-merges |
| 3362 |
. |
| 3363 |
show only merges (DEPRECATED) (use \-r "merge()" instead) |
| 3364 |
.TP |
| 3365 |
.BI \-u, \-\-user \ <USER[+]> |
| 3366 |
. |
| 3367 |
revisions committed by user |
| 3368 |
.TP |
| 3369 |
.BI \-\-only\-branch \ <BRANCH[+]> |
| 3370 |
. |
| 3371 |
show only changesets within the given named branch (DEPRECATED) |
| 3372 |
.TP |
| 3373 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 3374 |
. |
| 3375 |
show changesets within the given named branch |
| 3376 |
.TP |
| 3377 |
.BI \-B, \-\-bookmark \ <BOOKMARK[+]> |
| 3378 |
. |
| 3379 |
show changesets within the given bookmark |
| 3380 |
.TP |
| 3381 |
.BI \-P, \-\-prune \ <REV[+]> |
| 3382 |
. |
| 3383 |
do not display revision or any of its ancestors |
| 3384 |
.TP |
| 3385 |
.B \-p, \-\-patch |
| 3386 |
. |
| 3387 |
show patch |
| 3388 |
.TP |
| 3389 |
.B \-g, \-\-git |
| 3390 |
. |
| 3391 |
use git extended diff format |
| 3392 |
.TP |
| 3393 |
.BI \-l, \-\-limit \ <NUM> |
| 3394 |
. |
| 3395 |
limit number of changes displayed |
| 3396 |
.TP |
| 3397 |
.B \-M, \-\-no\-merges |
| 3398 |
. |
| 3399 |
do not show merges |
| 3400 |
.TP |
| 3401 |
.B \-\-stat |
| 3402 |
. |
| 3403 |
output diffstat\-style summary of changes |
| 3404 |
.TP |
| 3405 |
.B \-G, \-\-graph |
| 3406 |
. |
| 3407 |
show the revision DAG |
| 3408 |
.TP |
| 3409 |
.BI \-\-style \ <STYLE> |
| 3410 |
. |
| 3411 |
display using template map file (DEPRECATED) |
| 3412 |
.TP |
| 3413 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 3414 |
. |
| 3415 |
display with template |
| 3416 |
.TP |
| 3417 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3418 |
. |
| 3419 |
include names matching the given patterns |
| 3420 |
.TP |
| 3421 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3422 |
. |
| 3423 |
exclude names matching the given patterns |
| 3424 |
.UNINDENT |
| 3425 |
.sp |
| 3426 |
[+] marked option can be specified multiple times |
| 3427 |
.\" |
| 3428 |
. |
| 3429 |
.INDENT 0.0 |
| 3430 |
.INDENT 3.5 |
| 3431 |
.sp |
| 3432 |
aliases: history |
| 3433 |
.UNINDENT |
| 3434 |
.UNINDENT |
| 3435 |
.SS parents |
| 3436 |
.sp |
| 3437 |
show the parents of the working directory or revision (DEPRECATED): |
| 3438 |
.sp |
| 3439 |
.nf |
| 3440 |
.ft C |
| 3441 |
hg parents [\-r REV] [FILE] |
| 3442 |
.ft P |
| 3443 |
.fi |
| 3444 |
.sp |
| 3445 |
Print the working directory\(aqs parent revisions. If a revision is |
| 3446 |
given via \-r/\-\-rev, the parent of that revision will be printed. |
| 3447 |
If a file argument is given, the revision in which the file was |
| 3448 |
last changed (before the working directory revision or the |
| 3449 |
argument to \-\-rev if given) is printed. |
| 3450 |
.sp |
| 3451 |
This command is equivalent to: |
| 3452 |
.sp |
| 3453 |
.nf |
| 3454 |
.ft C |
| 3455 |
hg log \-r "p1()+p2()" or |
| 3456 |
hg log \-r "p1(REV)+p2(REV)" or |
| 3457 |
hg log \-r "max(::p1() and file(FILE))+max(::p2() and file(FILE))" or |
| 3458 |
hg log \-r "max(::p1(REV) and file(FILE))+max(::p2(REV) and file(FILE))" |
| 3459 |
.ft P |
| 3460 |
.fi |
| 3461 |
.sp |
| 3462 |
See \%\fBhg summary\fP\: and \%\fBhg help revsets\fP\: for related information. |
| 3463 |
.sp |
| 3464 |
Returns 0 on success. |
| 3465 |
.sp |
| 3466 |
Options: |
| 3467 |
.INDENT 0.0 |
| 3468 |
.TP |
| 3469 |
.BI \-r, \-\-rev \ <REV> |
| 3470 |
. |
| 3471 |
show parents of the specified revision |
| 3472 |
.TP |
| 3473 |
.BI \-\-style \ <STYLE> |
| 3474 |
. |
| 3475 |
display using template map file (DEPRECATED) |
| 3476 |
.TP |
| 3477 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 3478 |
. |
| 3479 |
display with template |
| 3480 |
.UNINDENT |
| 3481 |
.SS tip |
| 3482 |
.sp |
| 3483 |
show the tip revision (DEPRECATED): |
| 3484 |
.sp |
| 3485 |
.nf |
| 3486 |
.ft C |
| 3487 |
hg tip [\-p] [\-g] |
| 3488 |
.ft P |
| 3489 |
.fi |
| 3490 |
.sp |
| 3491 |
The tip revision (usually just called the tip) is the changeset |
| 3492 |
most recently added to the repository (and therefore the most |
| 3493 |
recently changed head). |
| 3494 |
.sp |
| 3495 |
If you have just made a commit, that commit will be the tip. If |
| 3496 |
you have just pulled changes from another repository, the tip of |
| 3497 |
that repository becomes the current tip. The "tip" tag is special |
| 3498 |
and cannot be renamed or assigned to a different changeset. |
| 3499 |
.sp |
| 3500 |
This command is deprecated, please use \%\fBhg heads\fP\: instead. |
| 3501 |
.sp |
| 3502 |
Returns 0 on success. |
| 3503 |
.sp |
| 3504 |
Options: |
| 3505 |
.INDENT 0.0 |
| 3506 |
.TP |
| 3507 |
.B \-p, \-\-patch |
| 3508 |
. |
| 3509 |
show patch |
| 3510 |
.TP |
| 3511 |
.B \-g, \-\-git |
| 3512 |
. |
| 3513 |
use git extended diff format |
| 3514 |
.TP |
| 3515 |
.BI \-\-style \ <STYLE> |
| 3516 |
. |
| 3517 |
display using template map file (DEPRECATED) |
| 3518 |
.TP |
| 3519 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 3520 |
. |
| 3521 |
display with template |
| 3522 |
.UNINDENT |
| 3523 |
.SS Working directory management |
| 3524 |
.SS add |
| 3525 |
.sp |
| 3526 |
add the specified files on the next commit: |
| 3527 |
.sp |
| 3528 |
.nf |
| 3529 |
.ft C |
| 3530 |
hg add [OPTION]... [FILE]... |
| 3531 |
.ft P |
| 3532 |
.fi |
| 3533 |
.sp |
| 3534 |
Schedule files to be version controlled and added to the |
| 3535 |
repository. |
| 3536 |
.sp |
| 3537 |
The files will be added to the repository at the next commit. To |
| 3538 |
undo an add before that, see \%\fBhg forget\fP\:. |
| 3539 |
.sp |
| 3540 |
If no names are given, add all files to the repository (except |
| 3541 |
files matching \fB.hgignore\fP). |
| 3542 |
.sp |
| 3543 |
Examples: |
| 3544 |
.INDENT 0.0 |
| 3545 |
.INDENT 3.5 |
| 3546 |
.INDENT 0.0 |
| 3547 |
.IP \(bu 2 |
| 3548 |
. |
| 3549 |
New (unknown) files are added |
| 3550 |
automatically by \%\fBhg add\fP\:: |
| 3551 |
.sp |
| 3552 |
.nf |
| 3553 |
.ft C |
| 3554 |
$ ls |
| 3555 |
foo.c |
| 3556 |
$ hg status |
| 3557 |
? foo.c |
| 3558 |
$ hg add |
| 3559 |
adding foo.c |
| 3560 |
$ hg status |
| 3561 |
A foo.c |
| 3562 |
.ft P |
| 3563 |
.fi |
| 3564 |
.IP \(bu 2 |
| 3565 |
. |
| 3566 |
Specific files to be added can be specified: |
| 3567 |
.sp |
| 3568 |
.nf |
| 3569 |
.ft C |
| 3570 |
$ ls |
| 3571 |
bar.c foo.c |
| 3572 |
$ hg status |
| 3573 |
? bar.c |
| 3574 |
? foo.c |
| 3575 |
$ hg add bar.c |
| 3576 |
$ hg status |
| 3577 |
A bar.c |
| 3578 |
? foo.c |
| 3579 |
.ft P |
| 3580 |
.fi |
| 3581 |
.UNINDENT |
| 3582 |
.UNINDENT |
| 3583 |
.UNINDENT |
| 3584 |
.sp |
| 3585 |
Returns 0 if all files are successfully added. |
| 3586 |
.sp |
| 3587 |
Options: |
| 3588 |
.INDENT 0.0 |
| 3589 |
.TP |
| 3590 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3591 |
. |
| 3592 |
include names matching the given patterns |
| 3593 |
.TP |
| 3594 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3595 |
. |
| 3596 |
exclude names matching the given patterns |
| 3597 |
.TP |
| 3598 |
.B \-S, \-\-subrepos |
| 3599 |
. |
| 3600 |
recurse into subrepositories |
| 3601 |
.TP |
| 3602 |
.B \-n, \-\-dry\-run |
| 3603 |
. |
| 3604 |
do not perform actions, just print output |
| 3605 |
.UNINDENT |
| 3606 |
.sp |
| 3607 |
[+] marked option can be specified multiple times |
| 3608 |
.SS addremove |
| 3609 |
.sp |
| 3610 |
add all new files, delete all missing files: |
| 3611 |
.sp |
| 3612 |
.nf |
| 3613 |
.ft C |
| 3614 |
hg addremove [OPTION]... [FILE]... |
| 3615 |
.ft P |
| 3616 |
.fi |
| 3617 |
.sp |
| 3618 |
Add all new files and remove all missing files from the |
| 3619 |
repository. |
| 3620 |
.sp |
| 3621 |
Unless names are given, new files are ignored if they match any of |
| 3622 |
the patterns in \fB.hgignore\fP. As with add, these changes take |
| 3623 |
effect at the next commit. |
| 3624 |
.sp |
| 3625 |
Use the \-s/\-\-similarity option to detect renamed files. This |
| 3626 |
option takes a percentage between 0 (disabled) and 100 (files must |
| 3627 |
be identical) as its parameter. With a parameter greater than 0, |
| 3628 |
this compares every removed file with every added file and records |
| 3629 |
those similar enough as renames. Detecting renamed files this way |
| 3630 |
can be expensive. After using this option, \%\fBhg status \-C\fP\: can be |
| 3631 |
used to check which files were identified as moved or renamed. If |
| 3632 |
not specified, \-s/\-\-similarity defaults to 100 and only renames of |
| 3633 |
identical files are detected. |
| 3634 |
.sp |
| 3635 |
Examples: |
| 3636 |
.INDENT 0.0 |
| 3637 |
.INDENT 3.5 |
| 3638 |
.INDENT 0.0 |
| 3639 |
.IP \(bu 2 |
| 3640 |
. |
| 3641 |
A number of files (bar.c and foo.c) are new, |
| 3642 |
while foobar.c has been removed (without using \%\fBhg remove\fP\:) |
| 3643 |
from the repository: |
| 3644 |
.sp |
| 3645 |
.nf |
| 3646 |
.ft C |
| 3647 |
$ ls |
| 3648 |
bar.c foo.c |
| 3649 |
$ hg status |
| 3650 |
! foobar.c |
| 3651 |
? bar.c |
| 3652 |
? foo.c |
| 3653 |
$ hg addremove |
| 3654 |
adding bar.c |
| 3655 |
adding foo.c |
| 3656 |
removing foobar.c |
| 3657 |
$ hg status |
| 3658 |
A bar.c |
| 3659 |
A foo.c |
| 3660 |
R foobar.c |
| 3661 |
.ft P |
| 3662 |
.fi |
| 3663 |
.IP \(bu 2 |
| 3664 |
. |
| 3665 |
A file foobar.c was moved to foo.c without using \%\fBhg rename\fP\:. |
| 3666 |
Afterwards, it was edited slightly: |
| 3667 |
.sp |
| 3668 |
.nf |
| 3669 |
.ft C |
| 3670 |
$ ls |
| 3671 |
foo.c |
| 3672 |
$ hg status |
| 3673 |
! foobar.c |
| 3674 |
? foo.c |
| 3675 |
$ hg addremove \-\-similarity 90 |
| 3676 |
removing foobar.c |
| 3677 |
adding foo.c |
| 3678 |
recording removal of foobar.c as rename to foo.c (94% similar) |
| 3679 |
$ hg status \-C |
| 3680 |
A foo.c |
| 3681 |
foobar.c |
| 3682 |
R foobar.c |
| 3683 |
.ft P |
| 3684 |
.fi |
| 3685 |
.UNINDENT |
| 3686 |
.UNINDENT |
| 3687 |
.UNINDENT |
| 3688 |
.sp |
| 3689 |
Returns 0 if all files are successfully added. |
| 3690 |
.sp |
| 3691 |
Options: |
| 3692 |
.INDENT 0.0 |
| 3693 |
.TP |
| 3694 |
.BI \-s, \-\-similarity \ <SIMILARITY> |
| 3695 |
. |
| 3696 |
guess renamed files by similarity (0<=s<=100) |
| 3697 |
.TP |
| 3698 |
.B \-S, \-\-subrepos |
| 3699 |
. |
| 3700 |
recurse into subrepositories |
| 3701 |
.TP |
| 3702 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3703 |
. |
| 3704 |
include names matching the given patterns |
| 3705 |
.TP |
| 3706 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3707 |
. |
| 3708 |
exclude names matching the given patterns |
| 3709 |
.TP |
| 3710 |
.B \-n, \-\-dry\-run |
| 3711 |
. |
| 3712 |
do not perform actions, just print output |
| 3713 |
.UNINDENT |
| 3714 |
.sp |
| 3715 |
[+] marked option can be specified multiple times |
| 3716 |
.SS files |
| 3717 |
.sp |
| 3718 |
list tracked files: |
| 3719 |
.sp |
| 3720 |
.nf |
| 3721 |
.ft C |
| 3722 |
hg files [OPTION]... [FILE]... |
| 3723 |
.ft P |
| 3724 |
.fi |
| 3725 |
.sp |
| 3726 |
Print files under Mercurial control in the working directory or |
| 3727 |
specified revision for given files (excluding removed files). |
| 3728 |
Files can be specified as filenames or filesets. |
| 3729 |
.sp |
| 3730 |
If no files are given to match, this command prints the names |
| 3731 |
of all files under Mercurial control. |
| 3732 |
.sp |
| 3733 |
Template: |
| 3734 |
.sp |
| 3735 |
The following keywords are supported in addition to the common template |
| 3736 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 3737 |
.INDENT 0.0 |
| 3738 |
.TP |
| 3739 |
.B flags |
| 3740 |
. |
| 3741 |
String. Character denoting file\(aqs symlink and executable bits. |
| 3742 |
.TP |
| 3743 |
.B path |
| 3744 |
. |
| 3745 |
String. Repository\-absolute path of the file. |
| 3746 |
.TP |
| 3747 |
.B size |
| 3748 |
. |
| 3749 |
Integer. Size of the file in bytes. |
| 3750 |
.UNINDENT |
| 3751 |
.sp |
| 3752 |
Examples: |
| 3753 |
.INDENT 0.0 |
| 3754 |
.IP \(bu 2 |
| 3755 |
. |
| 3756 |
list all files under the current directory: |
| 3757 |
.sp |
| 3758 |
.nf |
| 3759 |
.ft C |
| 3760 |
hg files . |
| 3761 |
.ft P |
| 3762 |
.fi |
| 3763 |
.IP \(bu 2 |
| 3764 |
. |
| 3765 |
shows sizes and flags for current revision: |
| 3766 |
.sp |
| 3767 |
.nf |
| 3768 |
.ft C |
| 3769 |
hg files \-vr . |
| 3770 |
.ft P |
| 3771 |
.fi |
| 3772 |
.IP \(bu 2 |
| 3773 |
. |
| 3774 |
list all files named README: |
| 3775 |
.sp |
| 3776 |
.nf |
| 3777 |
.ft C |
| 3778 |
hg files \-I "**/README" |
| 3779 |
.ft P |
| 3780 |
.fi |
| 3781 |
.IP \(bu 2 |
| 3782 |
. |
| 3783 |
list all binary files: |
| 3784 |
.sp |
| 3785 |
.nf |
| 3786 |
.ft C |
| 3787 |
hg files "set:binary()" |
| 3788 |
.ft P |
| 3789 |
.fi |
| 3790 |
.IP \(bu 2 |
| 3791 |
. |
| 3792 |
find files containing a regular expression: |
| 3793 |
.sp |
| 3794 |
.nf |
| 3795 |
.ft C |
| 3796 |
hg files "set:grep(\(aqbob\(aq)" |
| 3797 |
.ft P |
| 3798 |
.fi |
| 3799 |
.IP \(bu 2 |
| 3800 |
. |
| 3801 |
search tracked file contents with xargs and grep: |
| 3802 |
.sp |
| 3803 |
.nf |
| 3804 |
.ft C |
| 3805 |
hg files \-0 | xargs \-0 grep foo |
| 3806 |
.ft P |
| 3807 |
.fi |
| 3808 |
.UNINDENT |
| 3809 |
.sp |
| 3810 |
See \%\fBhg help patterns\fP\: and \%\fBhg help filesets\fP\: for more information |
| 3811 |
on specifying file patterns. |
| 3812 |
.sp |
| 3813 |
Returns 0 if a match is found, 1 otherwise. |
| 3814 |
.sp |
| 3815 |
Options: |
| 3816 |
.INDENT 0.0 |
| 3817 |
.TP |
| 3818 |
.BI \-r, \-\-rev \ <REV> |
| 3819 |
. |
| 3820 |
search the repository as it is in REV |
| 3821 |
.TP |
| 3822 |
.B \-0, \-\-print0 |
| 3823 |
. |
| 3824 |
end filenames with NUL, for use with xargs |
| 3825 |
.TP |
| 3826 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3827 |
. |
| 3828 |
include names matching the given patterns |
| 3829 |
.TP |
| 3830 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3831 |
. |
| 3832 |
exclude names matching the given patterns |
| 3833 |
.TP |
| 3834 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 3835 |
. |
| 3836 |
display with template |
| 3837 |
.TP |
| 3838 |
.B \-S, \-\-subrepos |
| 3839 |
. |
| 3840 |
recurse into subrepositories |
| 3841 |
.UNINDENT |
| 3842 |
.sp |
| 3843 |
[+] marked option can be specified multiple times |
| 3844 |
.SS forget |
| 3845 |
.sp |
| 3846 |
forget the specified files on the next commit: |
| 3847 |
.sp |
| 3848 |
.nf |
| 3849 |
.ft C |
| 3850 |
hg forget [OPTION]... FILE... |
| 3851 |
.ft P |
| 3852 |
.fi |
| 3853 |
.sp |
| 3854 |
Mark the specified files so they will no longer be tracked |
| 3855 |
after the next commit. |
| 3856 |
.sp |
| 3857 |
This only removes files from the current branch, not from the |
| 3858 |
entire project history, and it does not delete them from the |
| 3859 |
working directory. |
| 3860 |
.sp |
| 3861 |
To delete the file from the working directory, see \%\fBhg remove\fP\:. |
| 3862 |
.sp |
| 3863 |
To undo a forget before the next commit, see \%\fBhg add\fP\:. |
| 3864 |
.sp |
| 3865 |
Examples: |
| 3866 |
.INDENT 0.0 |
| 3867 |
.IP \(bu 2 |
| 3868 |
. |
| 3869 |
forget newly\-added binary files: |
| 3870 |
.sp |
| 3871 |
.nf |
| 3872 |
.ft C |
| 3873 |
hg forget "set:added() and binary()" |
| 3874 |
.ft P |
| 3875 |
.fi |
| 3876 |
.IP \(bu 2 |
| 3877 |
. |
| 3878 |
forget files that would be excluded by .hgignore: |
| 3879 |
.sp |
| 3880 |
.nf |
| 3881 |
.ft C |
| 3882 |
hg forget "set:hgignore()" |
| 3883 |
.ft P |
| 3884 |
.fi |
| 3885 |
.UNINDENT |
| 3886 |
.sp |
| 3887 |
Returns 0 on success. |
| 3888 |
.sp |
| 3889 |
Options: |
| 3890 |
.INDENT 0.0 |
| 3891 |
.TP |
| 3892 |
.B \-i, \-\-interactive |
| 3893 |
. |
| 3894 |
use interactive mode |
| 3895 |
.TP |
| 3896 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3897 |
. |
| 3898 |
include names matching the given patterns |
| 3899 |
.TP |
| 3900 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3901 |
. |
| 3902 |
exclude names matching the given patterns |
| 3903 |
.TP |
| 3904 |
.B \-n, \-\-dry\-run |
| 3905 |
. |
| 3906 |
do not perform actions, just print output |
| 3907 |
.UNINDENT |
| 3908 |
.sp |
| 3909 |
[+] marked option can be specified multiple times |
| 3910 |
.SS locate |
| 3911 |
.sp |
| 3912 |
locate files matching specific patterns (DEPRECATED): |
| 3913 |
.sp |
| 3914 |
.nf |
| 3915 |
.ft C |
| 3916 |
hg locate [OPTION]... [PATTERN]... |
| 3917 |
.ft P |
| 3918 |
.fi |
| 3919 |
.sp |
| 3920 |
Print files under Mercurial control in the working directory whose |
| 3921 |
names match the given patterns. |
| 3922 |
.sp |
| 3923 |
By default, this command searches all directories in the working |
| 3924 |
directory. To search just the current directory and its |
| 3925 |
subdirectories, use "\-\-include .". |
| 3926 |
.sp |
| 3927 |
If no patterns are given to match, this command prints the names |
| 3928 |
of all files under Mercurial control in the working directory. |
| 3929 |
.sp |
| 3930 |
If you want to feed the output of this command into the "xargs" |
| 3931 |
command, use the \-0 option to both this command and "xargs". This |
| 3932 |
will avoid the problem of "xargs" treating single filenames that |
| 3933 |
contain whitespace as multiple filenames. |
| 3934 |
.sp |
| 3935 |
See \%\fBhg help files\fP\: for a more versatile command. |
| 3936 |
.sp |
| 3937 |
Returns 0 if a match is found, 1 otherwise. |
| 3938 |
.sp |
| 3939 |
Options: |
| 3940 |
.INDENT 0.0 |
| 3941 |
.TP |
| 3942 |
.BI \-r, \-\-rev \ <REV> |
| 3943 |
. |
| 3944 |
search the repository as it is in REV |
| 3945 |
.TP |
| 3946 |
.B \-0, \-\-print0 |
| 3947 |
. |
| 3948 |
end filenames with NUL, for use with xargs |
| 3949 |
.TP |
| 3950 |
.B \-f, \-\-fullpath |
| 3951 |
. |
| 3952 |
print complete paths from the filesystem root |
| 3953 |
.TP |
| 3954 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 3955 |
. |
| 3956 |
include names matching the given patterns |
| 3957 |
.TP |
| 3958 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 3959 |
. |
| 3960 |
exclude names matching the given patterns |
| 3961 |
.UNINDENT |
| 3962 |
.sp |
| 3963 |
[+] marked option can be specified multiple times |
| 3964 |
.SS purge |
| 3965 |
.sp |
| 3966 |
removes files not tracked by Mercurial: |
| 3967 |
.sp |
| 3968 |
.nf |
| 3969 |
.ft C |
| 3970 |
hg purge [OPTION]... [DIR]... |
| 3971 |
.ft P |
| 3972 |
.fi |
| 3973 |
.sp |
| 3974 |
Delete files not known to Mercurial. This is useful to test local |
| 3975 |
and uncommitted changes in an otherwise\-clean source tree. |
| 3976 |
.sp |
| 3977 |
This means that purge will delete the following by default: |
| 3978 |
.INDENT 0.0 |
| 3979 |
.IP \(bu 2 |
| 3980 |
. |
| 3981 |
Unknown files: files marked with "?" by \%\fBhg status\fP\: |
| 3982 |
.IP \(bu 2 |
| 3983 |
. |
| 3984 |
Empty directories: in fact Mercurial ignores directories unless |
| 3985 |
they contain files under source control management |
| 3986 |
.UNINDENT |
| 3987 |
.sp |
| 3988 |
But it will leave untouched: |
| 3989 |
.INDENT 0.0 |
| 3990 |
.IP \(bu 2 |
| 3991 |
. |
| 3992 |
Modified and unmodified tracked files |
| 3993 |
.IP \(bu 2 |
| 3994 |
. |
| 3995 |
Ignored files (unless \-i or \-\-all is specified) |
| 3996 |
.IP \(bu 2 |
| 3997 |
. |
| 3998 |
New files added to the repository (with \%\fBhg add\fP\:) |
| 3999 |
.UNINDENT |
| 4000 |
.sp |
| 4001 |
The \-\-files and \-\-dirs options can be used to direct purge to delete |
| 4002 |
only files, only directories, or both. If neither option is given, |
| 4003 |
both will be deleted. |
| 4004 |
.sp |
| 4005 |
If directories are given on the command line, only files in these |
| 4006 |
directories are considered. |
| 4007 |
.sp |
| 4008 |
Be careful with purge, as you could irreversibly delete some files |
| 4009 |
you forgot to add to the repository. If you only want to print the |
| 4010 |
list of files that this program would delete, use the \-\-print |
| 4011 |
option. |
| 4012 |
.sp |
| 4013 |
Options: |
| 4014 |
.INDENT 0.0 |
| 4015 |
.TP |
| 4016 |
.B \-a, \-\-abort\-on\-err |
| 4017 |
. |
| 4018 |
abort if an error occurs |
| 4019 |
.TP |
| 4020 |
.B \-\-all |
| 4021 |
. |
| 4022 |
purge ignored files too |
| 4023 |
.TP |
| 4024 |
.B \-i, \-\-ignored |
| 4025 |
. |
| 4026 |
purge only ignored files |
| 4027 |
.TP |
| 4028 |
.B \-\-dirs |
| 4029 |
. |
| 4030 |
purge empty directories |
| 4031 |
.TP |
| 4032 |
.B \-\-files |
| 4033 |
. |
| 4034 |
purge files |
| 4035 |
.TP |
| 4036 |
.B \-p, \-\-print |
| 4037 |
. |
| 4038 |
print filenames instead of deleting them |
| 4039 |
.TP |
| 4040 |
.B \-0, \-\-print0 |
| 4041 |
. |
| 4042 |
end filenames with NUL, for use with xargs (implies \-p/\-\-print) |
| 4043 |
.TP |
| 4044 |
.B \-\-confirm |
| 4045 |
. |
| 4046 |
ask before permanently deleting files |
| 4047 |
.TP |
| 4048 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4049 |
. |
| 4050 |
include names matching the given patterns |
| 4051 |
.TP |
| 4052 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4053 |
. |
| 4054 |
exclude names matching the given patterns |
| 4055 |
.UNINDENT |
| 4056 |
.sp |
| 4057 |
[+] marked option can be specified multiple times |
| 4058 |
.\" |
| 4059 |
. |
| 4060 |
.INDENT 0.0 |
| 4061 |
.INDENT 3.5 |
| 4062 |
.sp |
| 4063 |
aliases: clean |
| 4064 |
.UNINDENT |
| 4065 |
.UNINDENT |
| 4066 |
.SS remove |
| 4067 |
.sp |
| 4068 |
remove the specified files on the next commit: |
| 4069 |
.sp |
| 4070 |
.nf |
| 4071 |
.ft C |
| 4072 |
hg remove [OPTION]... FILE... |
| 4073 |
.ft P |
| 4074 |
.fi |
| 4075 |
.sp |
| 4076 |
Schedule the indicated files for removal from the current branch. |
| 4077 |
.sp |
| 4078 |
This command schedules the files to be removed at the next commit. |
| 4079 |
To undo a remove before that, see \%\fBhg revert\fP\:. To undo added |
| 4080 |
files, see \%\fBhg forget\fP\:. |
| 4081 |
.sp |
| 4082 |
\-A/\-\-after can be used to remove only files that have already |
| 4083 |
been deleted, \-f/\-\-force can be used to force deletion, and \-Af |
| 4084 |
can be used to remove files from the next revision without |
| 4085 |
deleting them from the working directory. |
| 4086 |
.sp |
| 4087 |
The following table details the behavior of remove for different |
| 4088 |
file states (columns) and option combinations (rows). The file |
| 4089 |
states are Added [A], Clean [C], Modified [M] and Missing [!] |
| 4090 |
(as reported by \%\fBhg status\fP\:). The actions are Warn, Remove |
| 4091 |
(from branch) and Delete (from disk): |
| 4092 |
.TS |
| 4093 |
center; |
| 4094 |
|l|l|l|l|l|. |
| 4095 |
_ |
| 4096 |
T{ |
| 4097 |
opt/state |
| 4098 |
T} T{ |
| 4099 |
A |
| 4100 |
T} T{ |
| 4101 |
C |
| 4102 |
T} T{ |
| 4103 |
M |
| 4104 |
T} T{ |
| 4105 |
! |
| 4106 |
T} |
| 4107 |
_ |
| 4108 |
T{ |
| 4109 |
none |
| 4110 |
T} T{ |
| 4111 |
W |
| 4112 |
T} T{ |
| 4113 |
RD |
| 4114 |
T} T{ |
| 4115 |
W |
| 4116 |
T} T{ |
| 4117 |
R |
| 4118 |
T} |
| 4119 |
_ |
| 4120 |
T{ |
| 4121 |
\-f |
| 4122 |
T} T{ |
| 4123 |
R |
| 4124 |
T} T{ |
| 4125 |
RD |
| 4126 |
T} T{ |
| 4127 |
RD |
| 4128 |
T} T{ |
| 4129 |
R |
| 4130 |
T} |
| 4131 |
_ |
| 4132 |
T{ |
| 4133 |
\-A |
| 4134 |
T} T{ |
| 4135 |
W |
| 4136 |
T} T{ |
| 4137 |
W |
| 4138 |
T} T{ |
| 4139 |
W |
| 4140 |
T} T{ |
| 4141 |
R |
| 4142 |
T} |
| 4143 |
_ |
| 4144 |
T{ |
| 4145 |
\-Af |
| 4146 |
T} T{ |
| 4147 |
R |
| 4148 |
T} T{ |
| 4149 |
R |
| 4150 |
T} T{ |
| 4151 |
R |
| 4152 |
T} T{ |
| 4153 |
R |
| 4154 |
T} |
| 4155 |
_ |
| 4156 |
.TE |
| 4157 |
.IP Note |
| 4158 |
. |
| 4159 |
\%\fBhg remove\fP\: never deletes files in Added [A] state from the |
| 4160 |
working directory, not even if \fB\-\-force\fP is specified. |
| 4161 |
.RE |
| 4162 |
.sp |
| 4163 |
Returns 0 on success, 1 if any warnings encountered. |
| 4164 |
.sp |
| 4165 |
Options: |
| 4166 |
.INDENT 0.0 |
| 4167 |
.TP |
| 4168 |
.B \-A, \-\-after |
| 4169 |
. |
| 4170 |
record delete for missing files |
| 4171 |
.TP |
| 4172 |
.B \-f, \-\-force |
| 4173 |
. |
| 4174 |
forget added files, delete modified files |
| 4175 |
.TP |
| 4176 |
.B \-S, \-\-subrepos |
| 4177 |
. |
| 4178 |
recurse into subrepositories |
| 4179 |
.TP |
| 4180 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4181 |
. |
| 4182 |
include names matching the given patterns |
| 4183 |
.TP |
| 4184 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4185 |
. |
| 4186 |
exclude names matching the given patterns |
| 4187 |
.TP |
| 4188 |
.B \-n, \-\-dry\-run |
| 4189 |
. |
| 4190 |
do not perform actions, just print output |
| 4191 |
.UNINDENT |
| 4192 |
.sp |
| 4193 |
[+] marked option can be specified multiple times |
| 4194 |
.\" |
| 4195 |
. |
| 4196 |
.INDENT 0.0 |
| 4197 |
.INDENT 3.5 |
| 4198 |
.sp |
| 4199 |
aliases: rm |
| 4200 |
.UNINDENT |
| 4201 |
.UNINDENT |
| 4202 |
.SS rename |
| 4203 |
.sp |
| 4204 |
rename files; equivalent of copy + remove: |
| 4205 |
.sp |
| 4206 |
.nf |
| 4207 |
.ft C |
| 4208 |
hg rename [OPTION]... SOURCE... DEST |
| 4209 |
.ft P |
| 4210 |
.fi |
| 4211 |
.sp |
| 4212 |
Mark dest as copies of sources; mark sources for deletion. If dest |
| 4213 |
is a directory, copies are put in that directory. If dest is a |
| 4214 |
file, there can only be one source. |
| 4215 |
.sp |
| 4216 |
By default, this command copies the contents of files as they |
| 4217 |
exist in the working directory. If invoked with \-A/\-\-after, the |
| 4218 |
operation is recorded, but no copying is performed. |
| 4219 |
.sp |
| 4220 |
To undo marking a destination file as renamed, use \-\-forget. With that |
| 4221 |
option, all given (positional) arguments are unmarked as renames. The |
| 4222 |
destination file(s) will be left in place (still tracked). The source |
| 4223 |
file(s) will not be restored. Note that \%\fBhg rename \-\-forget\fP\: behaves |
| 4224 |
the same way as \%\fBhg copy \-\-forget\fP\:. |
| 4225 |
.sp |
| 4226 |
This command takes effect with the next commit by default. |
| 4227 |
.sp |
| 4228 |
Returns 0 on success, 1 if errors are encountered. |
| 4229 |
.sp |
| 4230 |
Options: |
| 4231 |
.INDENT 0.0 |
| 4232 |
.TP |
| 4233 |
.B \-\-forget |
| 4234 |
. |
| 4235 |
unmark a destination file as renamed |
| 4236 |
.TP |
| 4237 |
.B \-A, \-\-after |
| 4238 |
. |
| 4239 |
record a rename that has already occurred |
| 4240 |
.TP |
| 4241 |
.BI \-\-at\-rev \ <REV> |
| 4242 |
. |
| 4243 |
(un)mark renames in the given revision (EXPERIMENTAL) |
| 4244 |
.TP |
| 4245 |
.B \-f, \-\-force |
| 4246 |
. |
| 4247 |
forcibly move over an existing managed file |
| 4248 |
.TP |
| 4249 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4250 |
. |
| 4251 |
include names matching the given patterns |
| 4252 |
.TP |
| 4253 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4254 |
. |
| 4255 |
exclude names matching the given patterns |
| 4256 |
.TP |
| 4257 |
.B \-n, \-\-dry\-run |
| 4258 |
. |
| 4259 |
do not perform actions, just print output |
| 4260 |
.UNINDENT |
| 4261 |
.sp |
| 4262 |
[+] marked option can be specified multiple times |
| 4263 |
.\" |
| 4264 |
. |
| 4265 |
.INDENT 0.0 |
| 4266 |
.INDENT 3.5 |
| 4267 |
.sp |
| 4268 |
aliases: move mv |
| 4269 |
.UNINDENT |
| 4270 |
.UNINDENT |
| 4271 |
.SS resolve |
| 4272 |
.sp |
| 4273 |
redo merges or set/view the merge status of files: |
| 4274 |
.sp |
| 4275 |
.nf |
| 4276 |
.ft C |
| 4277 |
hg resolve [OPTION]... [FILE]... |
| 4278 |
.ft P |
| 4279 |
.fi |
| 4280 |
.sp |
| 4281 |
Merges with unresolved conflicts are often the result of |
| 4282 |
non\-interactive merging using the \fBinternal:merge\fP configuration |
| 4283 |
setting, or a command\-line merge tool like \fBdiff3\fP. The resolve |
| 4284 |
command is used to manage the files involved in a merge, after |
| 4285 |
\%\fBhg merge\fP\: has been run, and before \%\fBhg commit\fP\: is run (i.e. the |
| 4286 |
working directory must have two parents). See \%\fBhg help |
| 4287 |
merge\-tools\fP\: for information on configuring merge tools. |
| 4288 |
.sp |
| 4289 |
The resolve command can be used in the following ways: |
| 4290 |
.INDENT 0.0 |
| 4291 |
.IP \(bu 2 |
| 4292 |
. |
| 4293 |
\%\fBhg resolve [\-\-re\-merge] [\-\-tool TOOL] FILE...\fP\:: attempt to re\-merge |
| 4294 |
the specified files, discarding any previous merge attempts. Re\-merging |
| 4295 |
is not performed for files already marked as resolved. Use \fB\-\-all/\-a\fP |
| 4296 |
to select all unresolved files. \fB\-\-tool\fP can be used to specify |
| 4297 |
the merge tool used for the given files. It overrides the HGMERGE |
| 4298 |
environment variable and your configuration files. Previous file |
| 4299 |
contents are saved with a \fB.orig\fP suffix. |
| 4300 |
.IP \(bu 2 |
| 4301 |
. |
| 4302 |
\%\fBhg resolve \-m [FILE]\fP\:: mark a file as having been resolved |
| 4303 |
(e.g. after having manually fixed\-up the files). The default is |
| 4304 |
to mark all unresolved files. |
| 4305 |
.IP \(bu 2 |
| 4306 |
. |
| 4307 |
\%\fBhg resolve \-u [FILE]...\fP\:: mark a file as unresolved. The |
| 4308 |
default is to mark all resolved files. |
| 4309 |
.IP \(bu 2 |
| 4310 |
. |
| 4311 |
\%\fBhg resolve \-l\fP\:: list files which had or still have conflicts. |
| 4312 |
In the printed list, \fBU\fP = unresolved and \fBR\fP = resolved. |
| 4313 |
You can use \fBset:unresolved()\fP or \fBset:resolved()\fP to filter |
| 4314 |
the list. See \%\fBhg help filesets\fP\: for details. |
| 4315 |
.UNINDENT |
| 4316 |
.IP Note |
| 4317 |
. |
| 4318 |
Mercurial will not let you commit files with unresolved merge |
| 4319 |
conflicts. You must use \%\fBhg resolve \-m ...\fP\: before you can |
| 4320 |
commit after a conflicting merge. |
| 4321 |
.RE |
| 4322 |
.sp |
| 4323 |
Template: |
| 4324 |
.sp |
| 4325 |
The following keywords are supported in addition to the common template |
| 4326 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 4327 |
.INDENT 0.0 |
| 4328 |
.TP |
| 4329 |
.B mergestatus |
| 4330 |
. |
| 4331 |
String. Character denoting merge conflicts, \fBU\fP or \fBR\fP. |
| 4332 |
.TP |
| 4333 |
.B path |
| 4334 |
. |
| 4335 |
String. Repository\-absolute path of the file. |
| 4336 |
.UNINDENT |
| 4337 |
.sp |
| 4338 |
Returns 0 on success, 1 if any files fail a resolve attempt. |
| 4339 |
.sp |
| 4340 |
Options: |
| 4341 |
.INDENT 0.0 |
| 4342 |
.TP |
| 4343 |
.B \-a, \-\-all |
| 4344 |
. |
| 4345 |
select all unresolved files |
| 4346 |
.TP |
| 4347 |
.B \-l, \-\-list |
| 4348 |
. |
| 4349 |
list state of files needing merge |
| 4350 |
.TP |
| 4351 |
.B \-m, \-\-mark |
| 4352 |
. |
| 4353 |
mark files as resolved |
| 4354 |
.TP |
| 4355 |
.B \-u, \-\-unmark |
| 4356 |
. |
| 4357 |
mark files as unresolved |
| 4358 |
.TP |
| 4359 |
.B \-n, \-\-no\-status |
| 4360 |
. |
| 4361 |
hide status prefix |
| 4362 |
.TP |
| 4363 |
.B \-\-re\-merge |
| 4364 |
. |
| 4365 |
re\-merge files |
| 4366 |
.TP |
| 4367 |
.BI \-t, \-\-tool \ <TOOL> |
| 4368 |
. |
| 4369 |
specify merge tool |
| 4370 |
.TP |
| 4371 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4372 |
. |
| 4373 |
include names matching the given patterns |
| 4374 |
.TP |
| 4375 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4376 |
. |
| 4377 |
exclude names matching the given patterns |
| 4378 |
.TP |
| 4379 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 4380 |
. |
| 4381 |
display with template |
| 4382 |
.UNINDENT |
| 4383 |
.sp |
| 4384 |
[+] marked option can be specified multiple times |
| 4385 |
.SS revert |
| 4386 |
.sp |
| 4387 |
restore files to their checkout state: |
| 4388 |
.sp |
| 4389 |
.nf |
| 4390 |
.ft C |
| 4391 |
hg revert [OPTION]... [\-r REV] [NAME]... |
| 4392 |
.ft P |
| 4393 |
.fi |
| 4394 |
.IP Note |
| 4395 |
. |
| 4396 |
To check out earlier revisions, you should use \%\fBhg update REV\fP\:. |
| 4397 |
To cancel an uncommitted merge (and lose your changes), |
| 4398 |
use \%\fBhg merge \-\-abort\fP\:. |
| 4399 |
.RE |
| 4400 |
.sp |
| 4401 |
With no revision specified, revert the specified files or directories |
| 4402 |
to the contents they had in the parent of the working directory. |
| 4403 |
This restores the contents of files to an unmodified |
| 4404 |
state and unschedules adds, removes, copies, and renames. If the |
| 4405 |
working directory has two parents, you must explicitly specify a |
| 4406 |
revision. |
| 4407 |
.sp |
| 4408 |
Using the \-r/\-\-rev or \-d/\-\-date options, revert the given files or |
| 4409 |
directories to their states as of a specific revision. Because |
| 4410 |
revert does not change the working directory parents, this will |
| 4411 |
cause these files to appear modified. This can be helpful to "back |
| 4412 |
out" some or all of an earlier change. See \%\fBhg backout\fP\: for a |
| 4413 |
related method. |
| 4414 |
.sp |
| 4415 |
Modified files are saved with a .orig suffix before reverting. |
| 4416 |
To disable these backups, use \-\-no\-backup. It is possible to store |
| 4417 |
the backup files in a custom directory relative to the root of the |
| 4418 |
repository by setting the \fBui.origbackuppath\fP configuration |
| 4419 |
option. |
| 4420 |
.sp |
| 4421 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 4422 |
.sp |
| 4423 |
See \%\fBhg help backout\fP\: for a way to reverse the effect of an |
| 4424 |
earlier changeset. |
| 4425 |
.sp |
| 4426 |
Returns 0 on success. |
| 4427 |
.sp |
| 4428 |
Options: |
| 4429 |
.INDENT 0.0 |
| 4430 |
.TP |
| 4431 |
.B \-a, \-\-all |
| 4432 |
. |
| 4433 |
revert all changes when no arguments given |
| 4434 |
.TP |
| 4435 |
.BI \-d, \-\-date \ <DATE> |
| 4436 |
. |
| 4437 |
tipmost revision matching date |
| 4438 |
.TP |
| 4439 |
.BI \-r, \-\-rev \ <REV> |
| 4440 |
. |
| 4441 |
revert to the specified revision |
| 4442 |
.TP |
| 4443 |
.B \-C, \-\-no\-backup |
| 4444 |
. |
| 4445 |
do not save backup copies of files |
| 4446 |
.TP |
| 4447 |
.B \-i, \-\-interactive |
| 4448 |
. |
| 4449 |
interactively select the changes |
| 4450 |
.TP |
| 4451 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4452 |
. |
| 4453 |
include names matching the given patterns |
| 4454 |
.TP |
| 4455 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4456 |
. |
| 4457 |
exclude names matching the given patterns |
| 4458 |
.TP |
| 4459 |
.B \-n, \-\-dry\-run |
| 4460 |
. |
| 4461 |
do not perform actions, just print output |
| 4462 |
.UNINDENT |
| 4463 |
.sp |
| 4464 |
[+] marked option can be specified multiple times |
| 4465 |
.SS root |
| 4466 |
.sp |
| 4467 |
print the root (top) of the current working directory: |
| 4468 |
.sp |
| 4469 |
.nf |
| 4470 |
.ft C |
| 4471 |
hg root |
| 4472 |
.ft P |
| 4473 |
.fi |
| 4474 |
.sp |
| 4475 |
Print the root directory of the current repository. |
| 4476 |
.sp |
| 4477 |
Template: |
| 4478 |
.sp |
| 4479 |
The following keywords are supported in addition to the common template |
| 4480 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 4481 |
.INDENT 0.0 |
| 4482 |
.TP |
| 4483 |
.B hgpath |
| 4484 |
. |
| 4485 |
String. Path to the .hg directory. |
| 4486 |
.TP |
| 4487 |
.B storepath |
| 4488 |
. |
| 4489 |
String. Path to the directory holding versioned data. |
| 4490 |
.UNINDENT |
| 4491 |
.sp |
| 4492 |
Returns 0 on success. |
| 4493 |
.sp |
| 4494 |
Options: |
| 4495 |
.INDENT 0.0 |
| 4496 |
.TP |
| 4497 |
.B \-\-share\-source |
| 4498 |
. |
| 4499 |
print the share source root instead |
| 4500 |
.TP |
| 4501 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 4502 |
. |
| 4503 |
display with template |
| 4504 |
.UNINDENT |
| 4505 |
.SS shelve |
| 4506 |
.sp |
| 4507 |
save and set aside changes from the working directory: |
| 4508 |
.sp |
| 4509 |
.nf |
| 4510 |
.ft C |
| 4511 |
hg shelve [OPTION]... [FILE]... |
| 4512 |
.ft P |
| 4513 |
.fi |
| 4514 |
.sp |
| 4515 |
Shelving takes files that "hg status" reports as not clean, saves |
| 4516 |
the modifications to a bundle (a shelved change), and reverts the |
| 4517 |
files so that their state in the working directory becomes clean. |
| 4518 |
.sp |
| 4519 |
To restore these changes to the working directory, using "hg |
| 4520 |
unshelve"; this will work even if you switch to a different |
| 4521 |
commit. |
| 4522 |
.sp |
| 4523 |
When no files are specified, "hg shelve" saves all not\-clean |
| 4524 |
files. If specific files or directories are named, only changes to |
| 4525 |
those files are shelved. |
| 4526 |
.sp |
| 4527 |
In bare shelve (when no files are specified, without interactive, |
| 4528 |
include and exclude option), shelving remembers information if the |
| 4529 |
working directory was on newly created branch, in other words working |
| 4530 |
directory was on different branch than its first parent. In this |
| 4531 |
situation unshelving restores branch information to the working directory. |
| 4532 |
.sp |
| 4533 |
Each shelved change has a name that makes it easier to find later. |
| 4534 |
The name of a shelved change defaults to being based on the active |
| 4535 |
bookmark, or if there is no active bookmark, the current named |
| 4536 |
branch. To specify a different name, use \fB\-\-name\fP. |
| 4537 |
.sp |
| 4538 |
To see a list of existing shelved changes, use the \fB\-\-list\fP |
| 4539 |
option. For each shelved change, this will print its name, age, |
| 4540 |
and description; use \fB\-\-patch\fP or \fB\-\-stat\fP for more details. |
| 4541 |
.sp |
| 4542 |
To delete specific shelved changes, use \fB\-\-delete\fP. To delete |
| 4543 |
all shelved changes, use \fB\-\-cleanup\fP. |
| 4544 |
.sp |
| 4545 |
Options: |
| 4546 |
.INDENT 0.0 |
| 4547 |
.TP |
| 4548 |
.B \-A, \-\-addremove |
| 4549 |
. |
| 4550 |
mark new/missing files as added/removed before shelving |
| 4551 |
.TP |
| 4552 |
.B \-u, \-\-unknown |
| 4553 |
. |
| 4554 |
store unknown files in the shelve |
| 4555 |
.TP |
| 4556 |
.B \-\-cleanup |
| 4557 |
. |
| 4558 |
delete all shelved changes |
| 4559 |
.TP |
| 4560 |
.BI \-\-date \ <DATE> |
| 4561 |
. |
| 4562 |
shelve with the specified commit date |
| 4563 |
.TP |
| 4564 |
.B \-d, \-\-delete |
| 4565 |
. |
| 4566 |
delete the named shelved change(s) |
| 4567 |
.TP |
| 4568 |
.B \-e, \-\-edit |
| 4569 |
. |
| 4570 |
invoke editor on commit messages |
| 4571 |
.TP |
| 4572 |
.B \-k, \-\-keep |
| 4573 |
. |
| 4574 |
shelve, but keep changes in the working directory |
| 4575 |
.TP |
| 4576 |
.B \-l, \-\-list |
| 4577 |
. |
| 4578 |
list current shelves |
| 4579 |
.TP |
| 4580 |
.BI \-m, \-\-message \ <TEXT> |
| 4581 |
. |
| 4582 |
use text as shelve message |
| 4583 |
.TP |
| 4584 |
.BI \-n, \-\-name \ <NAME> |
| 4585 |
. |
| 4586 |
use the given name for the shelved commit |
| 4587 |
.TP |
| 4588 |
.B \-p, \-\-patch |
| 4589 |
. |
| 4590 |
output patches for changes (provide the names of the shelved changes as positional arguments) |
| 4591 |
.TP |
| 4592 |
.B \-i, \-\-interactive |
| 4593 |
. |
| 4594 |
interactive mode |
| 4595 |
.TP |
| 4596 |
.B \-\-stat |
| 4597 |
. |
| 4598 |
output diffstat\-style summary of changes (provide the names of the shelved changes as positional arguments) |
| 4599 |
.TP |
| 4600 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4601 |
. |
| 4602 |
include names matching the given patterns |
| 4603 |
.TP |
| 4604 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4605 |
. |
| 4606 |
exclude names matching the given patterns |
| 4607 |
.UNINDENT |
| 4608 |
.sp |
| 4609 |
[+] marked option can be specified multiple times |
| 4610 |
.SS status |
| 4611 |
.sp |
| 4612 |
show changed files in the working directory: |
| 4613 |
.sp |
| 4614 |
.nf |
| 4615 |
.ft C |
| 4616 |
hg status [OPTION]... [FILE]... |
| 4617 |
.ft P |
| 4618 |
.fi |
| 4619 |
.sp |
| 4620 |
Show status of files in the repository. If names are given, only |
| 4621 |
files that match are shown. Files that are clean or ignored or |
| 4622 |
the source of a copy/move operation, are not listed unless |
| 4623 |
\-c/\-\-clean, \-i/\-\-ignored, \-C/\-\-copies or \-A/\-\-all are given. |
| 4624 |
Unless options described with "show only ..." are given, the |
| 4625 |
options \-mardu are used. |
| 4626 |
.sp |
| 4627 |
Option \-q/\-\-quiet hides untracked (unknown and ignored) files |
| 4628 |
unless explicitly requested with \-u/\-\-unknown or \-i/\-\-ignored. |
| 4629 |
.IP Note |
| 4630 |
. |
| 4631 |
\%\fBhg status\fP\: may appear to disagree with diff if permissions have |
| 4632 |
changed or a merge has occurred. The standard diff format does |
| 4633 |
not report permission changes and diff only reports changes |
| 4634 |
relative to one merge parent. |
| 4635 |
.RE |
| 4636 |
.sp |
| 4637 |
If one revision is given, it is used as the base revision. |
| 4638 |
If two revisions are given, the differences between them are |
| 4639 |
shown. The \-\-change option can also be used as a shortcut to list |
| 4640 |
the changed files of a revision from its first parent. |
| 4641 |
.sp |
| 4642 |
The codes used to show the status of files are: |
| 4643 |
.sp |
| 4644 |
.nf |
| 4645 |
.ft C |
| 4646 |
M = modified |
| 4647 |
A = added |
| 4648 |
R = removed |
| 4649 |
C = clean |
| 4650 |
! = missing (deleted by non\-hg command, but still tracked) |
| 4651 |
? = not tracked |
| 4652 |
I = ignored |
| 4653 |
= origin of the previous file (with \-\-copies) |
| 4654 |
.ft P |
| 4655 |
.fi |
| 4656 |
.sp |
| 4657 |
The \-t/\-\-terse option abbreviates the output by showing only the directory |
| 4658 |
name if all the files in it share the same status. The option takes an |
| 4659 |
argument indicating the statuses to abbreviate: \(aqm\(aq for \(aqmodified\(aq, \(aqa\(aq |
| 4660 |
for \(aqadded\(aq, \(aqr\(aq for \(aqremoved\(aq, \(aqd\(aq for \(aqdeleted\(aq, \(aqu\(aq for \(aqunknown\(aq, \(aqi\(aq |
| 4661 |
for \(aqignored\(aq and \(aqc\(aq for clean. |
| 4662 |
.sp |
| 4663 |
It abbreviates only those statuses which are passed. Note that clean and |
| 4664 |
ignored files are not displayed with \(aq\-\-terse ic\(aq unless the \-c/\-\-clean |
| 4665 |
and \-i/\-\-ignored options are also used. |
| 4666 |
.sp |
| 4667 |
The \-v/\-\-verbose option shows information when the repository is in an |
| 4668 |
unfinished merge, shelve, rebase state etc. You can have this behavior |
| 4669 |
turned on by default by enabling the \fBcommands.status.verbose\fP option. |
| 4670 |
.sp |
| 4671 |
You can skip displaying some of these states by setting |
| 4672 |
\fBcommands.status.skipstates\fP to one or more of: \(aqbisect\(aq, \(aqgraft\(aq, |
| 4673 |
\(aqhistedit\(aq, \(aqmerge\(aq, \(aqrebase\(aq, or \(aqunshelve\(aq. |
| 4674 |
.sp |
| 4675 |
Template: |
| 4676 |
.sp |
| 4677 |
The following keywords are supported in addition to the common template |
| 4678 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 4679 |
.INDENT 0.0 |
| 4680 |
.TP |
| 4681 |
.B path |
| 4682 |
. |
| 4683 |
String. Repository\-absolute path of the file. |
| 4684 |
.TP |
| 4685 |
.B source |
| 4686 |
. |
| 4687 |
String. Repository\-absolute path of the file originated from. |
| 4688 |
Available if \fB\-\-copies\fP is specified. |
| 4689 |
.TP |
| 4690 |
.B status |
| 4691 |
. |
| 4692 |
String. Character denoting file\(aqs status. |
| 4693 |
.UNINDENT |
| 4694 |
.sp |
| 4695 |
Examples: |
| 4696 |
.INDENT 0.0 |
| 4697 |
.IP \(bu 2 |
| 4698 |
. |
| 4699 |
show changes in the working directory relative to a |
| 4700 |
changeset: |
| 4701 |
.sp |
| 4702 |
.nf |
| 4703 |
.ft C |
| 4704 |
hg status \-\-rev 9353 |
| 4705 |
.ft P |
| 4706 |
.fi |
| 4707 |
.IP \(bu 2 |
| 4708 |
. |
| 4709 |
show changes in the working directory relative to the |
| 4710 |
current directory (see \%\fBhg help patterns\fP\: for more information): |
| 4711 |
.sp |
| 4712 |
.nf |
| 4713 |
.ft C |
| 4714 |
hg status re: |
| 4715 |
.ft P |
| 4716 |
.fi |
| 4717 |
.IP \(bu 2 |
| 4718 |
. |
| 4719 |
show all changes including copies in an existing changeset: |
| 4720 |
.sp |
| 4721 |
.nf |
| 4722 |
.ft C |
| 4723 |
hg status \-\-copies \-\-change 9353 |
| 4724 |
.ft P |
| 4725 |
.fi |
| 4726 |
.IP \(bu 2 |
| 4727 |
. |
| 4728 |
get a NUL separated list of added files, suitable for xargs: |
| 4729 |
.sp |
| 4730 |
.nf |
| 4731 |
.ft C |
| 4732 |
hg status \-an0 |
| 4733 |
.ft P |
| 4734 |
.fi |
| 4735 |
.IP \(bu 2 |
| 4736 |
. |
| 4737 |
show more information about the repository status, abbreviating |
| 4738 |
added, removed, modified, deleted, and untracked paths: |
| 4739 |
.sp |
| 4740 |
.nf |
| 4741 |
.ft C |
| 4742 |
hg status \-v \-t mardu |
| 4743 |
.ft P |
| 4744 |
.fi |
| 4745 |
.UNINDENT |
| 4746 |
.sp |
| 4747 |
Returns 0 on success. |
| 4748 |
.sp |
| 4749 |
Options: |
| 4750 |
.INDENT 0.0 |
| 4751 |
.TP |
| 4752 |
.B \-A, \-\-all |
| 4753 |
. |
| 4754 |
show status of all files |
| 4755 |
.TP |
| 4756 |
.B \-m, \-\-modified |
| 4757 |
. |
| 4758 |
show only modified files |
| 4759 |
.TP |
| 4760 |
.B \-a, \-\-added |
| 4761 |
. |
| 4762 |
show only added files |
| 4763 |
.TP |
| 4764 |
.B \-r, \-\-removed |
| 4765 |
. |
| 4766 |
show only removed files |
| 4767 |
.TP |
| 4768 |
.B \-d, \-\-deleted |
| 4769 |
. |
| 4770 |
show only missing files |
| 4771 |
.TP |
| 4772 |
.B \-c, \-\-clean |
| 4773 |
. |
| 4774 |
show only files without changes |
| 4775 |
.TP |
| 4776 |
.B \-u, \-\-unknown |
| 4777 |
. |
| 4778 |
show only unknown (not tracked) files |
| 4779 |
.TP |
| 4780 |
.B \-i, \-\-ignored |
| 4781 |
. |
| 4782 |
show only ignored files |
| 4783 |
.TP |
| 4784 |
.B \-n, \-\-no\-status |
| 4785 |
. |
| 4786 |
hide status prefix |
| 4787 |
.TP |
| 4788 |
.BI \-t, \-\-terse \ <VALUE> |
| 4789 |
. |
| 4790 |
show the terse output (EXPERIMENTAL) (default: nothing) |
| 4791 |
.TP |
| 4792 |
.B \-C, \-\-copies |
| 4793 |
. |
| 4794 |
show source of copied files (DEFAULT: ui.statuscopies) |
| 4795 |
.TP |
| 4796 |
.B \-0, \-\-print0 |
| 4797 |
. |
| 4798 |
end filenames with NUL, for use with xargs |
| 4799 |
.TP |
| 4800 |
.BI \-\-rev \ <REV[+]> |
| 4801 |
. |
| 4802 |
show difference from revision |
| 4803 |
.TP |
| 4804 |
.BI \-\-change \ <REV> |
| 4805 |
. |
| 4806 |
list the changed files of a revision |
| 4807 |
.TP |
| 4808 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 4809 |
. |
| 4810 |
include names matching the given patterns |
| 4811 |
.TP |
| 4812 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 4813 |
. |
| 4814 |
exclude names matching the given patterns |
| 4815 |
.TP |
| 4816 |
.B \-S, \-\-subrepos |
| 4817 |
. |
| 4818 |
recurse into subrepositories |
| 4819 |
.TP |
| 4820 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 4821 |
. |
| 4822 |
display with template |
| 4823 |
.UNINDENT |
| 4824 |
.sp |
| 4825 |
[+] marked option can be specified multiple times |
| 4826 |
.\" |
| 4827 |
. |
| 4828 |
.INDENT 0.0 |
| 4829 |
.INDENT 3.5 |
| 4830 |
.sp |
| 4831 |
aliases: st |
| 4832 |
.UNINDENT |
| 4833 |
.UNINDENT |
| 4834 |
.SS summary |
| 4835 |
.sp |
| 4836 |
summarize working directory state: |
| 4837 |
.sp |
| 4838 |
.nf |
| 4839 |
.ft C |
| 4840 |
hg summary [\-\-remote] |
| 4841 |
.ft P |
| 4842 |
.fi |
| 4843 |
.sp |
| 4844 |
This generates a brief summary of the working directory state, |
| 4845 |
including parents, branch, commit status, phase and available updates. |
| 4846 |
.sp |
| 4847 |
With the \-\-remote option, this will check the default paths for |
| 4848 |
incoming and outgoing changes. This can be time\-consuming. |
| 4849 |
.sp |
| 4850 |
Returns 0 on success. |
| 4851 |
.sp |
| 4852 |
Options: |
| 4853 |
.INDENT 0.0 |
| 4854 |
.TP |
| 4855 |
.B \-\-remote |
| 4856 |
. |
| 4857 |
check for push and pull |
| 4858 |
.UNINDENT |
| 4859 |
.\" |
| 4860 |
. |
| 4861 |
.INDENT 0.0 |
| 4862 |
.INDENT 3.5 |
| 4863 |
.sp |
| 4864 |
aliases: sum |
| 4865 |
.UNINDENT |
| 4866 |
.UNINDENT |
| 4867 |
.SS unshelve |
| 4868 |
.sp |
| 4869 |
restore a shelved change to the working directory: |
| 4870 |
.sp |
| 4871 |
.nf |
| 4872 |
.ft C |
| 4873 |
hg unshelve [OPTION]... [[\-n] SHELVED] |
| 4874 |
.ft P |
| 4875 |
.fi |
| 4876 |
.sp |
| 4877 |
This command accepts an optional name of a shelved change to |
| 4878 |
restore. If none is given, the most recent shelved change is used. |
| 4879 |
.sp |
| 4880 |
If a shelved change is applied successfully, the bundle that |
| 4881 |
contains the shelved changes is moved to a backup location |
| 4882 |
(.hg/shelve\-backup). |
| 4883 |
.sp |
| 4884 |
Since you can restore a shelved change on top of an arbitrary |
| 4885 |
commit, it is possible that unshelving will result in a conflict |
| 4886 |
between your changes and the commits you are unshelving onto. If |
| 4887 |
this occurs, you must resolve the conflict, then use |
| 4888 |
\fB\-\-continue\fP to complete the unshelve operation. (The bundle |
| 4889 |
will not be moved until you successfully complete the unshelve.) |
| 4890 |
.sp |
| 4891 |
(Alternatively, you can use \fB\-\-abort\fP to abandon an unshelve |
| 4892 |
that causes a conflict. This reverts the unshelved changes, and |
| 4893 |
leaves the bundle in place.) |
| 4894 |
.sp |
| 4895 |
If bare shelved change (without interactive, include and exclude |
| 4896 |
option) was done on newly created branch it would restore branch |
| 4897 |
information to the working directory. |
| 4898 |
.sp |
| 4899 |
After a successful unshelve, the shelved changes are stored in a |
| 4900 |
backup directory. Only the N most recent backups are kept. N |
| 4901 |
defaults to 10 but can be overridden using the \fBshelve.maxbackups\fP |
| 4902 |
configuration option. |
| 4903 |
.sp |
| 4904 |
Timestamp in seconds is used to decide order of backups. More |
| 4905 |
than \fBmaxbackups\fP backups are kept, if same timestamp |
| 4906 |
prevents from deciding exact order of them, for safety. |
| 4907 |
.sp |
| 4908 |
Selected changes can be unshelved with \fB\-\-interactive\fP flag. |
| 4909 |
The working directory is updated with the selected changes, and |
| 4910 |
only the unselected changes remain shelved. |
| 4911 |
Note: The whole shelve is applied to working directory first before |
| 4912 |
running interactively. So, this will bring up all the conflicts between |
| 4913 |
working directory and the shelve, irrespective of which changes will be |
| 4914 |
unshelved. |
| 4915 |
.sp |
| 4916 |
Options: |
| 4917 |
.INDENT 0.0 |
| 4918 |
.TP |
| 4919 |
.B \-a, \-\-abort |
| 4920 |
. |
| 4921 |
abort an incomplete unshelve operation |
| 4922 |
.TP |
| 4923 |
.B \-c, \-\-continue |
| 4924 |
. |
| 4925 |
continue an incomplete unshelve operation |
| 4926 |
.TP |
| 4927 |
.B \-i, \-\-interactive |
| 4928 |
. |
| 4929 |
use interactive mode (EXPERIMENTAL) |
| 4930 |
.TP |
| 4931 |
.B \-k, \-\-keep |
| 4932 |
. |
| 4933 |
keep shelve after unshelving |
| 4934 |
.TP |
| 4935 |
.BI \-n, \-\-name \ <NAME> |
| 4936 |
. |
| 4937 |
restore shelved change with given name |
| 4938 |
.TP |
| 4939 |
.BI \-t, \-\-tool \ <VALUE> |
| 4940 |
. |
| 4941 |
specify merge tool |
| 4942 |
.TP |
| 4943 |
.BI \-\-date \ <DATE> |
| 4944 |
. |
| 4945 |
set date for temporary commits (DEPRECATED) |
| 4946 |
.UNINDENT |
| 4947 |
.SS update |
| 4948 |
.sp |
| 4949 |
update working directory (or switch revisions): |
| 4950 |
.sp |
| 4951 |
.nf |
| 4952 |
.ft C |
| 4953 |
hg update [\-C|\-c|\-m] [\-d DATE] [[\-r] REV] |
| 4954 |
.ft P |
| 4955 |
.fi |
| 4956 |
.sp |
| 4957 |
Update the repository\(aqs working directory to the specified |
| 4958 |
changeset. If no changeset is specified, update to the tip of the |
| 4959 |
current named branch and move the active bookmark (see \%\fBhg help |
| 4960 |
bookmarks\fP\:). |
| 4961 |
.sp |
| 4962 |
Update sets the working directory\(aqs parent revision to the specified |
| 4963 |
changeset (see \%\fBhg help parents\fP\:). |
| 4964 |
.sp |
| 4965 |
If the changeset is not a descendant or ancestor of the working |
| 4966 |
directory\(aqs parent and there are uncommitted changes, the update is |
| 4967 |
aborted. With the \-c/\-\-check option, the working directory is checked |
| 4968 |
for uncommitted changes; if none are found, the working directory is |
| 4969 |
updated to the specified changeset. |
| 4970 |
.sp |
| 4971 |
The \-C/\-\-clean, \-c/\-\-check, and \-m/\-\-merge options control what |
| 4972 |
happens if the working directory contains uncommitted changes. |
| 4973 |
At most of one of them can be specified. |
| 4974 |
.INDENT 0.0 |
| 4975 |
.IP 1. 3 |
| 4976 |
. |
| 4977 |
If no option is specified, and if |
| 4978 |
the requested changeset is an ancestor or descendant of |
| 4979 |
the working directory\(aqs parent, the uncommitted changes |
| 4980 |
are merged into the requested changeset and the merged |
| 4981 |
result is left uncommitted. If the requested changeset is |
| 4982 |
not an ancestor or descendant (that is, it is on another |
| 4983 |
branch), the update is aborted and the uncommitted changes |
| 4984 |
are preserved. |
| 4985 |
.IP 2. 3 |
| 4986 |
. |
| 4987 |
With the \-m/\-\-merge option, the update is allowed even if the |
| 4988 |
requested changeset is not an ancestor or descendant of |
| 4989 |
the working directory\(aqs parent. |
| 4990 |
.IP 3. 3 |
| 4991 |
. |
| 4992 |
With the \-c/\-\-check option, the update is aborted and the |
| 4993 |
uncommitted changes are preserved. |
| 4994 |
.IP 4. 3 |
| 4995 |
. |
| 4996 |
With the \-C/\-\-clean option, uncommitted changes are discarded and |
| 4997 |
the working directory is updated to the requested changeset. |
| 4998 |
.UNINDENT |
| 4999 |
.sp |
| 5000 |
To cancel an uncommitted merge (and lose your changes), use |
| 5001 |
\%\fBhg merge \-\-abort\fP\:. |
| 5002 |
.sp |
| 5003 |
Use null as the changeset to remove the working directory (like |
| 5004 |
\%\fBhg clone \-U\fP\:). |
| 5005 |
.sp |
| 5006 |
If you want to revert just one file to an older revision, use |
| 5007 |
\%\fBhg revert [\-r REV] NAME\fP\:. |
| 5008 |
.sp |
| 5009 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 5010 |
.sp |
| 5011 |
Returns 0 on success, 1 if there are unresolved files. |
| 5012 |
.sp |
| 5013 |
Options: |
| 5014 |
.INDENT 0.0 |
| 5015 |
.TP |
| 5016 |
.B \-C, \-\-clean |
| 5017 |
. |
| 5018 |
discard uncommitted changes (no backup) |
| 5019 |
.TP |
| 5020 |
.B \-c, \-\-check |
| 5021 |
. |
| 5022 |
require clean working directory |
| 5023 |
.TP |
| 5024 |
.B \-m, \-\-merge |
| 5025 |
. |
| 5026 |
merge uncommitted changes |
| 5027 |
.TP |
| 5028 |
.BI \-d, \-\-date \ <DATE> |
| 5029 |
. |
| 5030 |
tipmost revision matching date |
| 5031 |
.TP |
| 5032 |
.BI \-r, \-\-rev \ <REV> |
| 5033 |
. |
| 5034 |
revision |
| 5035 |
.TP |
| 5036 |
.BI \-t, \-\-tool \ <TOOL> |
| 5037 |
. |
| 5038 |
specify merge tool |
| 5039 |
.UNINDENT |
| 5040 |
.\" |
| 5041 |
. |
| 5042 |
.INDENT 0.0 |
| 5043 |
.INDENT 3.5 |
| 5044 |
.sp |
| 5045 |
aliases: up checkout co |
| 5046 |
.UNINDENT |
| 5047 |
.UNINDENT |
| 5048 |
.SS Change import/export |
| 5049 |
.SS archive |
| 5050 |
.sp |
| 5051 |
create an unversioned archive of a repository revision: |
| 5052 |
.sp |
| 5053 |
.nf |
| 5054 |
.ft C |
| 5055 |
hg archive [OPTION]... DEST |
| 5056 |
.ft P |
| 5057 |
.fi |
| 5058 |
.sp |
| 5059 |
By default, the revision used is the parent of the working |
| 5060 |
directory; use \-r/\-\-rev to specify a different revision. |
| 5061 |
.sp |
| 5062 |
The archive type is automatically detected based on file |
| 5063 |
extension (to override, use \-t/\-\-type). |
| 5064 |
.sp |
| 5065 |
Examples: |
| 5066 |
.INDENT 0.0 |
| 5067 |
.IP \(bu 2 |
| 5068 |
. |
| 5069 |
create a zip file containing the 1.0 release: |
| 5070 |
.sp |
| 5071 |
.nf |
| 5072 |
.ft C |
| 5073 |
hg archive \-r 1.0 project\-1.0.zip |
| 5074 |
.ft P |
| 5075 |
.fi |
| 5076 |
.IP \(bu 2 |
| 5077 |
. |
| 5078 |
create a tarball excluding .hg files: |
| 5079 |
.sp |
| 5080 |
.nf |
| 5081 |
.ft C |
| 5082 |
hg archive project.tar.gz \-X ".hg*" |
| 5083 |
.ft P |
| 5084 |
.fi |
| 5085 |
.UNINDENT |
| 5086 |
.sp |
| 5087 |
Valid types are: |
| 5088 |
.INDENT 0.0 |
| 5089 |
.TP |
| 5090 |
.B \fBfiles\fP |
| 5091 |
.sp |
| 5092 |
a directory full of files (default) |
| 5093 |
.TP |
| 5094 |
.B \fBtar\fP |
| 5095 |
.sp |
| 5096 |
tar archive, uncompressed |
| 5097 |
.TP |
| 5098 |
.B \fBtbz2\fP |
| 5099 |
.sp |
| 5100 |
tar archive, compressed using bzip2 |
| 5101 |
.TP |
| 5102 |
.B \fBtgz\fP |
| 5103 |
.sp |
| 5104 |
tar archive, compressed using gzip |
| 5105 |
.TP |
| 5106 |
.B \fBtxz\fP |
| 5107 |
.sp |
| 5108 |
tar archive, compressed using lzma (only in Python 3) |
| 5109 |
.TP |
| 5110 |
.B \fBuzip\fP |
| 5111 |
.sp |
| 5112 |
zip archive, uncompressed |
| 5113 |
.TP |
| 5114 |
.B \fBzip\fP |
| 5115 |
.sp |
| 5116 |
zip archive, compressed using deflate |
| 5117 |
.UNINDENT |
| 5118 |
.sp |
| 5119 |
The exact name of the destination archive or directory is given |
| 5120 |
using a format string; see \%\fBhg help export\fP\: for details. |
| 5121 |
.sp |
| 5122 |
Each member added to an archive file has a directory prefix |
| 5123 |
prepended. Use \-p/\-\-prefix to specify a format string for the |
| 5124 |
prefix. The default is the basename of the archive, with suffixes |
| 5125 |
removed. |
| 5126 |
.sp |
| 5127 |
Returns 0 on success. |
| 5128 |
.sp |
| 5129 |
Options: |
| 5130 |
.INDENT 0.0 |
| 5131 |
.TP |
| 5132 |
.B \-\-no\-decode |
| 5133 |
. |
| 5134 |
do not pass files through decoders |
| 5135 |
.TP |
| 5136 |
.BI \-p, \-\-prefix \ <PREFIX> |
| 5137 |
. |
| 5138 |
directory prefix for files in archive |
| 5139 |
.TP |
| 5140 |
.BI \-r, \-\-rev \ <REV> |
| 5141 |
. |
| 5142 |
revision to distribute |
| 5143 |
.TP |
| 5144 |
.BI \-t, \-\-type \ <TYPE> |
| 5145 |
. |
| 5146 |
type of distribution to create |
| 5147 |
.TP |
| 5148 |
.B \-S, \-\-subrepos |
| 5149 |
. |
| 5150 |
recurse into subrepositories |
| 5151 |
.TP |
| 5152 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 5153 |
. |
| 5154 |
include names matching the given patterns |
| 5155 |
.TP |
| 5156 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 5157 |
. |
| 5158 |
exclude names matching the given patterns |
| 5159 |
.UNINDENT |
| 5160 |
.sp |
| 5161 |
[+] marked option can be specified multiple times |
| 5162 |
.SS bundle |
| 5163 |
.sp |
| 5164 |
create a bundle file: |
| 5165 |
.sp |
| 5166 |
.nf |
| 5167 |
.ft C |
| 5168 |
hg bundle [\-f] [\-t BUNDLESPEC] [\-a] [\-r REV]... [\-\-base REV]... FILE [DEST]... |
| 5169 |
.ft P |
| 5170 |
.fi |
| 5171 |
.sp |
| 5172 |
Generate a bundle file containing data to be transferred to another |
| 5173 |
repository. |
| 5174 |
.sp |
| 5175 |
To create a bundle containing all changesets, use \-a/\-\-all |
| 5176 |
(or \-\-base null). Otherwise, hg assumes the destination will have |
| 5177 |
all the nodes you specify with \-\-base parameters. Otherwise, hg |
| 5178 |
will assume the repository has all the nodes in destination, or |
| 5179 |
default\-push/default if no destination is specified, where destination |
| 5180 |
is the repositories you provide through DEST option. |
| 5181 |
.sp |
| 5182 |
You can change bundle format with the \-t/\-\-type option. See |
| 5183 |
\%\fBhg help bundlespec\fP\: for documentation on this format. By default, |
| 5184 |
the most appropriate format is used and compression defaults to |
| 5185 |
bzip2. |
| 5186 |
.sp |
| 5187 |
The bundle file can then be transferred using conventional means |
| 5188 |
and applied to another repository with the unbundle or pull |
| 5189 |
command. This is useful when direct push and pull are not |
| 5190 |
available or when exporting an entire repository is undesirable. |
| 5191 |
.sp |
| 5192 |
Applying bundles preserves all changeset contents including |
| 5193 |
permissions, copy/rename information, and revision history. |
| 5194 |
.sp |
| 5195 |
Returns 0 on success, 1 if no changes found. |
| 5196 |
.sp |
| 5197 |
Options: |
| 5198 |
.INDENT 0.0 |
| 5199 |
.TP |
| 5200 |
.B \-\-exact |
| 5201 |
. |
| 5202 |
compute the base from the revision specified |
| 5203 |
.TP |
| 5204 |
.B \-f, \-\-force |
| 5205 |
. |
| 5206 |
run even when the destination is unrelated |
| 5207 |
.TP |
| 5208 |
.BI \-r, \-\-rev \ <REV[+]> |
| 5209 |
. |
| 5210 |
a changeset intended to be added to the destination |
| 5211 |
.TP |
| 5212 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 5213 |
. |
| 5214 |
a specific branch you would like to bundle |
| 5215 |
.TP |
| 5216 |
.BI \-\-base \ <REV[+]> |
| 5217 |
. |
| 5218 |
a base changeset assumed to be available at the destination |
| 5219 |
.TP |
| 5220 |
.B \-a, \-\-all |
| 5221 |
. |
| 5222 |
bundle all changesets in the repository |
| 5223 |
.TP |
| 5224 |
.BI \-t, \-\-type \ <TYPE> |
| 5225 |
. |
| 5226 |
bundle compression type to use (default: bzip2) |
| 5227 |
.TP |
| 5228 |
.BI \-e, \-\-ssh \ <CMD> |
| 5229 |
. |
| 5230 |
specify ssh command to use |
| 5231 |
.TP |
| 5232 |
.BI \-\-remotecmd \ <CMD> |
| 5233 |
. |
| 5234 |
specify hg command to run on the remote side |
| 5235 |
.TP |
| 5236 |
.B \-\-insecure |
| 5237 |
. |
| 5238 |
do not verify server certificate (ignoring web.cacerts config) |
| 5239 |
.UNINDENT |
| 5240 |
.sp |
| 5241 |
[+] marked option can be specified multiple times |
| 5242 |
.SS export |
| 5243 |
.sp |
| 5244 |
dump the header and diffs for one or more changesets: |
| 5245 |
.sp |
| 5246 |
.nf |
| 5247 |
.ft C |
| 5248 |
hg export [OPTION]... [\-o OUTFILESPEC] [\-r] [REV]... |
| 5249 |
.ft P |
| 5250 |
.fi |
| 5251 |
.sp |
| 5252 |
Print the changeset header and diffs for one or more revisions. |
| 5253 |
If no revision is given, the parent of the working directory is used. |
| 5254 |
.sp |
| 5255 |
The information shown in the changeset header is: author, date, |
| 5256 |
branch name (if non\-default), changeset hash, parent(s) and commit |
| 5257 |
comment. |
| 5258 |
.IP Note |
| 5259 |
. |
| 5260 |
\%\fBhg export\fP\: may generate unexpected diff output for merge |
| 5261 |
changesets, as it will compare the merge changeset against its |
| 5262 |
first parent only. |
| 5263 |
.RE |
| 5264 |
.sp |
| 5265 |
Output may be to a file, in which case the name of the file is |
| 5266 |
given using a template string. See \%\fBhg help templates\fP\:. In addition |
| 5267 |
to the common template keywords, the following formatting rules are |
| 5268 |
supported: |
| 5269 |
.INDENT 0.0 |
| 5270 |
.TP |
| 5271 |
.B \fB%%\fP |
| 5272 |
.sp |
| 5273 |
literal "%" character |
| 5274 |
.TP |
| 5275 |
.B \fB%H\fP |
| 5276 |
.sp |
| 5277 |
changeset hash (40 hexadecimal digits) |
| 5278 |
.TP |
| 5279 |
.B \fB%N\fP |
| 5280 |
.sp |
| 5281 |
number of patches being generated |
| 5282 |
.TP |
| 5283 |
.B \fB%R\fP |
| 5284 |
.sp |
| 5285 |
changeset revision number |
| 5286 |
.TP |
| 5287 |
.B \fB%b\fP |
| 5288 |
.sp |
| 5289 |
basename of the exporting repository |
| 5290 |
.TP |
| 5291 |
.B \fB%h\fP |
| 5292 |
.sp |
| 5293 |
short\-form changeset hash (12 hexadecimal digits) |
| 5294 |
.TP |
| 5295 |
.B \fB%m\fP |
| 5296 |
.sp |
| 5297 |
first line of the commit message (only alphanumeric characters) |
| 5298 |
.TP |
| 5299 |
.B \fB%n\fP |
| 5300 |
.sp |
| 5301 |
zero\-padded sequence number, starting at 1 |
| 5302 |
.TP |
| 5303 |
.B \fB%r\fP |
| 5304 |
.sp |
| 5305 |
zero\-padded changeset revision number |
| 5306 |
.TP |
| 5307 |
.B \fB\e\fP |
| 5308 |
.sp |
| 5309 |
literal "" character |
| 5310 |
.UNINDENT |
| 5311 |
.sp |
| 5312 |
Without the \-a/\-\-text option, export will avoid generating diffs |
| 5313 |
of files it detects as binary. With \-a, export will generate a |
| 5314 |
diff anyway, probably with undesirable results. |
| 5315 |
.sp |
| 5316 |
With \-B/\-\-bookmark changesets reachable by the given bookmark are |
| 5317 |
selected. |
| 5318 |
.sp |
| 5319 |
Use the \-g/\-\-git option to generate diffs in the git extended diff |
| 5320 |
format. See \%\fBhg help diffs\fP\: for more information. |
| 5321 |
.sp |
| 5322 |
With the \-\-switch\-parent option, the diff will be against the |
| 5323 |
second parent. It can be useful to review a merge. |
| 5324 |
.sp |
| 5325 |
Template: |
| 5326 |
.sp |
| 5327 |
The following keywords are supported in addition to the common template |
| 5328 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 5329 |
.INDENT 0.0 |
| 5330 |
.TP |
| 5331 |
.B diff |
| 5332 |
. |
| 5333 |
String. Diff content. |
| 5334 |
.TP |
| 5335 |
.B parents |
| 5336 |
. |
| 5337 |
List of strings. Parent nodes of the changeset. |
| 5338 |
.UNINDENT |
| 5339 |
.sp |
| 5340 |
Examples: |
| 5341 |
.INDENT 0.0 |
| 5342 |
.IP \(bu 2 |
| 5343 |
. |
| 5344 |
use export and import to transplant a bugfix to the current |
| 5345 |
branch: |
| 5346 |
.sp |
| 5347 |
.nf |
| 5348 |
.ft C |
| 5349 |
hg export \-r 9353 | hg import \- |
| 5350 |
.ft P |
| 5351 |
.fi |
| 5352 |
.IP \(bu 2 |
| 5353 |
. |
| 5354 |
export all the changesets between two revisions to a file with |
| 5355 |
rename information: |
| 5356 |
.sp |
| 5357 |
.nf |
| 5358 |
.ft C |
| 5359 |
hg export \-\-git \-r 123:150 > changes.txt |
| 5360 |
.ft P |
| 5361 |
.fi |
| 5362 |
.IP \(bu 2 |
| 5363 |
. |
| 5364 |
split outgoing changes into a series of patches with |
| 5365 |
descriptive names: |
| 5366 |
.sp |
| 5367 |
.nf |
| 5368 |
.ft C |
| 5369 |
hg export \-r "outgoing()" \-o "%n\-%m.patch" |
| 5370 |
.ft P |
| 5371 |
.fi |
| 5372 |
.UNINDENT |
| 5373 |
.sp |
| 5374 |
Returns 0 on success. |
| 5375 |
.sp |
| 5376 |
Options: |
| 5377 |
.INDENT 0.0 |
| 5378 |
.TP |
| 5379 |
.BI \-B, \-\-bookmark \ <BOOKMARK> |
| 5380 |
. |
| 5381 |
export changes only reachable by given bookmark |
| 5382 |
.TP |
| 5383 |
.BI \-o, \-\-output \ <FORMAT> |
| 5384 |
. |
| 5385 |
print output to file with formatted name |
| 5386 |
.TP |
| 5387 |
.B \-\-switch\-parent |
| 5388 |
. |
| 5389 |
diff against the second parent |
| 5390 |
.TP |
| 5391 |
.BI \-r, \-\-rev \ <REV[+]> |
| 5392 |
. |
| 5393 |
revisions to export |
| 5394 |
.TP |
| 5395 |
.B \-a, \-\-text |
| 5396 |
. |
| 5397 |
treat all files as text |
| 5398 |
.TP |
| 5399 |
.B \-g, \-\-git |
| 5400 |
. |
| 5401 |
use git extended diff format (DEFAULT: diff.git) |
| 5402 |
.TP |
| 5403 |
.B \-\-binary |
| 5404 |
. |
| 5405 |
generate binary diffs in git mode (default) |
| 5406 |
.TP |
| 5407 |
.B \-\-nodates |
| 5408 |
. |
| 5409 |
omit dates from diff headers |
| 5410 |
.TP |
| 5411 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 5412 |
. |
| 5413 |
display with template |
| 5414 |
.UNINDENT |
| 5415 |
.sp |
| 5416 |
[+] marked option can be specified multiple times |
| 5417 |
.SS import |
| 5418 |
.sp |
| 5419 |
import an ordered set of patches: |
| 5420 |
.sp |
| 5421 |
.nf |
| 5422 |
.ft C |
| 5423 |
hg import [OPTION]... PATCH... |
| 5424 |
.ft P |
| 5425 |
.fi |
| 5426 |
.sp |
| 5427 |
Import a list of patches and commit them individually (unless |
| 5428 |
\-\-no\-commit is specified). |
| 5429 |
.sp |
| 5430 |
To read a patch from standard input (stdin), use "\-" as the patch |
| 5431 |
name. If a URL is specified, the patch will be downloaded from |
| 5432 |
there. |
| 5433 |
.sp |
| 5434 |
Import first applies changes to the working directory (unless |
| 5435 |
\-\-bypass is specified), import will abort if there are outstanding |
| 5436 |
changes. |
| 5437 |
.sp |
| 5438 |
Use \-\-bypass to apply and commit patches directly to the |
| 5439 |
repository, without affecting the working directory. Without |
| 5440 |
\-\-exact, patches will be applied on top of the working directory |
| 5441 |
parent revision. |
| 5442 |
.sp |
| 5443 |
You can import a patch straight from a mail message. Even patches |
| 5444 |
as attachments work (to use the body part, it must have type |
| 5445 |
text/plain or text/x\-patch). From and Subject headers of email |
| 5446 |
message are used as default committer and commit message. All |
| 5447 |
text/plain body parts before first diff are added to the commit |
| 5448 |
message. |
| 5449 |
.sp |
| 5450 |
If the imported patch was generated by \%\fBhg export\fP\:, user and |
| 5451 |
description from patch override values from message headers and |
| 5452 |
body. Values given on command line with \-m/\-\-message and \-u/\-\-user |
| 5453 |
override these. |
| 5454 |
.sp |
| 5455 |
If \-\-exact is specified, import will set the working directory to |
| 5456 |
the parent of each patch before applying it, and will abort if the |
| 5457 |
resulting changeset has a different ID than the one recorded in |
| 5458 |
the patch. This will guard against various ways that portable |
| 5459 |
patch formats and mail systems might fail to transfer Mercurial |
| 5460 |
data or metadata. See \%\fBhg bundle\fP\: for lossless transmission. |
| 5461 |
.sp |
| 5462 |
Use \-\-partial to ensure a changeset will be created from the patch |
| 5463 |
even if some hunks fail to apply. Hunks that fail to apply will be |
| 5464 |
written to a <target\-file>.rej file. Conflicts can then be resolved |
| 5465 |
by hand before \%\fBhg commit \-\-amend\fP\: is run to update the created |
| 5466 |
changeset. This flag exists to let people import patches that |
| 5467 |
partially apply without losing the associated metadata (author, |
| 5468 |
date, description, ...). |
| 5469 |
.IP Note |
| 5470 |
. |
| 5471 |
When no hunks apply cleanly, \%\fBhg import \-\-partial\fP\: will create |
| 5472 |
an empty changeset, importing only the patch metadata. |
| 5473 |
.RE |
| 5474 |
.sp |
| 5475 |
With \-s/\-\-similarity, hg will attempt to discover renames and |
| 5476 |
copies in the patch in the same way as \%\fBhg addremove\fP\:. |
| 5477 |
.sp |
| 5478 |
It is possible to use external patch programs to perform the patch |
| 5479 |
by setting the \fBui.patch\fP configuration option. For the default |
| 5480 |
internal tool, the fuzz can also be configured via \fBpatch.fuzz\fP. |
| 5481 |
See \%\fBhg help config\fP\: for more information about configuration |
| 5482 |
files and how to use these options. |
| 5483 |
.sp |
| 5484 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 5485 |
.sp |
| 5486 |
Examples: |
| 5487 |
.INDENT 0.0 |
| 5488 |
.IP \(bu 2 |
| 5489 |
. |
| 5490 |
import a traditional patch from a website and detect renames: |
| 5491 |
.sp |
| 5492 |
.nf |
| 5493 |
.ft C |
| 5494 |
hg import \-s 80 http://example.com/bugfix.patch |
| 5495 |
.ft P |
| 5496 |
.fi |
| 5497 |
.IP \(bu 2 |
| 5498 |
. |
| 5499 |
import a changeset from an hgweb server: |
| 5500 |
.sp |
| 5501 |
.nf |
| 5502 |
.ft C |
| 5503 |
hg import https://www.mercurial\-scm.org/repo/hg/rev/5ca8c111e9aa |
| 5504 |
.ft P |
| 5505 |
.fi |
| 5506 |
.IP \(bu 2 |
| 5507 |
. |
| 5508 |
import all the patches in an Unix\-style mbox: |
| 5509 |
.sp |
| 5510 |
.nf |
| 5511 |
.ft C |
| 5512 |
hg import incoming\-patches.mbox |
| 5513 |
.ft P |
| 5514 |
.fi |
| 5515 |
.IP \(bu 2 |
| 5516 |
. |
| 5517 |
import patches from stdin: |
| 5518 |
.sp |
| 5519 |
.nf |
| 5520 |
.ft C |
| 5521 |
hg import \- |
| 5522 |
.ft P |
| 5523 |
.fi |
| 5524 |
.IP \(bu 2 |
| 5525 |
. |
| 5526 |
attempt to exactly restore an exported changeset (not always |
| 5527 |
possible): |
| 5528 |
.sp |
| 5529 |
.nf |
| 5530 |
.ft C |
| 5531 |
hg import \-\-exact proposed\-fix.patch |
| 5532 |
.ft P |
| 5533 |
.fi |
| 5534 |
.IP \(bu 2 |
| 5535 |
. |
| 5536 |
use an external tool to apply a patch which is too fuzzy for |
| 5537 |
the default internal tool. |
| 5538 |
.INDENT 2.0 |
| 5539 |
.INDENT 3.5 |
| 5540 |
.sp |
| 5541 |
hg import \-\-config ui.patch="patch \-\-merge" fuzzy.patch |
| 5542 |
.UNINDENT |
| 5543 |
.UNINDENT |
| 5544 |
.IP \(bu 2 |
| 5545 |
. |
| 5546 |
change the default fuzzing from 2 to a less strict 7 |
| 5547 |
.INDENT 2.0 |
| 5548 |
.INDENT 3.5 |
| 5549 |
.sp |
| 5550 |
hg import \-\-config ui.fuzz=7 fuzz.patch |
| 5551 |
.UNINDENT |
| 5552 |
.UNINDENT |
| 5553 |
.UNINDENT |
| 5554 |
.sp |
| 5555 |
Returns 0 on success, 1 on partial success (see \-\-partial). |
| 5556 |
.sp |
| 5557 |
Options: |
| 5558 |
.INDENT 0.0 |
| 5559 |
.TP |
| 5560 |
.BI \-p, \-\-strip \ <NUM> |
| 5561 |
. |
| 5562 |
directory strip option for patch. This has the same meaning as the corresponding patch option (default: 1) |
| 5563 |
.TP |
| 5564 |
.BI \-b, \-\-base \ <PATH> |
| 5565 |
. |
| 5566 |
base path (DEPRECATED) |
| 5567 |
.TP |
| 5568 |
.B \-\-secret |
| 5569 |
. |
| 5570 |
use the secret phase for committing |
| 5571 |
.TP |
| 5572 |
.B \-e, \-\-edit |
| 5573 |
. |
| 5574 |
invoke editor on commit messages |
| 5575 |
.TP |
| 5576 |
.B \-f, \-\-force |
| 5577 |
. |
| 5578 |
skip check for outstanding uncommitted changes (DEPRECATED) |
| 5579 |
.TP |
| 5580 |
.B \-\-no\-commit |
| 5581 |
. |
| 5582 |
don\(aqt commit, just update the working directory |
| 5583 |
.TP |
| 5584 |
.B \-\-bypass |
| 5585 |
. |
| 5586 |
apply patch without touching the working directory |
| 5587 |
.TP |
| 5588 |
.B \-\-partial |
| 5589 |
. |
| 5590 |
commit even if some hunks fail |
| 5591 |
.TP |
| 5592 |
.B \-\-exact |
| 5593 |
. |
| 5594 |
abort if patch would apply lossily |
| 5595 |
.TP |
| 5596 |
.BI \-\-prefix \ <DIR> |
| 5597 |
. |
| 5598 |
apply patch to subdirectory |
| 5599 |
.TP |
| 5600 |
.B \-\-import\-branch |
| 5601 |
. |
| 5602 |
use any branch information in patch (implied by \-\-exact) |
| 5603 |
.TP |
| 5604 |
.BI \-m, \-\-message \ <TEXT> |
| 5605 |
. |
| 5606 |
use text as commit message |
| 5607 |
.TP |
| 5608 |
.BI \-l, \-\-logfile \ <FILE> |
| 5609 |
. |
| 5610 |
read commit message from file |
| 5611 |
.TP |
| 5612 |
.BI \-d, \-\-date \ <DATE> |
| 5613 |
. |
| 5614 |
record the specified date as commit date |
| 5615 |
.TP |
| 5616 |
.BI \-u, \-\-user \ <USER> |
| 5617 |
. |
| 5618 |
record the specified user as committer |
| 5619 |
.TP |
| 5620 |
.BI \-s, \-\-similarity \ <SIMILARITY> |
| 5621 |
. |
| 5622 |
guess renamed files by similarity (0<=s<=100) |
| 5623 |
.UNINDENT |
| 5624 |
.\" |
| 5625 |
. |
| 5626 |
.INDENT 0.0 |
| 5627 |
.INDENT 3.5 |
| 5628 |
.sp |
| 5629 |
aliases: patch |
| 5630 |
.UNINDENT |
| 5631 |
.UNINDENT |
| 5632 |
.SS unbundle |
| 5633 |
.sp |
| 5634 |
apply one or more bundle files: |
| 5635 |
.sp |
| 5636 |
.nf |
| 5637 |
.ft C |
| 5638 |
hg unbundle [\-u] FILE... |
| 5639 |
.ft P |
| 5640 |
.fi |
| 5641 |
.sp |
| 5642 |
Apply one or more bundle files generated by \%\fBhg bundle\fP\:. |
| 5643 |
.sp |
| 5644 |
Returns 0 on success, 1 if an update has unresolved files. |
| 5645 |
.sp |
| 5646 |
Options: |
| 5647 |
.INDENT 0.0 |
| 5648 |
.TP |
| 5649 |
.B \-u, \-\-update |
| 5650 |
. |
| 5651 |
update to new branch head if changesets were unbundled |
| 5652 |
.UNINDENT |
| 5653 |
.SS Repository maintenance |
| 5654 |
.SS admin::narrow\-client |
| 5655 |
.sp |
| 5656 |
Narrow\-related client administration utils. (EXPERIMENTAL): |
| 5657 |
.sp |
| 5658 |
.nf |
| 5659 |
.ft C |
| 5660 |
hg admin::narrow\-client |
| 5661 |
.ft P |
| 5662 |
.fi |
| 5663 |
.sp |
| 5664 |
This command is experimental and is subject to change. |
| 5665 |
.sp |
| 5666 |
Options: |
| 5667 |
.INDENT 0.0 |
| 5668 |
.TP |
| 5669 |
.B \-\-store\-fingerprint |
| 5670 |
. |
| 5671 |
get the fingerprint for this repo\(aqs store narrowspec |
| 5672 |
.UNINDENT |
| 5673 |
.SS admin::narrow\-server |
| 5674 |
.sp |
| 5675 |
Narrow\-related server administration utils. (EXPERIMENTAL): |
| 5676 |
.sp |
| 5677 |
.nf |
| 5678 |
.ft C |
| 5679 |
hg admin::narrow\-server |
| 5680 |
.ft P |
| 5681 |
.fi |
| 5682 |
.sp |
| 5683 |
This command is experimental and is subject to change. |
| 5684 |
.sp |
| 5685 |
Options: |
| 5686 |
.INDENT 0.0 |
| 5687 |
.TP |
| 5688 |
.B \-\-shape\-fingerprints |
| 5689 |
. |
| 5690 |
list the fingerprint for each shape |
| 5691 |
.TP |
| 5692 |
.BI \-\-shape\-patterns \ <SHAPE\-PATTERNS> |
| 5693 |
. |
| 5694 |
list the path patterns for the given shape |
| 5695 |
.TP |
| 5696 |
.BI \-\-shape\-narrow\-patterns \ <SHAPE\-NARROW\-PATTERNS> |
| 5697 |
. |
| 5698 |
list the legacy narrow\-style patterns for the given shape |
| 5699 |
.TP |
| 5700 |
.BI \-\-shape\-files \ <VALUE> |
| 5701 |
. |
| 5702 |
list the files covered by the given shape |
| 5703 |
.TP |
| 5704 |
.BI \-\-shape\-files\-hidden \ <VALUE> |
| 5705 |
. |
| 5706 |
list this shape\(aqs files that are not in the working copy |
| 5707 |
.TP |
| 5708 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 5709 |
. |
| 5710 |
display with template |
| 5711 |
.UNINDENT |
| 5712 |
.SS admin::verify |
| 5713 |
.sp |
| 5714 |
verify the integrity of the repository: |
| 5715 |
.sp |
| 5716 |
.nf |
| 5717 |
.ft C |
| 5718 |
hg admin::verify |
| 5719 |
.ft P |
| 5720 |
.fi |
| 5721 |
.sp |
| 5722 |
Alternative UI to \fIhg verify\fP with a lot more control over the |
| 5723 |
verification process and better error reporting. |
| 5724 |
.sp |
| 5725 |
Options: |
| 5726 |
.INDENT 0.0 |
| 5727 |
.TP |
| 5728 |
.BI \-c, \-\-check \ <CHECK[+]> |
| 5729 |
. |
| 5730 |
add a check |
| 5731 |
.TP |
| 5732 |
.BI \-o, \-\-option \ <OPTION[+]> |
| 5733 |
. |
| 5734 |
pass an option to a check |
| 5735 |
.UNINDENT |
| 5736 |
.sp |
| 5737 |
[+] marked option can be specified multiple times |
| 5738 |
.SS manifest |
| 5739 |
.sp |
| 5740 |
output the current or given revision of the project manifest: |
| 5741 |
.sp |
| 5742 |
.nf |
| 5743 |
.ft C |
| 5744 |
hg manifest [\-r REV] |
| 5745 |
.ft P |
| 5746 |
.fi |
| 5747 |
.sp |
| 5748 |
Print a list of version controlled files for the given revision. |
| 5749 |
If no revision is given, the first parent of the working directory |
| 5750 |
is used, or the null revision if no revision is checked out. |
| 5751 |
.sp |
| 5752 |
With \-v, print file permissions, symlink and executable bits. |
| 5753 |
With \-\-debug, print file revision hashes. |
| 5754 |
.sp |
| 5755 |
If option \-\-all is specified, the list of all files from all revisions |
| 5756 |
is printed. This includes deleted and renamed files. |
| 5757 |
.sp |
| 5758 |
Returns 0 on success. |
| 5759 |
.sp |
| 5760 |
Options: |
| 5761 |
.INDENT 0.0 |
| 5762 |
.TP |
| 5763 |
.BI \-r, \-\-rev \ <REV> |
| 5764 |
. |
| 5765 |
revision to display |
| 5766 |
.TP |
| 5767 |
.B \-\-all |
| 5768 |
. |
| 5769 |
list files from all revisions |
| 5770 |
.TP |
| 5771 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 5772 |
. |
| 5773 |
display with template |
| 5774 |
.UNINDENT |
| 5775 |
.SS recover |
| 5776 |
.sp |
| 5777 |
roll back an interrupted transaction: |
| 5778 |
.sp |
| 5779 |
.nf |
| 5780 |
.ft C |
| 5781 |
hg recover |
| 5782 |
.ft P |
| 5783 |
.fi |
| 5784 |
.sp |
| 5785 |
Recover from an interrupted commit or pull. |
| 5786 |
.sp |
| 5787 |
This command tries to fix the repository status after an |
| 5788 |
interrupted operation. It should only be necessary when Mercurial |
| 5789 |
suggests it. |
| 5790 |
.sp |
| 5791 |
Returns 0 if successful, 1 if nothing to recover or verify fails. |
| 5792 |
.sp |
| 5793 |
Options: |
| 5794 |
.INDENT 0.0 |
| 5795 |
.TP |
| 5796 |
.B \-\-verify |
| 5797 |
. |
| 5798 |
run \fIhg verify\fP after successful recover |
| 5799 |
.UNINDENT |
| 5800 |
.SS rollback |
| 5801 |
.sp |
| 5802 |
roll back the last transaction (DANGEROUS) (DEPRECATED): |
| 5803 |
.sp |
| 5804 |
.nf |
| 5805 |
.ft C |
| 5806 |
hg rollback |
| 5807 |
.ft P |
| 5808 |
.fi |
| 5809 |
.sp |
| 5810 |
Please use \%\fBhg commit \-\-amend\fP\: instead of rollback to correct |
| 5811 |
mistakes in the last commit. |
| 5812 |
.sp |
| 5813 |
This command should be used with care. There is only one level of |
| 5814 |
rollback, and there is no way to undo a rollback. It will also |
| 5815 |
restore the dirstate at the time of the last transaction, losing |
| 5816 |
any dirstate changes since that time. This command does not alter |
| 5817 |
the working directory. |
| 5818 |
.sp |
| 5819 |
Transactions are used to encapsulate the effects of all commands |
| 5820 |
that create new changesets or propagate existing changesets into a |
| 5821 |
repository. |
| 5822 |
.sp |
| 5823 |
For example, the following commands are transactional, and their |
| 5824 |
effects can be rolled back: |
| 5825 |
.INDENT 0.0 |
| 5826 |
.IP \(bu 2 |
| 5827 |
. |
| 5828 |
commit |
| 5829 |
.IP \(bu 2 |
| 5830 |
. |
| 5831 |
import |
| 5832 |
.IP \(bu 2 |
| 5833 |
. |
| 5834 |
pull |
| 5835 |
.IP \(bu 2 |
| 5836 |
. |
| 5837 |
push (with this repository as the destination) |
| 5838 |
.IP \(bu 2 |
| 5839 |
. |
| 5840 |
unbundle |
| 5841 |
.UNINDENT |
| 5842 |
.sp |
| 5843 |
To avoid permanent data loss, rollback will refuse to rollback a |
| 5844 |
commit transaction if it isn\(aqt checked out. Use \-\-force to |
| 5845 |
override this protection. |
| 5846 |
.sp |
| 5847 |
The rollback command can be entirely disabled by setting the |
| 5848 |
\fBui.rollback\fP configuration setting to false. If you\(aqre here |
| 5849 |
because you want to use rollback and it\(aqs disabled, you can |
| 5850 |
re\-enable the command by setting \fBui.rollback\fP to true. |
| 5851 |
.sp |
| 5852 |
This command is not intended for use on public repositories. Once |
| 5853 |
changes are visible for pull by other users, rolling a transaction |
| 5854 |
back locally is ineffective (someone else may already have pulled |
| 5855 |
the changes). Furthermore, a race is possible with readers of the |
| 5856 |
repository; for example an in\-progress pull from the repository |
| 5857 |
may fail if a rollback is performed. |
| 5858 |
.sp |
| 5859 |
Returns 0 on success, 1 if no rollback data is available. |
| 5860 |
.sp |
| 5861 |
Options: |
| 5862 |
.INDENT 0.0 |
| 5863 |
.TP |
| 5864 |
.B \-n, \-\-dry\-run |
| 5865 |
. |
| 5866 |
do not perform actions, just print output |
| 5867 |
.TP |
| 5868 |
.B \-f, \-\-force |
| 5869 |
. |
| 5870 |
ignore safety measures |
| 5871 |
.UNINDENT |
| 5872 |
.SS verify |
| 5873 |
.sp |
| 5874 |
verify the integrity of the repository: |
| 5875 |
.sp |
| 5876 |
.nf |
| 5877 |
.ft C |
| 5878 |
hg verify |
| 5879 |
.ft P |
| 5880 |
.fi |
| 5881 |
.sp |
| 5882 |
Verify the integrity of the current repository. |
| 5883 |
.sp |
| 5884 |
This will perform an extensive check of the repository\(aqs |
| 5885 |
integrity, validating the hashes and checksums of each entry in |
| 5886 |
the changelog, manifest, and tracked files, as well as the |
| 5887 |
integrity of their crosslinks and indices. |
| 5888 |
.sp |
| 5889 |
Please see \%https://mercurial\-scm.org/wiki/RepositoryCorruption\: |
| 5890 |
for more information about recovery from corruption of the |
| 5891 |
repository. |
| 5892 |
.sp |
| 5893 |
For an alternative UI with a lot more control over the verification |
| 5894 |
process and better error reporting, try \fIhg help admin::verify\fP. |
| 5895 |
.sp |
| 5896 |
Returns 0 on success, 1 if errors are encountered. |
| 5897 |
.sp |
| 5898 |
Options: |
| 5899 |
.INDENT 0.0 |
| 5900 |
.TP |
| 5901 |
.B \-\-full |
| 5902 |
. |
| 5903 |
perform more checks (EXPERIMENTAL) |
| 5904 |
.UNINDENT |
| 5905 |
.SS Help |
| 5906 |
.SS config |
| 5907 |
.sp |
| 5908 |
show combined config settings from all hgrc files: |
| 5909 |
.sp |
| 5910 |
.nf |
| 5911 |
.ft C |
| 5912 |
hg config [\-u] [NAME]... |
| 5913 |
.ft P |
| 5914 |
.fi |
| 5915 |
.sp |
| 5916 |
With no arguments, print names and values of all config items. |
| 5917 |
.sp |
| 5918 |
With one argument of the form section.name, print just the value |
| 5919 |
of that config item. |
| 5920 |
.sp |
| 5921 |
With multiple arguments, print names and values of all config |
| 5922 |
items with matching section names or section.names. |
| 5923 |
.sp |
| 5924 |
With \-\-edit, start an editor on the user\-level config file. With |
| 5925 |
\-\-global, edit the system\-wide config file. With \-\-local, edit the |
| 5926 |
repository\-level config file. |
| 5927 |
.sp |
| 5928 |
With \-\-source, the source (filename and line number) is printed |
| 5929 |
for each config item. |
| 5930 |
.sp |
| 5931 |
See \%\fBhg help config\fP\: for more information about config files. |
| 5932 |
.sp |
| 5933 |
\-\-non\-shared flag is used to edit \fI.hg/hgrc\-not\-shared\fP config file. |
| 5934 |
This file is not shared across shares when in share\-safe mode. |
| 5935 |
.sp |
| 5936 |
Template: |
| 5937 |
.sp |
| 5938 |
The following keywords are supported. See also \%\fBhg help templates\fP\:. |
| 5939 |
.INDENT 0.0 |
| 5940 |
.TP |
| 5941 |
.B name |
| 5942 |
. |
| 5943 |
String. Config name. |
| 5944 |
.TP |
| 5945 |
.B source |
| 5946 |
. |
| 5947 |
String. Filename and line number where the item is defined. |
| 5948 |
.TP |
| 5949 |
.B value |
| 5950 |
. |
| 5951 |
String. Config value. |
| 5952 |
.UNINDENT |
| 5953 |
.sp |
| 5954 |
The \-\-shared flag can be used to edit the config file of shared source |
| 5955 |
repository. It only works when you have shared using the experimental |
| 5956 |
share safe feature. |
| 5957 |
.sp |
| 5958 |
Returns 0 on success, 1 if NAME does not exist. |
| 5959 |
.sp |
| 5960 |
Options: |
| 5961 |
.INDENT 0.0 |
| 5962 |
.TP |
| 5963 |
.B \-u, \-\-untrusted |
| 5964 |
. |
| 5965 |
show untrusted configuration options |
| 5966 |
.TP |
| 5967 |
.B \-\-exp\-all\-known |
| 5968 |
. |
| 5969 |
show all known config option (EXPERIMENTAL) |
| 5970 |
.TP |
| 5971 |
.B \-e, \-\-edit |
| 5972 |
. |
| 5973 |
edit user config |
| 5974 |
.TP |
| 5975 |
.B \-l, \-\-local |
| 5976 |
. |
| 5977 |
edit repository config |
| 5978 |
.TP |
| 5979 |
.B \-\-source |
| 5980 |
. |
| 5981 |
show source of configuration value |
| 5982 |
.TP |
| 5983 |
.B \-\-shared |
| 5984 |
. |
| 5985 |
edit shared source repository config |
| 5986 |
.TP |
| 5987 |
.B \-\-non\-shared |
| 5988 |
. |
| 5989 |
edit non shared config |
| 5990 |
.TP |
| 5991 |
.B \-g, \-\-global |
| 5992 |
. |
| 5993 |
edit global config |
| 5994 |
.TP |
| 5995 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 5996 |
. |
| 5997 |
display with template |
| 5998 |
.UNINDENT |
| 5999 |
.\" |
| 6000 |
. |
| 6001 |
.INDENT 0.0 |
| 6002 |
.INDENT 3.5 |
| 6003 |
.sp |
| 6004 |
aliases: showconfig debugconfig |
| 6005 |
.UNINDENT |
| 6006 |
.UNINDENT |
| 6007 |
.SS help |
| 6008 |
.sp |
| 6009 |
show help for a given topic or a help overview: |
| 6010 |
.sp |
| 6011 |
.nf |
| 6012 |
.ft C |
| 6013 |
hg help [\-eck] [\-s PLATFORM] [TOPIC] |
| 6014 |
.ft P |
| 6015 |
.fi |
| 6016 |
.sp |
| 6017 |
With no arguments, print a list of commands with short help messages. |
| 6018 |
.sp |
| 6019 |
Given a topic, extension, or command name, print help for that |
| 6020 |
topic. |
| 6021 |
.sp |
| 6022 |
Returns 0 if successful. |
| 6023 |
.sp |
| 6024 |
Options: |
| 6025 |
.INDENT 0.0 |
| 6026 |
.TP |
| 6027 |
.B \-e, \-\-extension |
| 6028 |
. |
| 6029 |
show only help for extensions |
| 6030 |
.TP |
| 6031 |
.B \-c, \-\-command |
| 6032 |
. |
| 6033 |
show only help for commands |
| 6034 |
.TP |
| 6035 |
.B \-k, \-\-keyword |
| 6036 |
. |
| 6037 |
show topics matching keyword |
| 6038 |
.TP |
| 6039 |
.BI \-s, \-\-system \ <PLATFORM[+]> |
| 6040 |
. |
| 6041 |
show help for specific platform(s) |
| 6042 |
.UNINDENT |
| 6043 |
.sp |
| 6044 |
[+] marked option can be specified multiple times |
| 6045 |
.SS version |
| 6046 |
.sp |
| 6047 |
output version and copyright information: |
| 6048 |
.sp |
| 6049 |
.nf |
| 6050 |
.ft C |
| 6051 |
hg version |
| 6052 |
.ft P |
| 6053 |
.fi |
| 6054 |
.sp |
| 6055 |
Template: |
| 6056 |
.sp |
| 6057 |
The following keywords are supported. See also \%\fBhg help templates\fP\:. |
| 6058 |
.INDENT 0.0 |
| 6059 |
.TP |
| 6060 |
.B extensions |
| 6061 |
. |
| 6062 |
List of extensions. |
| 6063 |
.TP |
| 6064 |
.B ver |
| 6065 |
. |
| 6066 |
String. Version number. |
| 6067 |
.UNINDENT |
| 6068 |
.sp |
| 6069 |
And each entry of \fB{extensions}\fP provides the following sub\-keywords |
| 6070 |
in addition to \fB{ver}\fP. |
| 6071 |
.INDENT 0.0 |
| 6072 |
.TP |
| 6073 |
.B bundled |
| 6074 |
. |
| 6075 |
Boolean. True if included in the release. |
| 6076 |
.TP |
| 6077 |
.B name |
| 6078 |
. |
| 6079 |
String. Extension name. |
| 6080 |
.UNINDENT |
| 6081 |
.sp |
| 6082 |
Options: |
| 6083 |
.INDENT 0.0 |
| 6084 |
.TP |
| 6085 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 6086 |
. |
| 6087 |
display with template |
| 6088 |
.UNINDENT |
| 6089 |
.SS Uncategorized commands |
| 6090 |
.SS admin::chainsaw\-update |
| 6091 |
.sp |
| 6092 |
pull and update to a given revision, no matter what, (EXPERIMENTAL): |
| 6093 |
.sp |
| 6094 |
.nf |
| 6095 |
.ft C |
| 6096 |
hg admin::chainsaw\-update [OPTION] \-\-rev REV \-\-source SOURCE \-\-dest DEST |
| 6097 |
.ft P |
| 6098 |
.fi |
| 6099 |
.sp |
| 6100 |
Context of application: \fIsome\fP Continuous Integration (CI) systems, |
| 6101 |
packaging or deployment tools. |
| 6102 |
.sp |
| 6103 |
Wanted end result: local repository at the given REPO_PATH, having the |
| 6104 |
latest changes to the given revision and with a clean working directory |
| 6105 |
updated at the given revision. |
| 6106 |
.sp |
| 6107 |
chainsaw\-update pulls from one source, then updates the working directory |
| 6108 |
to the given revision, overcoming anything that would stand in the way. |
| 6109 |
.sp |
| 6110 |
By default, it will: |
| 6111 |
.INDENT 0.0 |
| 6112 |
.IP \(bu 2 |
| 6113 |
. |
| 6114 |
clone if the local repo does not exist yet, \fBremoving any directory |
| 6115 |
at the given path\fP that would not be a Mercurial repository. |
| 6116 |
The initial clone is full by default, so that clonebundles can be |
| 6117 |
applied. Use the \-\-initial\-clone\-minimal flag to avoid this. |
| 6118 |
.IP \(bu 2 |
| 6119 |
. |
| 6120 |
break locks if needed, leading to possible corruption if there |
| 6121 |
is a concurrent write access. |
| 6122 |
.IP \(bu 2 |
| 6123 |
. |
| 6124 |
perform recovery actions if needed |
| 6125 |
.IP \(bu 2 |
| 6126 |
. |
| 6127 |
revert any local modification. |
| 6128 |
.IP \(bu 2 |
| 6129 |
. |
| 6130 |
purge unknown and ignored files. |
| 6131 |
.IP \(bu 2 |
| 6132 |
. |
| 6133 |
go as far as to reclone if everything else failed (not implemented yet). |
| 6134 |
.UNINDENT |
| 6135 |
.sp |
| 6136 |
DO NOT use it for anything else than performing a series |
| 6137 |
of unattended updates, with full exclusive repository access each time |
| 6138 |
and without any other local work than running build scripts. |
| 6139 |
In case the local repository is a share (see \%\fBhg help share\fP\:), exclusive |
| 6140 |
write access to the share source is also mandatory. |
| 6141 |
.sp |
| 6142 |
It is recommended to run these commands with the \fBHGPLAIN\fP environment |
| 6143 |
variable (see \%\fBhg scripting\fP\:). |
| 6144 |
.sp |
| 6145 |
Motivation: in Continuous Integration and Delivery systems (CI/CD), the |
| 6146 |
occasional remnant or bogus lock are common sources of waste of time (both |
| 6147 |
working time and calendar time). CI/CD scripts tend to grow with counter\- |
| 6148 |
measures, often done in urgency. Also, whilst it is neat to keep |
| 6149 |
repositories from one job to the next (especially with large |
| 6150 |
repositories), an exceptional recloning is better than missing a release |
| 6151 |
deadline. |
| 6152 |
.sp |
| 6153 |
Options: |
| 6154 |
.INDENT 0.0 |
| 6155 |
.TP |
| 6156 |
.B \-\-purge\-unknown |
| 6157 |
. |
| 6158 |
Remove unversioned files before update. Disabling this can in some cases interfere with the update.See also \%\fBhg purge\fP\:. (default: True) |
| 6159 |
.TP |
| 6160 |
.B \-\-purge\-ignored |
| 6161 |
. |
| 6162 |
Remove ignored files before update. Disable this for instance to reuse previous compiler object files. See also \%\fBhg purge\fP\:. (default: True) |
| 6163 |
.TP |
| 6164 |
.BI \-\-rev \ <VALUE> |
| 6165 |
. |
| 6166 |
revision to update to |
| 6167 |
.TP |
| 6168 |
.BI \-\-source \ <VALUE> |
| 6169 |
. |
| 6170 |
repository to clone from |
| 6171 |
.TP |
| 6172 |
.BI \-\-dest \ <VALUE> |
| 6173 |
. |
| 6174 |
repository to update to REV (possibly cloning) |
| 6175 |
.TP |
| 6176 |
.B \-\-initial\-clone\-minimal |
| 6177 |
. |
| 6178 |
Pull only the prescribed revision upon initial cloning. This has the side effect of ignoring clone\-bundles, which if often slower on the client side and stressful to the server than applying available clone bundles. |
| 6179 |
.UNINDENT |
| 6180 |
.SH BUNDLE FILE FORMATS |
| 6181 |
.sp |
| 6182 |
Mercurial supports generating standalone "bundle" files that hold repository |
| 6183 |
data. These "bundles" are typically saved locally and used later or exchanged |
| 6184 |
between different repositories, possibly on different machines. Example |
| 6185 |
commands using bundles are \%\fBhg bundle\fP\: and \%\fBhg unbundle\fP\:. |
| 6186 |
.sp |
| 6187 |
Generation of bundle files is controlled by a "bundle specification" |
| 6188 |
("bundlespec") string. This string tells the bundle generation process how |
| 6189 |
to create the bundle. |
| 6190 |
.sp |
| 6191 |
A "bundlespec" string is composed of the following elements: |
| 6192 |
.INDENT 0.0 |
| 6193 |
.TP |
| 6194 |
.B type |
| 6195 |
. |
| 6196 |
A string denoting the bundle format to use. |
| 6197 |
.TP |
| 6198 |
.B compression |
| 6199 |
. |
| 6200 |
Denotes the compression engine to use compressing the raw bundle data. |
| 6201 |
.TP |
| 6202 |
.B parameters |
| 6203 |
. |
| 6204 |
Arbitrary key\-value parameters to further control bundle generation. |
| 6205 |
.UNINDENT |
| 6206 |
.sp |
| 6207 |
A "bundlespec" string has the following formats: |
| 6208 |
.INDENT 0.0 |
| 6209 |
.TP |
| 6210 |
.B <type> |
| 6211 |
. |
| 6212 |
The literal bundle format string is used. |
| 6213 |
.TP |
| 6214 |
.B <compression>\-<type> |
| 6215 |
. |
| 6216 |
The compression engine and format are delimited by a hyphen (\fB\-\fP). |
| 6217 |
.UNINDENT |
| 6218 |
.sp |
| 6219 |
Optional parameters follow the \fB<type>\fP. Parameters are URI escaped |
| 6220 |
\fBkey=value\fP pairs. Each pair is delimited by a semicolon (\fB;\fP). The |
| 6221 |
first parameter begins after a \fB;\fP immediately following the \fB<type>\fP |
| 6222 |
value. |
| 6223 |
.SS Available Types |
| 6224 |
.sp |
| 6225 |
The following bundle <type> strings are available: |
| 6226 |
.INDENT 0.0 |
| 6227 |
.TP |
| 6228 |
.B v1 |
| 6229 |
. |
| 6230 |
Produces a legacy "changegroup" version 1 bundle. |
| 6231 |
.sp |
| 6232 |
This format is compatible with nearly all Mercurial clients because it is |
| 6233 |
the oldest. However, it has some limitations, which is why it is no longer |
| 6234 |
the default for new repositories. |
| 6235 |
.sp |
| 6236 |
\fBv1\fP bundles can be used with modern repositories using the "generaldelta" |
| 6237 |
storage format. However, it may take longer to produce the bundle and the |
| 6238 |
resulting bundle may be significantly larger than a \fBv2\fP bundle. |
| 6239 |
.sp |
| 6240 |
\fBv1\fP bundles can only use the \fBgzip\fP, \fBbzip2\fP, and \fBnone\fP compression |
| 6241 |
formats. |
| 6242 |
.TP |
| 6243 |
.B v2 |
| 6244 |
. |
| 6245 |
Produces a version 2 bundle. |
| 6246 |
.sp |
| 6247 |
Version 2 bundles are an extensible format that can store additional |
| 6248 |
repository data (such as bookmarks and phases information) and they can |
| 6249 |
store data more efficiently, resulting in smaller bundles. |
| 6250 |
.sp |
| 6251 |
Version 2 bundles can also use modern compression engines, such as |
| 6252 |
\fBzstd\fP, making them faster to compress and often smaller. |
| 6253 |
.UNINDENT |
| 6254 |
.SS Available Compression Engines |
| 6255 |
.sp |
| 6256 |
The following bundle <compression> engines can be used: |
| 6257 |
.INDENT 0.0 |
| 6258 |
.TP |
| 6259 |
.B \fBbzip2\fP |
| 6260 |
.sp |
| 6261 |
An algorithm that produces smaller bundles than \fBgzip\fP. |
| 6262 |
.sp |
| 6263 |
All Mercurial clients should support this format. |
| 6264 |
.sp |
| 6265 |
This engine will likely produce smaller bundles than \fBgzip\fP but |
| 6266 |
will be significantly slower, both during compression and |
| 6267 |
decompression. |
| 6268 |
.sp |
| 6269 |
If available, the \fBzstd\fP engine can yield similar or better |
| 6270 |
compression at much higher speeds. |
| 6271 |
.TP |
| 6272 |
.B \fBgzip\fP |
| 6273 |
.sp |
| 6274 |
zlib compression using the DEFLATE algorithm. |
| 6275 |
.sp |
| 6276 |
All Mercurial clients should support this format. The compression |
| 6277 |
algorithm strikes a reasonable balance between compression ratio |
| 6278 |
and size. |
| 6279 |
.TP |
| 6280 |
.B \fBnone\fP |
| 6281 |
.sp |
| 6282 |
No compression is performed. |
| 6283 |
.sp |
| 6284 |
Use this compression engine to explicitly disable compression. |
| 6285 |
.UNINDENT |
| 6286 |
.sp |
| 6287 |
The compression engines can be prepended with \fBstream\fP to create a streaming bundle. |
| 6288 |
These are bundles that are extremely efficient to produce and consume, |
| 6289 |
but do not have guaranteed compatibility with older clients. |
| 6290 |
.SS Available Options |
| 6291 |
.sp |
| 6292 |
The following options exist: |
| 6293 |
.INDENT 0.0 |
| 6294 |
.TP |
| 6295 |
.B changegroup |
| 6296 |
. |
| 6297 |
Include the changegroup data in the bundle (default to True). |
| 6298 |
.TP |
| 6299 |
.B cg.version |
| 6300 |
. |
| 6301 |
Select the version of the changegroup to use. Available options are : 01, |
| 6302 |
02, 03, or 04. By default it will be automatically selected according to the |
| 6303 |
current repository format. |
| 6304 |
.TP |
| 6305 |
.B cg.delta\-compression |
| 6306 |
. |
| 6307 |
Starting with \fIcg.version\fP "04", changegroups can include pre\-compressed |
| 6308 |
deltas that the receiving end might reuse as\-is. If this option is omitted, |
| 6309 |
no such delta will be part of the changegroup. The option accepts a |
| 6310 |
comma\-separated list of accepted compression formats. Supported format are: |
| 6311 |
.INDENT 7.0 |
| 6312 |
.IP \(bu 2 |
| 6313 |
.INDENT 2.0 |
| 6314 |
.TP |
| 6315 |
.B none: delta explicitly non\-compressed (useful to prevent the receiver from |
| 6316 |
. |
| 6317 |
even trying to compress such deltas) |
| 6318 |
.UNINDENT |
| 6319 |
.IP \(bu 2 |
| 6320 |
. |
| 6321 |
zlib: zlib\-compressed delta |
| 6322 |
.IP \(bu 2 |
| 6323 |
. |
| 6324 |
zstd: zstd\-compressed delta |
| 6325 |
.UNINDENT |
| 6326 |
.TP |
| 6327 |
.B obsolescence |
| 6328 |
. |
| 6329 |
Include obsolescence\-markers relevant to the bundled changesets. |
| 6330 |
.TP |
| 6331 |
.B phases |
| 6332 |
. |
| 6333 |
Include phase information relevant to the bundled changesets. |
| 6334 |
.TP |
| 6335 |
.B revbranchcache |
| 6336 |
. |
| 6337 |
Include the "rev\-branch" cache inside the bundle. |
| 6338 |
.TP |
| 6339 |
.B tagsfnodescache |
| 6340 |
. |
| 6341 |
Include the "tags\-fnodes" cache inside the bundle. |
| 6342 |
.UNINDENT |
| 6343 |
.SS Examples |
| 6344 |
.INDENT 0.0 |
| 6345 |
.TP |
| 6346 |
.B \fBv2\fP |
| 6347 |
.sp |
| 6348 |
Produce a \fBv2\fP bundle using default options, including compression. |
| 6349 |
.TP |
| 6350 |
.B \fBnone\-v1\fP |
| 6351 |
.sp |
| 6352 |
Produce a \fBv1\fP bundle with no compression. |
| 6353 |
.TP |
| 6354 |
.B \fBzstd\-v2\fP |
| 6355 |
.sp |
| 6356 |
Produce a \fBv2\fP bundle with zstandard compression using default |
| 6357 |
settings. |
| 6358 |
.TP |
| 6359 |
.B \fBzstd\-v1\fP |
| 6360 |
.sp |
| 6361 |
This errors because \fBzstd\fP is not supported for \fBv1\fP types. |
| 6362 |
.TP |
| 6363 |
.B \fBnone\-streamv2\fP |
| 6364 |
.sp |
| 6365 |
Produce a \fBv2\fP streaming bundle with no compression. |
| 6366 |
.TP |
| 6367 |
.B \fBzstd\-v2;obsolescence=true;phases=true\fP |
| 6368 |
.sp |
| 6369 |
Produce a \fBv2\fP bundle with zstandard compression which includes |
| 6370 |
obsolescence markers and phases. |
| 6371 |
.UNINDENT |
| 6372 |
.SH COLORIZING OUTPUTS |
| 6373 |
.sp |
| 6374 |
Mercurial colorizes output from several commands. |
| 6375 |
.sp |
| 6376 |
For example, the diff command shows additions in green and deletions |
| 6377 |
in red, while the status command shows modified files in magenta. Many |
| 6378 |
other commands have analogous colors. It is possible to customize |
| 6379 |
these colors. |
| 6380 |
.sp |
| 6381 |
To enable color (default) whenever possible use: |
| 6382 |
.sp |
| 6383 |
.nf |
| 6384 |
.ft C |
| 6385 |
[ui] |
| 6386 |
color = yes |
| 6387 |
.ft P |
| 6388 |
.fi |
| 6389 |
.sp |
| 6390 |
To disable color use: |
| 6391 |
.sp |
| 6392 |
.nf |
| 6393 |
.ft C |
| 6394 |
[ui] |
| 6395 |
color = no |
| 6396 |
.ft P |
| 6397 |
.fi |
| 6398 |
.sp |
| 6399 |
See \%\fBhg help config.ui.color\fP\: for details. |
| 6400 |
.sp |
| 6401 |
The default pager on Windows does not support color, so enabling the pager |
| 6402 |
will effectively disable color. See \%\fBhg help config.ui.paginate\fP\: to disable |
| 6403 |
the pager. Alternately, MSYS and Cygwin shells provide \fIless\fP as a pager, |
| 6404 |
which can be configured to support ANSI color mode. Windows 10 natively |
| 6405 |
supports ANSI color mode. |
| 6406 |
.SS Mode |
| 6407 |
.sp |
| 6408 |
Mercurial can use various systems to display color. The supported modes are |
| 6409 |
\fBansi\fP, \fBwin32\fP, and \fBterminfo\fP. See \%\fBhg help config.color\fP\: for details |
| 6410 |
about how to control the mode. |
| 6411 |
.SS Effects |
| 6412 |
.sp |
| 6413 |
Other effects in addition to color, like bold and underlined text, are |
| 6414 |
also available. By default, the terminfo database is used to find the |
| 6415 |
terminal codes used to change color and effect. If terminfo is not |
| 6416 |
available, then effects are rendered with the ECMA\-48 SGR control |
| 6417 |
function (aka ANSI escape codes). |
| 6418 |
.sp |
| 6419 |
The available effects in terminfo mode are \(aqblink\(aq, \(aqbold\(aq, \(aqdim\(aq, |
| 6420 |
\(aqinverse\(aq, \(aqinvisible\(aq, \(aqitalic\(aq, \(aqstandout\(aq, and \(aqunderline\(aq; in |
| 6421 |
ECMA\-48 mode, the options are \(aqbold\(aq, \(aqinverse\(aq, \(aqitalic\(aq, and |
| 6422 |
\(aqunderline\(aq. How each is rendered depends on the terminal emulator. |
| 6423 |
Some may not be available for a given terminal type, and will be |
| 6424 |
silently ignored. |
| 6425 |
.sp |
| 6426 |
If the terminfo entry for your terminal is missing codes for an effect |
| 6427 |
or has the wrong codes, you can add or override those codes in your |
| 6428 |
configuration: |
| 6429 |
.sp |
| 6430 |
.nf |
| 6431 |
.ft C |
| 6432 |
[color] |
| 6433 |
terminfo.dim = \eE[2m |
| 6434 |
.ft P |
| 6435 |
.fi |
| 6436 |
.sp |
| 6437 |
where \(aqE\(aq is substituted with an escape character. |
| 6438 |
.SS Labels |
| 6439 |
.sp |
| 6440 |
Text receives color effects depending on the labels that it has. Many |
| 6441 |
default Mercurial commands emit labelled text. You can also define |
| 6442 |
your own labels in templates using the label function, see \%\fBhg help |
| 6443 |
templates\fP\:. In order to receive effects, labels must have a dot, such |
| 6444 |
as \fIlog.secret\fP or \fIbranch.active\fP. A single portion of text may have |
| 6445 |
more than one label. In that case, effects given to the last label |
| 6446 |
will override any other effects. This includes the special "none" |
| 6447 |
effect, which nullifies other effects. |
| 6448 |
.sp |
| 6449 |
Labels are normally invisible. In order to see these labels and their |
| 6450 |
position in the text, use the global \-\-color=debug option. The same |
| 6451 |
anchor text may be associated to multiple labels, e.g. |
| 6452 |
.INDENT 0.0 |
| 6453 |
.INDENT 3.5 |
| 6454 |
.sp |
| 6455 |
[log.changeset changeset.secret|changeset: 22611:6f0a53c8f587] |
| 6456 |
.UNINDENT |
| 6457 |
.UNINDENT |
| 6458 |
.sp |
| 6459 |
The following are the default effects for some default labels. Default |
| 6460 |
effects may be overridden from your configuration file: |
| 6461 |
.sp |
| 6462 |
.nf |
| 6463 |
.ft C |
| 6464 |
[color] |
| 6465 |
status.modified = blue bold underline red_background |
| 6466 |
status.added = green bold |
| 6467 |
status.removed = red bold blue_background |
| 6468 |
status.deleted = cyan bold underline |
| 6469 |
status.unknown = magenta bold underline |
| 6470 |
status.ignored = black bold |
| 6471 |
|
| 6472 |
# \(aqnone\(aq turns off all effects |
| 6473 |
status.clean = none |
| 6474 |
status.copied = none |
| 6475 |
|
| 6476 |
qseries.applied = blue bold underline |
| 6477 |
qseries.unapplied = black bold |
| 6478 |
qseries.missing = red bold |
| 6479 |
|
| 6480 |
diff.diffline = bold |
| 6481 |
diff.extended = cyan bold |
| 6482 |
diff.file_a = red bold |
| 6483 |
diff.file_b = green bold |
| 6484 |
diff.hunk = magenta |
| 6485 |
diff.deleted = red |
| 6486 |
diff.inserted = green |
| 6487 |
diff.changed = white |
| 6488 |
diff.tab = |
| 6489 |
diff.trailingwhitespace = bold red_background |
| 6490 |
|
| 6491 |
# Blank so it inherits the style of the surrounding label |
| 6492 |
changeset.public = |
| 6493 |
changeset.draft = |
| 6494 |
changeset.secret = |
| 6495 |
|
| 6496 |
resolve.unresolved = red bold |
| 6497 |
resolve.resolved = green bold |
| 6498 |
|
| 6499 |
bookmarks.active = green |
| 6500 |
|
| 6501 |
branches.active = none |
| 6502 |
branches.closed = black bold |
| 6503 |
branches.current = green |
| 6504 |
branches.inactive = none |
| 6505 |
|
| 6506 |
tags.normal = green |
| 6507 |
tags.local = black bold |
| 6508 |
|
| 6509 |
rebase.rebased = blue |
| 6510 |
rebase.remaining = red bold |
| 6511 |
|
| 6512 |
shelve.age = cyan |
| 6513 |
shelve.newest = green bold |
| 6514 |
shelve.name = blue bold |
| 6515 |
|
| 6516 |
histedit.remaining = red bold |
| 6517 |
.ft P |
| 6518 |
.fi |
| 6519 |
.SS Custom colors |
| 6520 |
.sp |
| 6521 |
Because there are only eight standard colors, Mercurial allows you |
| 6522 |
to define color names for other color slots which might be available |
| 6523 |
for your terminal type, assuming terminfo mode. For instance: |
| 6524 |
.sp |
| 6525 |
.nf |
| 6526 |
.ft C |
| 6527 |
color.brightblue = 12 |
| 6528 |
color.pink = 207 |
| 6529 |
color.orange = 202 |
| 6530 |
.ft P |
| 6531 |
.fi |
| 6532 |
.sp |
| 6533 |
to set \(aqbrightblue\(aq to color slot 12 (useful for 16 color terminals |
| 6534 |
that have brighter colors defined in the upper eight) and, \(aqpink\(aq and |
| 6535 |
\(aqorange\(aq to colors in 256\-color xterm\(aqs default color cube. These |
| 6536 |
defined colors may then be used as any of the pre\-defined eight, |
| 6537 |
including appending \(aq_background\(aq to set the background to that color. |
| 6538 |
.SH DATE FORMATS |
| 6539 |
.sp |
| 6540 |
Some commands allow the user to specify a date, e.g.: |
| 6541 |
.INDENT 0.0 |
| 6542 |
.IP \(bu 2 |
| 6543 |
. |
| 6544 |
backout, commit, import, tag: Specify the commit date. |
| 6545 |
.IP \(bu 2 |
| 6546 |
. |
| 6547 |
log, revert, update: Select revision(s) by date. |
| 6548 |
.UNINDENT |
| 6549 |
.sp |
| 6550 |
Many date formats are valid. Here are some examples: |
| 6551 |
.INDENT 0.0 |
| 6552 |
.IP \(bu 2 |
| 6553 |
. |
| 6554 |
\fBWed Dec 6 13:18:29 2006\fP (local timezone assumed) |
| 6555 |
.IP \(bu 2 |
| 6556 |
. |
| 6557 |
\fBDec 6 13:18 \-0600\fP (year assumed, time offset provided) |
| 6558 |
.IP \(bu 2 |
| 6559 |
. |
| 6560 |
\fBDec 6 13:18 UTC\fP (UTC and GMT are aliases for +0000) |
| 6561 |
.IP \(bu 2 |
| 6562 |
. |
| 6563 |
\fBDec 6\fP (midnight) |
| 6564 |
.IP \(bu 2 |
| 6565 |
. |
| 6566 |
\fB13:18\fP (today assumed) |
| 6567 |
.IP \(bu 2 |
| 6568 |
. |
| 6569 |
\fB3:39\fP (3:39AM assumed) |
| 6570 |
.IP \(bu 2 |
| 6571 |
. |
| 6572 |
\fB3:39pm\fP (15:39) |
| 6573 |
.IP \(bu 2 |
| 6574 |
. |
| 6575 |
\fB2006\-12\-06 13:18:29\fP (ISO 8601 format) |
| 6576 |
.IP \(bu 2 |
| 6577 |
. |
| 6578 |
\fB2006\-12\-6 13:18\fP |
| 6579 |
.IP \(bu 2 |
| 6580 |
. |
| 6581 |
\fB2006\-12\-6\fP |
| 6582 |
.IP \(bu 2 |
| 6583 |
. |
| 6584 |
\fB12\-6\fP |
| 6585 |
.IP \(bu 2 |
| 6586 |
. |
| 6587 |
\fB12/6\fP |
| 6588 |
.IP \(bu 2 |
| 6589 |
. |
| 6590 |
\fB12/6/6\fP (Dec 6 2006) |
| 6591 |
.IP \(bu 2 |
| 6592 |
. |
| 6593 |
\fBtoday\fP (midnight) |
| 6594 |
.IP \(bu 2 |
| 6595 |
. |
| 6596 |
\fByesterday\fP (midnight) |
| 6597 |
.IP \(bu 2 |
| 6598 |
. |
| 6599 |
\fBnow\fP \- right now |
| 6600 |
.UNINDENT |
| 6601 |
.sp |
| 6602 |
Lastly, there is Mercurial\(aqs internal format: |
| 6603 |
.INDENT 0.0 |
| 6604 |
.IP \(bu 2 |
| 6605 |
. |
| 6606 |
\fB1165411109 0\fP (Wed Dec 6 13:18:29 2006 UTC) |
| 6607 |
.UNINDENT |
| 6608 |
.sp |
| 6609 |
This is the internal representation format for dates. The first number |
| 6610 |
is the number of seconds since the epoch (1970\-01\-01 00:00 UTC). The |
| 6611 |
second is the offset of the local timezone, in seconds west of UTC |
| 6612 |
(negative if the timezone is east of UTC). |
| 6613 |
.sp |
| 6614 |
The log command also accepts date ranges: |
| 6615 |
.INDENT 0.0 |
| 6616 |
.IP \(bu 2 |
| 6617 |
. |
| 6618 |
\fB<DATE\fP \- at or before a given date/time |
| 6619 |
.IP \(bu 2 |
| 6620 |
. |
| 6621 |
\fB>DATE\fP \- on or after a given date/time |
| 6622 |
.IP \(bu 2 |
| 6623 |
. |
| 6624 |
\fBDATE to DATE\fP \- a date range, inclusive |
| 6625 |
.IP \(bu 2 |
| 6626 |
. |
| 6627 |
\fB\-DAYS\fP \- within a given number of days from today |
| 6628 |
.UNINDENT |
| 6629 |
.SH DEPRECATED FEATURES |
| 6630 |
.sp |
| 6631 |
Mercurial evolves over time, some features, options, commands may be replaced by |
| 6632 |
better and more secure alternatives. This topic will help you migrating your |
| 6633 |
existing usage and/or configuration to newer features. |
| 6634 |
.SS Commands |
| 6635 |
.sp |
| 6636 |
The following commands are still available but their use are not recommended: |
| 6637 |
.sp |
| 6638 |
\fBlocate\fP |
| 6639 |
.sp |
| 6640 |
This command has been replaced by \fIhg files\fP. |
| 6641 |
.sp |
| 6642 |
\fBparents\fP |
| 6643 |
.sp |
| 6644 |
This command can be replaced by \fIhg summary\fP or \fIhg log\fP with appropriate |
| 6645 |
revsets. See \fIhg help revsets\fP for more information. |
| 6646 |
.sp |
| 6647 |
\fBtip\fP |
| 6648 |
.sp |
| 6649 |
The recommended alternative is \fIhg heads\fP. |
| 6650 |
.SS Options |
| 6651 |
.INDENT 0.0 |
| 6652 |
.TP |
| 6653 |
.B \fBweb.allowpull\fP |
| 6654 |
.sp |
| 6655 |
Renamed to \fIallow\-pull\fP. |
| 6656 |
.TP |
| 6657 |
.B \fBweb.allow_push\fP |
| 6658 |
.sp |
| 6659 |
Renamed to \fIallow\-push\fP. |
| 6660 |
.UNINDENT |
| 6661 |
.SH DIFF FORMATS |
| 6662 |
.sp |
| 6663 |
Mercurial\(aqs default format for showing changes between two versions of |
| 6664 |
a file is compatible with the unified format of GNU diff, which can be |
| 6665 |
used by GNU patch and many other standard tools. |
| 6666 |
.sp |
| 6667 |
While this standard format is often enough, it does not encode the |
| 6668 |
following information: |
| 6669 |
.INDENT 0.0 |
| 6670 |
.IP \(bu 2 |
| 6671 |
. |
| 6672 |
executable status and other permission bits |
| 6673 |
.IP \(bu 2 |
| 6674 |
. |
| 6675 |
copy or rename information |
| 6676 |
.IP \(bu 2 |
| 6677 |
. |
| 6678 |
changes in binary files |
| 6679 |
.IP \(bu 2 |
| 6680 |
. |
| 6681 |
creation or deletion of empty files |
| 6682 |
.UNINDENT |
| 6683 |
.sp |
| 6684 |
Mercurial also supports the extended diff format from the git VCS |
| 6685 |
which addresses these limitations. The git diff format is not produced |
| 6686 |
by default because a few widespread tools still do not understand this |
| 6687 |
format. |
| 6688 |
.sp |
| 6689 |
This means that when generating diffs from a Mercurial repository |
| 6690 |
(e.g. with \%\fBhg export\fP\:), you should be careful about things like file |
| 6691 |
copies and renames or other things mentioned above, because when |
| 6692 |
applying a standard diff to a different repository, this extra |
| 6693 |
information is lost. Mercurial\(aqs internal operations (like push and |
| 6694 |
pull) are not affected by this, because they use an internal binary |
| 6695 |
format for communicating changes. |
| 6696 |
.sp |
| 6697 |
To make Mercurial produce the git extended diff format, use the \-\-git |
| 6698 |
option available for many commands, or set \(aqgit = True\(aq in the [diff] |
| 6699 |
section of your configuration file. You do not need to set this option |
| 6700 |
when importing diffs in this format or using them in the mq extension. |
| 6701 |
.SH ENVIRONMENT VARIABLES |
| 6702 |
.INDENT 0.0 |
| 6703 |
.TP |
| 6704 |
.B HG |
| 6705 |
. |
| 6706 |
Path to the \(aqhg\(aq executable, automatically passed when running |
| 6707 |
hooks, extensions or external tools. If unset or empty, this is |
| 6708 |
the hg executable\(aqs name if it\(aqs frozen, or an executable named |
| 6709 |
\(aqhg\(aq (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on |
| 6710 |
Windows) is searched. |
| 6711 |
.TP |
| 6712 |
.B HGEDITOR |
| 6713 |
. |
| 6714 |
This is the name of the editor to run when committing. See EDITOR. |
| 6715 |
.sp |
| 6716 |
(deprecated, see \%\fBhg help config.ui.editor\fP\:) |
| 6717 |
.TP |
| 6718 |
.B HGENCODING |
| 6719 |
. |
| 6720 |
This overrides the default locale setting detected by Mercurial. |
| 6721 |
This setting is used to convert data including usernames, |
| 6722 |
changeset descriptions, tag names, and branches. This setting can |
| 6723 |
be overridden with the \-\-encoding command\-line option. |
| 6724 |
.TP |
| 6725 |
.B HGENCODINGMODE |
| 6726 |
. |
| 6727 |
This sets Mercurial\(aqs behavior for handling unknown characters |
| 6728 |
while transcoding user input. The default is "strict", which |
| 6729 |
causes Mercurial to abort if it can\(aqt map a character. Other |
| 6730 |
settings include "replace", which replaces unknown characters, and |
| 6731 |
"ignore", which drops them. This setting can be overridden with |
| 6732 |
the \-\-encodingmode command\-line option. |
| 6733 |
.TP |
| 6734 |
.B HGENCODINGAMBIGUOUS |
| 6735 |
. |
| 6736 |
This sets Mercurial\(aqs behavior for handling characters with |
| 6737 |
"ambiguous" widths like accented Latin characters with East Asian |
| 6738 |
fonts. By default, Mercurial assumes ambiguous characters are |
| 6739 |
narrow, set this variable to "wide" if such characters cause |
| 6740 |
formatting problems. |
| 6741 |
.TP |
| 6742 |
.B HGMERGE |
| 6743 |
. |
| 6744 |
An executable to use for resolving merge conflicts. The program |
| 6745 |
will be executed with three arguments: local file, remote file, |
| 6746 |
ancestor file. |
| 6747 |
.sp |
| 6748 |
(deprecated, see \%\fBhg help config.ui.merge\fP\:) |
| 6749 |
.TP |
| 6750 |
.B HGRCPATH |
| 6751 |
. |
| 6752 |
A list of files or directories to search for configuration |
| 6753 |
files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH |
| 6754 |
is not set, platform default search path is used. If empty, only |
| 6755 |
the .hg/hgrc from the current repository is read. |
| 6756 |
.sp |
| 6757 |
For each element in HGRCPATH: |
| 6758 |
.INDENT 7.0 |
| 6759 |
.IP \(bu 2 |
| 6760 |
. |
| 6761 |
if it\(aqs a directory, all files ending with .rc are added |
| 6762 |
.IP \(bu 2 |
| 6763 |
. |
| 6764 |
otherwise, the file itself will be added |
| 6765 |
.UNINDENT |
| 6766 |
.TP |
| 6767 |
.B HGRCSKIPREPO |
| 6768 |
. |
| 6769 |
When set, the .hg/hgrc from repositories are not read. |
| 6770 |
.TP |
| 6771 |
.B HGPLAIN |
| 6772 |
. |
| 6773 |
When set, this disables any configuration settings that might |
| 6774 |
change Mercurial\(aqs default output. This includes encoding, |
| 6775 |
defaults, verbose mode, debug mode, quiet mode, tracebacks, and |
| 6776 |
localization. This can be useful when scripting against Mercurial |
| 6777 |
in the face of existing user configuration. |
| 6778 |
.sp |
| 6779 |
In addition to the features disabled by \fBHGPLAIN=\fP, the following |
| 6780 |
values can be specified to adjust behavior: |
| 6781 |
.INDENT 7.0 |
| 6782 |
.TP |
| 6783 |
.B \fB+strictflags\fP |
| 6784 |
.sp |
| 6785 |
Restrict parsing of command line flags. |
| 6786 |
.UNINDENT |
| 6787 |
.sp |
| 6788 |
Equivalent options set via command line flags or environment |
| 6789 |
variables are not overridden. |
| 6790 |
.sp |
| 6791 |
See \%\fBhg help scripting\fP\: for details. |
| 6792 |
.TP |
| 6793 |
.B HGPLAINEXCEPT |
| 6794 |
. |
| 6795 |
This is a comma\-separated list of features to preserve when |
| 6796 |
HGPLAIN is enabled. Currently the following values are supported: |
| 6797 |
.INDENT 7.0 |
| 6798 |
.TP |
| 6799 |
.B \fBalias\fP |
| 6800 |
.sp |
| 6801 |
Don\(aqt remove aliases. |
| 6802 |
.TP |
| 6803 |
.B \fBcolor\fP |
| 6804 |
.sp |
| 6805 |
Don\(aqt disable colored output. |
| 6806 |
.TP |
| 6807 |
.B \fBi18n\fP |
| 6808 |
.sp |
| 6809 |
Preserve internationalization. |
| 6810 |
.TP |
| 6811 |
.B \fBrevsetalias\fP |
| 6812 |
.sp |
| 6813 |
Don\(aqt remove revset aliases. |
| 6814 |
.TP |
| 6815 |
.B \fBtemplatealias\fP |
| 6816 |
.sp |
| 6817 |
Don\(aqt remove template aliases. |
| 6818 |
.TP |
| 6819 |
.B \fBprogress\fP |
| 6820 |
.sp |
| 6821 |
Don\(aqt hide progress output. |
| 6822 |
.UNINDENT |
| 6823 |
.sp |
| 6824 |
Setting HGPLAINEXCEPT to anything (even an empty string) will |
| 6825 |
enable plain mode. |
| 6826 |
.TP |
| 6827 |
.B HGUSER |
| 6828 |
. |
| 6829 |
This is the string used as the author of a commit. If not set, |
| 6830 |
available values will be considered in this order: |
| 6831 |
.INDENT 7.0 |
| 6832 |
.IP \(bu 2 |
| 6833 |
. |
| 6834 |
HGUSER (deprecated) |
| 6835 |
.IP \(bu 2 |
| 6836 |
. |
| 6837 |
configuration files from the HGRCPATH |
| 6838 |
.IP \(bu 2 |
| 6839 |
. |
| 6840 |
EMAIL |
| 6841 |
.IP \(bu 2 |
| 6842 |
. |
| 6843 |
interactive prompt |
| 6844 |
.IP \(bu 2 |
| 6845 |
. |
| 6846 |
LOGNAME (with \fB@hostname\fP appended) |
| 6847 |
.UNINDENT |
| 6848 |
.sp |
| 6849 |
(deprecated, see \%\fBhg help config.ui.username\fP\:) |
| 6850 |
.TP |
| 6851 |
.B EMAIL |
| 6852 |
. |
| 6853 |
May be used as the author of a commit; see HGUSER. |
| 6854 |
.TP |
| 6855 |
.B LOGNAME |
| 6856 |
. |
| 6857 |
May be used as the author of a commit; see HGUSER. |
| 6858 |
.TP |
| 6859 |
.B VISUAL |
| 6860 |
. |
| 6861 |
This is the name of the editor to use when committing. See EDITOR. |
| 6862 |
.TP |
| 6863 |
.B EDITOR |
| 6864 |
. |
| 6865 |
Sometimes Mercurial needs to open a text file in an editor for a |
| 6866 |
user to modify, for example when writing commit messages. The |
| 6867 |
editor it uses is determined by looking at the environment |
| 6868 |
variables HGEDITOR, VISUAL and EDITOR, in that order. The first |
| 6869 |
non\-empty one is chosen. If all of them are empty, the editor |
| 6870 |
defaults to \(aqvi\(aq. |
| 6871 |
.TP |
| 6872 |
.B PYTHONPATH |
| 6873 |
. |
| 6874 |
This is used by Python to find imported modules and may need to be |
| 6875 |
set appropriately if this Mercurial is not installed system\-wide. |
| 6876 |
.TP |
| 6877 |
.B HGZSTDPOLICY |
| 6878 |
. |
| 6879 |
Control which zstd implementation will be used for the Python code. This is |
| 6880 |
a list of options in priority order. |
| 6881 |
.INDENT 7.0 |
| 6882 |
.IP \(bu 2 |
| 6883 |
. |
| 6884 |
vendored: use the pinned version of python\-zstandard shipped in Mercurial |
| 6885 |
.IP \(bu 2 |
| 6886 |
. |
| 6887 |
system: use a possibly installed "zstandard" python package |
| 6888 |
.IP \(bu 2 |
| 6889 |
. |
| 6890 |
none: don\(aqt use zstd (ommiting this will raise an error if the above |
| 6891 |
fails) |
| 6892 |
.UNINDENT |
| 6893 |
.sp |
| 6894 |
Default value is "vendored,system,none" |
| 6895 |
.sp |
| 6896 |
This variable might be deprecated in the future depending on how zstd wrapper |
| 6897 |
library and they integration in Mercurial evolves. This config has no |
| 6898 |
effect on the Rust code. |
| 6899 |
.UNINDENT |
| 6900 |
.SH SAFELY REWRITING HISTORY (EXPERIMENTAL) |
| 6901 |
.sp |
| 6902 |
Obsolescence markers make it possible to mark changesets that have been |
| 6903 |
deleted or superseded in a new version of the changeset. |
| 6904 |
.sp |
| 6905 |
Unlike the previous way of handling such changes, by stripping the old |
| 6906 |
changesets from the repository, obsolescence markers can be propagated |
| 6907 |
between repositories. This allows for a safe and simple way of exchanging |
| 6908 |
mutable history and altering it after the fact. Changeset phases are |
| 6909 |
respected, such that only draft and secret changesets can be altered (see |
| 6910 |
\%\fBhg help phases\fP\: for details). |
| 6911 |
.sp |
| 6912 |
Obsolescence is tracked using "obsolescence markers", a piece of metadata |
| 6913 |
tracking which changesets have been made obsolete, potential successors for |
| 6914 |
a given changeset, the moment the changeset was marked as obsolete, and the |
| 6915 |
user who performed the rewriting operation. The markers are stored |
| 6916 |
separately from standard changeset data can be exchanged without any of the |
| 6917 |
precursor changesets, preventing unnecessary exchange of obsolescence data. |
| 6918 |
.sp |
| 6919 |
The complete set of obsolescence markers describes a history of changeset |
| 6920 |
modifications that is orthogonal to the repository history of file |
| 6921 |
modifications. This changeset history allows for detection and automatic |
| 6922 |
resolution of edge cases arising from multiple users rewriting the same part |
| 6923 |
of history concurrently. |
| 6924 |
.SS Current feature status |
| 6925 |
.sp |
| 6926 |
This feature is still in development. |
| 6927 |
.SS Instability |
| 6928 |
.sp |
| 6929 |
Rewriting changesets might introduce instability. |
| 6930 |
.sp |
| 6931 |
There are two main kinds of instability: orphaning and diverging. |
| 6932 |
.sp |
| 6933 |
Orphans are changesets left behind when their ancestors are rewritten. |
| 6934 |
Divergence has two variants: |
| 6935 |
.INDENT 0.0 |
| 6936 |
.IP \(bu 2 |
| 6937 |
. |
| 6938 |
Content\-divergence occurs when independent rewrites of the same changesets |
| 6939 |
lead to different results. |
| 6940 |
.IP \(bu 2 |
| 6941 |
. |
| 6942 |
Phase\-divergence occurs when the old (obsolete) version of a changeset |
| 6943 |
becomes public. |
| 6944 |
.UNINDENT |
| 6945 |
.sp |
| 6946 |
It is possible to prevent local creation of orphans by using the following config: |
| 6947 |
.sp |
| 6948 |
.nf |
| 6949 |
.ft C |
| 6950 |
[experimental] |
| 6951 |
evolution.createmarkers = true |
| 6952 |
evolution.exchange = true |
| 6953 |
.ft P |
| 6954 |
.fi |
| 6955 |
.sp |
| 6956 |
You can also enable that option explicitly: |
| 6957 |
.sp |
| 6958 |
.nf |
| 6959 |
.ft C |
| 6960 |
[experimental] |
| 6961 |
evolution.createmarkers = true |
| 6962 |
evolution.exchange = true |
| 6963 |
evolution.allowunstable = true |
| 6964 |
.ft P |
| 6965 |
.fi |
| 6966 |
.SH USING ADDITIONAL FEATURES |
| 6967 |
.sp |
| 6968 |
Mercurial has the ability to add new features through the use of |
| 6969 |
extensions. Extensions may add new commands, add options to |
| 6970 |
existing commands, change the default behavior of commands, or |
| 6971 |
implement hooks. |
| 6972 |
.sp |
| 6973 |
To enable the "foo" extension, either shipped with Mercurial or in the |
| 6974 |
Python search path, create an entry for it in your configuration file, |
| 6975 |
like this: |
| 6976 |
.sp |
| 6977 |
.nf |
| 6978 |
.ft C |
| 6979 |
[extensions] |
| 6980 |
foo = |
| 6981 |
.ft P |
| 6982 |
.fi |
| 6983 |
.sp |
| 6984 |
You may also specify the full path to an extension: |
| 6985 |
.sp |
| 6986 |
.nf |
| 6987 |
.ft C |
| 6988 |
[extensions] |
| 6989 |
myfeature = ~/.hgext/myfeature.py |
| 6990 |
.ft P |
| 6991 |
.fi |
| 6992 |
.sp |
| 6993 |
See \%\fBhg help config\fP\: for more information on configuration files. |
| 6994 |
.sp |
| 6995 |
Extensions are not loaded by default for a variety of reasons: |
| 6996 |
they can increase startup overhead; they may be meant for advanced |
| 6997 |
usage only; they may provide potentially dangerous abilities (such |
| 6998 |
as letting you destroy or modify history); they might not be ready |
| 6999 |
for prime time; or they may alter some usual behaviors of stock |
| 7000 |
Mercurial. It is thus up to the user to activate extensions as |
| 7001 |
needed. |
| 7002 |
.sp |
| 7003 |
To explicitly disable an extension enabled in a configuration file of |
| 7004 |
broader scope, prepend its path with !: |
| 7005 |
.sp |
| 7006 |
.nf |
| 7007 |
.ft C |
| 7008 |
[extensions] |
| 7009 |
# disabling extension bar residing in /path/to/extension/bar.py |
| 7010 |
bar = !/path/to/extension/bar.py |
| 7011 |
# ditto, but no path was supplied for extension baz |
| 7012 |
baz = ! |
| 7013 |
.ft P |
| 7014 |
.fi |
| 7015 |
.sp |
| 7016 |
disabled extensions: |
| 7017 |
.INDENT 0.0 |
| 7018 |
.INDENT 3.5 |
| 7019 |
.INDENT 0.0 |
| 7020 |
.TP |
| 7021 |
.B acl |
| 7022 |
. |
| 7023 |
hooks for controlling repository access |
| 7024 |
.TP |
| 7025 |
.B blackbox |
| 7026 |
. |
| 7027 |
log repository events to a blackbox for debugging |
| 7028 |
.TP |
| 7029 |
.B bugzilla |
| 7030 |
. |
| 7031 |
hooks for integrating with the Bugzilla bug tracker |
| 7032 |
.TP |
| 7033 |
.B censor |
| 7034 |
. |
| 7035 |
erase file content at a given revision |
| 7036 |
.TP |
| 7037 |
.B churn |
| 7038 |
. |
| 7039 |
command to display statistics about repository history |
| 7040 |
.TP |
| 7041 |
.B clonebundles |
| 7042 |
. |
| 7043 |
advertise pre\-generated bundles to seed clones |
| 7044 |
.TP |
| 7045 |
.B closehead |
| 7046 |
. |
| 7047 |
close arbitrary heads without checking them out first |
| 7048 |
.TP |
| 7049 |
.B convert |
| 7050 |
. |
| 7051 |
import revisions from foreign VCS repositories into Mercurial |
| 7052 |
.TP |
| 7053 |
.B eol |
| 7054 |
. |
| 7055 |
automatically manage newlines in repository files |
| 7056 |
.TP |
| 7057 |
.B extdiff |
| 7058 |
. |
| 7059 |
command to allow external programs to compare revisions |
| 7060 |
.TP |
| 7061 |
.B factotum |
| 7062 |
. |
| 7063 |
http authentication with factotum |
| 7064 |
.TP |
| 7065 |
.B fastexport |
| 7066 |
. |
| 7067 |
export repositories as git fast\-import stream |
| 7068 |
.TP |
| 7069 |
.B githelp |
| 7070 |
. |
| 7071 |
try mapping git commands to Mercurial commands |
| 7072 |
.TP |
| 7073 |
.B gpg |
| 7074 |
. |
| 7075 |
commands to sign and verify changesets |
| 7076 |
.TP |
| 7077 |
.B hgk |
| 7078 |
. |
| 7079 |
browse the repository in a graphical way |
| 7080 |
.TP |
| 7081 |
.B highlight |
| 7082 |
. |
| 7083 |
syntax highlighting for hgweb (requires Pygments) |
| 7084 |
.TP |
| 7085 |
.B histedit |
| 7086 |
. |
| 7087 |
interactive history editing |
| 7088 |
.TP |
| 7089 |
.B keyword |
| 7090 |
. |
| 7091 |
expand keywords in tracked files |
| 7092 |
.TP |
| 7093 |
.B largefiles |
| 7094 |
. |
| 7095 |
track large binary files |
| 7096 |
.TP |
| 7097 |
.B mq |
| 7098 |
. |
| 7099 |
manage a stack of patches |
| 7100 |
.TP |
| 7101 |
.B notify |
| 7102 |
. |
| 7103 |
hooks for sending email push notifications |
| 7104 |
.TP |
| 7105 |
.B patchbomb |
| 7106 |
. |
| 7107 |
command to send changesets as (a series of) patch emails |
| 7108 |
.TP |
| 7109 |
.B rebase |
| 7110 |
. |
| 7111 |
command to move sets of revisions to a different ancestor |
| 7112 |
.TP |
| 7113 |
.B relink |
| 7114 |
. |
| 7115 |
recreates hardlinks between repository clones |
| 7116 |
.TP |
| 7117 |
.B schemes |
| 7118 |
. |
| 7119 |
extend schemes with shortcuts to repository swarms |
| 7120 |
.TP |
| 7121 |
.B share |
| 7122 |
. |
| 7123 |
share a common history between several working directories |
| 7124 |
.TP |
| 7125 |
.B transplant |
| 7126 |
. |
| 7127 |
command to transplant changesets from another branch |
| 7128 |
.TP |
| 7129 |
.B win32mbcs |
| 7130 |
. |
| 7131 |
allow the use of MBCS paths with problematic encodings |
| 7132 |
.TP |
| 7133 |
.B zeroconf |
| 7134 |
. |
| 7135 |
discover and advertise repositories on the local network |
| 7136 |
.UNINDENT |
| 7137 |
.UNINDENT |
| 7138 |
.UNINDENT |
| 7139 |
.SH SPECIFYING FILE SETS |
| 7140 |
.sp |
| 7141 |
Mercurial supports a functional language for selecting a set of |
| 7142 |
files. |
| 7143 |
.sp |
| 7144 |
Like other file patterns, this pattern type is indicated by a prefix, |
| 7145 |
\(aqset:\(aq. The language supports a number of predicates which are joined |
| 7146 |
by infix operators. Parenthesis can be used for grouping. |
| 7147 |
.sp |
| 7148 |
Identifiers such as filenames or patterns must be quoted with single |
| 7149 |
or double quotes if they contain characters outside of |
| 7150 |
\fB[.*{}[]?/\e_a\-zA\-Z0\-9\ex80\-\exff]\fP or if they match one of the |
| 7151 |
predefined predicates. This generally applies to file patterns other |
| 7152 |
than globs and arguments for predicates. Pattern prefixes such as |
| 7153 |
\fBpath:\fP may be specified without quoting. |
| 7154 |
.sp |
| 7155 |
Special characters can be used in quoted identifiers by escaping them, |
| 7156 |
e.g., \fB\en\fP is interpreted as a newline. To prevent them from being |
| 7157 |
interpreted, strings can be prefixed with \fBr\fP, e.g. \fBr\(aq...\(aq\fP. |
| 7158 |
.sp |
| 7159 |
See also \%\fBhg help patterns\fP\:. |
| 7160 |
.SS Operators |
| 7161 |
.sp |
| 7162 |
There is a single prefix operator: |
| 7163 |
.INDENT 0.0 |
| 7164 |
.TP |
| 7165 |
.B \fBnot x\fP |
| 7166 |
.sp |
| 7167 |
Files not in x. Short form is \fB! x\fP. |
| 7168 |
.UNINDENT |
| 7169 |
.sp |
| 7170 |
These are the supported infix operators: |
| 7171 |
.INDENT 0.0 |
| 7172 |
.TP |
| 7173 |
.B \fBx and y\fP |
| 7174 |
.sp |
| 7175 |
The intersection of files in x and y. Short form is \fBx & y\fP. |
| 7176 |
.TP |
| 7177 |
.B \fBx or y\fP |
| 7178 |
.sp |
| 7179 |
The union of files in x and y. There are two alternative short |
| 7180 |
forms: \fBx | y\fP and \fBx + y\fP. |
| 7181 |
.TP |
| 7182 |
.B \fBx \- y\fP |
| 7183 |
.sp |
| 7184 |
Files in x but not in y. |
| 7185 |
.UNINDENT |
| 7186 |
.SS Predicates |
| 7187 |
.sp |
| 7188 |
The following predicates are supported: |
| 7189 |
.INDENT 0.0 |
| 7190 |
.TP |
| 7191 |
.B \fBadded()\fP |
| 7192 |
.sp |
| 7193 |
File that is added according to \%\fBhg status\fP\:. |
| 7194 |
.TP |
| 7195 |
.B \fBbinary()\fP |
| 7196 |
.sp |
| 7197 |
File that appears to be binary (contains NUL bytes). |
| 7198 |
.TP |
| 7199 |
.B \fBclean()\fP |
| 7200 |
.sp |
| 7201 |
File that is clean according to \%\fBhg status\fP\:. |
| 7202 |
.TP |
| 7203 |
.B \fBcopied()\fP |
| 7204 |
.sp |
| 7205 |
File that is recorded as being copied. |
| 7206 |
.TP |
| 7207 |
.B \fBdeleted()\fP |
| 7208 |
.sp |
| 7209 |
Alias for \fBmissing()\fP. |
| 7210 |
.TP |
| 7211 |
.B \fBencoding(name)\fP |
| 7212 |
.sp |
| 7213 |
File can be successfully decoded with the given character |
| 7214 |
encoding. May not be useful for encodings other than ASCII and |
| 7215 |
UTF\-8. |
| 7216 |
.TP |
| 7217 |
.B \fBeol(style)\fP |
| 7218 |
.sp |
| 7219 |
File contains newlines of the given style (dos, unix, mac). Binary |
| 7220 |
files are excluded, files with mixed line endings match multiple |
| 7221 |
styles. |
| 7222 |
.TP |
| 7223 |
.B \fBexec()\fP |
| 7224 |
.sp |
| 7225 |
File that is marked as executable. |
| 7226 |
.TP |
| 7227 |
.B \fBgrep(regex)\fP |
| 7228 |
.sp |
| 7229 |
File contains the given regular expression. |
| 7230 |
.TP |
| 7231 |
.B \fBhgignore()\fP |
| 7232 |
.sp |
| 7233 |
File that matches the active .hgignore pattern. |
| 7234 |
.TP |
| 7235 |
.B \fBignored()\fP |
| 7236 |
.sp |
| 7237 |
File that is ignored according to \%\fBhg status\fP\:. |
| 7238 |
.TP |
| 7239 |
.B \fBmissing()\fP |
| 7240 |
.sp |
| 7241 |
File that is missing according to \%\fBhg status\fP\:. |
| 7242 |
.TP |
| 7243 |
.B \fBmodified()\fP |
| 7244 |
.sp |
| 7245 |
File that is modified according to \%\fBhg status\fP\:. |
| 7246 |
.TP |
| 7247 |
.B \fBportable()\fP |
| 7248 |
.sp |
| 7249 |
File that has a portable name. (This doesn\(aqt include filenames with case |
| 7250 |
collisions.) |
| 7251 |
.TP |
| 7252 |
.B \fBremoved()\fP |
| 7253 |
.sp |
| 7254 |
File that is removed according to \%\fBhg status\fP\:. |
| 7255 |
.TP |
| 7256 |
.B \fBresolved()\fP |
| 7257 |
.sp |
| 7258 |
File that is marked resolved according to \%\fBhg resolve \-l\fP\:. |
| 7259 |
.TP |
| 7260 |
.B \fBrevs(revs, pattern)\fP |
| 7261 |
.sp |
| 7262 |
Evaluate set in the specified revisions. If the revset match multiple |
| 7263 |
revs, this will return file matching pattern in any of the revision. |
| 7264 |
.TP |
| 7265 |
.B \fBsize(expression)\fP |
| 7266 |
.sp |
| 7267 |
File size matches the given expression. Examples: |
| 7268 |
.INDENT 7.0 |
| 7269 |
.IP \(bu 2 |
| 7270 |
. |
| 7271 |
size(\(aq1k\(aq) \- files from 1024 to 2047 bytes |
| 7272 |
.IP \(bu 2 |
| 7273 |
. |
| 7274 |
size(\(aq< 20k\(aq) \- files less than 20480 bytes |
| 7275 |
.IP \(bu 2 |
| 7276 |
. |
| 7277 |
size(\(aq>= .5MB\(aq) \- files at least 524288 bytes |
| 7278 |
.IP \(bu 2 |
| 7279 |
. |
| 7280 |
size(\(aq4k \- 1MB\(aq) \- files from 4096 bytes to 1048576 bytes |
| 7281 |
.UNINDENT |
| 7282 |
.TP |
| 7283 |
.B \fBstatus(base, rev, pattern)\fP |
| 7284 |
.sp |
| 7285 |
Evaluate predicate using status change between \fBbase\fP and |
| 7286 |
\fBrev\fP. Examples: |
| 7287 |
.INDENT 7.0 |
| 7288 |
.IP \(bu 2 |
| 7289 |
. |
| 7290 |
\fBstatus(3, 7, added())\fP \- matches files added from "3" to "7" |
| 7291 |
.UNINDENT |
| 7292 |
.TP |
| 7293 |
.B \fBsubrepo([pattern])\fP |
| 7294 |
.sp |
| 7295 |
Subrepositories whose paths match the given pattern. |
| 7296 |
.TP |
| 7297 |
.B \fBsymlink()\fP |
| 7298 |
.sp |
| 7299 |
File that is marked as a symlink. |
| 7300 |
.TP |
| 7301 |
.B \fBtracked()\fP |
| 7302 |
.sp |
| 7303 |
File that is under Mercurial control. |
| 7304 |
.TP |
| 7305 |
.B \fBunknown()\fP |
| 7306 |
.sp |
| 7307 |
File that is unknown according to \%\fBhg status\fP\:. |
| 7308 |
.TP |
| 7309 |
.B \fBunresolved()\fP |
| 7310 |
.sp |
| 7311 |
File that is marked unresolved according to \%\fBhg resolve \-l\fP\:. |
| 7312 |
.UNINDENT |
| 7313 |
.SS Examples |
| 7314 |
.sp |
| 7315 |
Some sample queries: |
| 7316 |
.INDENT 0.0 |
| 7317 |
.IP \(bu 2 |
| 7318 |
. |
| 7319 |
Show status of files that appear to be binary in the working directory: |
| 7320 |
.sp |
| 7321 |
.nf |
| 7322 |
.ft C |
| 7323 |
hg status \-A "set:binary()" |
| 7324 |
.ft P |
| 7325 |
.fi |
| 7326 |
.IP \(bu 2 |
| 7327 |
. |
| 7328 |
Forget files that are in .hgignore but are already tracked: |
| 7329 |
.sp |
| 7330 |
.nf |
| 7331 |
.ft C |
| 7332 |
hg forget "set:hgignore() and not ignored()" |
| 7333 |
.ft P |
| 7334 |
.fi |
| 7335 |
.IP \(bu 2 |
| 7336 |
. |
| 7337 |
Find text files that contain a string: |
| 7338 |
.sp |
| 7339 |
.nf |
| 7340 |
.ft C |
| 7341 |
hg files "set:grep(magic) and not binary()" |
| 7342 |
.ft P |
| 7343 |
.fi |
| 7344 |
.IP \(bu 2 |
| 7345 |
. |
| 7346 |
Find C files in a non\-standard encoding: |
| 7347 |
.sp |
| 7348 |
.nf |
| 7349 |
.ft C |
| 7350 |
hg files "set:**.c and not encoding(\(aqUTF\-8\(aq)" |
| 7351 |
.ft P |
| 7352 |
.fi |
| 7353 |
.IP \(bu 2 |
| 7354 |
. |
| 7355 |
Revert copies of large binary files: |
| 7356 |
.sp |
| 7357 |
.nf |
| 7358 |
.ft C |
| 7359 |
hg revert "set:copied() and binary() and size(\(aq>1M\(aq)" |
| 7360 |
.ft P |
| 7361 |
.fi |
| 7362 |
.IP \(bu 2 |
| 7363 |
. |
| 7364 |
Revert files that were added to the working directory: |
| 7365 |
.sp |
| 7366 |
.nf |
| 7367 |
.ft C |
| 7368 |
hg revert "set:revs(\(aqwdir()\(aq, added())" |
| 7369 |
.ft P |
| 7370 |
.fi |
| 7371 |
.IP \(bu 2 |
| 7372 |
. |
| 7373 |
Remove files listed in foo.lst that contain the letter a or b: |
| 7374 |
.sp |
| 7375 |
.nf |
| 7376 |
.ft C |
| 7377 |
hg remove "set: listfile:foo.lst and (**a* or **b*)" |
| 7378 |
.ft P |
| 7379 |
.fi |
| 7380 |
.UNINDENT |
| 7381 |
.SH COMMAND\-LINE FLAGS |
| 7382 |
.sp |
| 7383 |
Most Mercurial commands accept various flags. |
| 7384 |
.SS Flag names |
| 7385 |
.sp |
| 7386 |
Flags for each command are listed in \%\fBhg help\fP\: for that command. |
| 7387 |
Additionally, some flags, such as \-\-repository, are global and can be used with |
| 7388 |
any command \- those are seen in \%\fBhg help \-v\fP\:, and can be specified before or |
| 7389 |
after the command. |
| 7390 |
.sp |
| 7391 |
Every flag has at least a long name, such as \-\-repository. Some flags may also |
| 7392 |
have a short one\-letter name, such as the equivalent \-R. Using the short or long |
| 7393 |
name is equivalent and has the same effect. The long name may be abbreviated to |
| 7394 |
any unambiguous prefix. For example, \%\fBhg commit \-\-amend\fP\: can be abbreviated |
| 7395 |
to \%\fBhg commit \-\-am\fP\:. |
| 7396 |
.sp |
| 7397 |
Flags that have a short name can also be bundled together \- for instance, to |
| 7398 |
specify both \-\-edit (short \-e) and \-\-interactive (short \-i), one could use: |
| 7399 |
.sp |
| 7400 |
.nf |
| 7401 |
.ft C |
| 7402 |
hg commit \-ei |
| 7403 |
.ft P |
| 7404 |
.fi |
| 7405 |
.sp |
| 7406 |
If any of the bundled flags takes a value (i.e. is not a boolean), it must be |
| 7407 |
last, followed by the value: |
| 7408 |
.sp |
| 7409 |
.nf |
| 7410 |
.ft C |
| 7411 |
hg commit \-im \(aqMessage\(aq |
| 7412 |
.ft P |
| 7413 |
.fi |
| 7414 |
.SS Flag types |
| 7415 |
.sp |
| 7416 |
Mercurial command\-line flags can be strings, numbers, booleans, or lists of |
| 7417 |
strings. |
| 7418 |
.SS Specifying flag values |
| 7419 |
.sp |
| 7420 |
The following syntaxes are allowed, assuming a flag \(aqflagname\(aq with short name |
| 7421 |
\(aqf\(aq: |
| 7422 |
.sp |
| 7423 |
.nf |
| 7424 |
.ft C |
| 7425 |
\-\-flagname=foo |
| 7426 |
\-\-flagname foo |
| 7427 |
\-f foo |
| 7428 |
\-ffoo |
| 7429 |
.ft P |
| 7430 |
.fi |
| 7431 |
.sp |
| 7432 |
This syntax applies to all non\-boolean flags (strings, numbers or lists). |
| 7433 |
.SS Specifying boolean flags |
| 7434 |
.sp |
| 7435 |
Boolean flags do not take a value parameter. To specify a boolean, use the flag |
| 7436 |
name to set it to true, or the same name prefixed with \(aqno\-\(aq to set it to |
| 7437 |
false: |
| 7438 |
.sp |
| 7439 |
.nf |
| 7440 |
.ft C |
| 7441 |
hg commit \-\-interactive |
| 7442 |
hg commit \-\-no\-interactive |
| 7443 |
.ft P |
| 7444 |
.fi |
| 7445 |
.SS Specifying list flags |
| 7446 |
.sp |
| 7447 |
List flags take multiple values. To specify them, pass the flag multiple times: |
| 7448 |
.sp |
| 7449 |
.nf |
| 7450 |
.ft C |
| 7451 |
hg files \-\-include mercurial \-\-include tests |
| 7452 |
.ft P |
| 7453 |
.fi |
| 7454 |
.SS Setting flag defaults |
| 7455 |
.sp |
| 7456 |
In order to set a default value for a flag in an hgrc file, it is recommended to |
| 7457 |
use aliases: |
| 7458 |
.sp |
| 7459 |
.nf |
| 7460 |
.ft C |
| 7461 |
[alias] |
| 7462 |
commit = commit \-\-interactive |
| 7463 |
.ft P |
| 7464 |
.fi |
| 7465 |
.sp |
| 7466 |
For more information on hgrc files, see \%\fBhg help config\fP\:. |
| 7467 |
.SS Overriding flags on the command line |
| 7468 |
.sp |
| 7469 |
If the same non\-list flag is specified multiple times on the command line, the |
| 7470 |
latest specification is used: |
| 7471 |
.sp |
| 7472 |
.nf |
| 7473 |
.ft C |
| 7474 |
hg commit \-m "Ignored value" \-m "Used value" |
| 7475 |
.ft P |
| 7476 |
.fi |
| 7477 |
.sp |
| 7478 |
This includes the use of aliases \- e.g., if one has: |
| 7479 |
.sp |
| 7480 |
.nf |
| 7481 |
.ft C |
| 7482 |
[alias] |
| 7483 |
committemp = commit \-m "Ignored value" |
| 7484 |
.ft P |
| 7485 |
.fi |
| 7486 |
.sp |
| 7487 |
then the following command will override that \-m: |
| 7488 |
.sp |
| 7489 |
.nf |
| 7490 |
.ft C |
| 7491 |
hg committemp \-m "Used value" |
| 7492 |
.ft P |
| 7493 |
.fi |
| 7494 |
.SS Overriding flag defaults |
| 7495 |
.sp |
| 7496 |
Every flag has a default value, and you may also set your own defaults in hgrc |
| 7497 |
as described above. |
| 7498 |
Except for list flags, defaults can be overridden on the command line simply by |
| 7499 |
specifying the flag in that location. |
| 7500 |
.SS Hidden flags |
| 7501 |
.sp |
| 7502 |
Some flags are not shown in a command\(aqs help by default \- specifically, those |
| 7503 |
that are deemed to be experimental, deprecated or advanced. To show all flags, |
| 7504 |
add the \-\-verbose flag for the help command: |
| 7505 |
.sp |
| 7506 |
.nf |
| 7507 |
.ft C |
| 7508 |
hg help \-\-verbose commit |
| 7509 |
.ft P |
| 7510 |
.fi |
| 7511 |
.SH GLOSSARY |
| 7512 |
.INDENT 0.0 |
| 7513 |
.TP |
| 7514 |
.B Ancestor |
| 7515 |
. |
| 7516 |
Any changeset that can be reached by an unbroken chain of parent |
| 7517 |
changesets from a given changeset. More precisely, the ancestors |
| 7518 |
of a changeset can be defined by two properties: a parent of a |
| 7519 |
changeset is an ancestor, and a parent of an ancestor is an |
| 7520 |
ancestor. See also: \(aqDescendant\(aq. |
| 7521 |
.TP |
| 7522 |
.B Bookmark |
| 7523 |
. |
| 7524 |
Bookmarks are pointers to certain commits that move when |
| 7525 |
committing. They are similar to tags in that it is possible to use |
| 7526 |
bookmark names in all places where Mercurial expects a changeset |
| 7527 |
ID, e.g., with \%\fBhg update\fP\:. Unlike tags, bookmarks move along |
| 7528 |
when you make a commit. |
| 7529 |
.sp |
| 7530 |
Bookmarks can be renamed, copied and deleted. Bookmarks are local, |
| 7531 |
unless they are explicitly pushed or pulled between repositories. |
| 7532 |
Pushing and pulling bookmarks allow you to collaborate with others |
| 7533 |
on a branch without creating a named branch. |
| 7534 |
.TP |
| 7535 |
.B Branch |
| 7536 |
. |
| 7537 |
(Noun) A child changeset that has been created from a parent that |
| 7538 |
is not a head. These are known as topological branches, see |
| 7539 |
\(aqBranch, topological\(aq. If a topological branch is named, it becomes |
| 7540 |
a named branch. If a topological branch is not named, it becomes |
| 7541 |
an anonymous branch. See \(aqBranch, anonymous\(aq and \(aqBranch, named\(aq. |
| 7542 |
.sp |
| 7543 |
Branches may be created when changes are pulled from or pushed to |
| 7544 |
a remote repository, since new heads may be created by these |
| 7545 |
operations. Note that the term branch can also be used informally |
| 7546 |
to describe a development process in which certain development is |
| 7547 |
done independently of other development. This is sometimes done |
| 7548 |
explicitly with a named branch, but it can also be done locally, |
| 7549 |
using bookmarks or clones and anonymous branches. |
| 7550 |
.sp |
| 7551 |
Example: "The experimental branch." |
| 7552 |
.sp |
| 7553 |
(Verb) The action of creating a child changeset which results in |
| 7554 |
its parent having more than one child. |
| 7555 |
.sp |
| 7556 |
Example: "I\(aqm going to branch at X." |
| 7557 |
.TP |
| 7558 |
.B Branch, anonymous |
| 7559 |
. |
| 7560 |
Every time a new child changeset is created from a parent that is not |
| 7561 |
a head and the name of the branch is not changed, a new anonymous |
| 7562 |
branch is created. |
| 7563 |
.TP |
| 7564 |
.B Branch, closed |
| 7565 |
. |
| 7566 |
A named branch whose branch heads have all been closed. |
| 7567 |
.TP |
| 7568 |
.B Branch, default |
| 7569 |
. |
| 7570 |
The branch assigned to a changeset when no name has previously been |
| 7571 |
assigned. |
| 7572 |
.TP |
| 7573 |
.B Branch head |
| 7574 |
. |
| 7575 |
See \(aqHead, branch\(aq. |
| 7576 |
.TP |
| 7577 |
.B Branch, inactive |
| 7578 |
. |
| 7579 |
If a named branch has no topological heads, it is considered to be |
| 7580 |
inactive. As an example, a feature branch becomes inactive when it |
| 7581 |
is merged into the default branch. The \%\fBhg branches\fP\: command |
| 7582 |
shows inactive branches by default, though they can be hidden with |
| 7583 |
\%\fBhg branches \-\-active\fP\:. |
| 7584 |
.sp |
| 7585 |
NOTE: this concept is deprecated because it is too implicit. |
| 7586 |
Branches should now be explicitly closed using \%\fBhg commit |
| 7587 |
\-\-close\-branch\fP\: when they are no longer needed. |
| 7588 |
.TP |
| 7589 |
.B Branch, named |
| 7590 |
. |
| 7591 |
A collection of changesets which have the same branch name. By |
| 7592 |
default, children of a changeset in a named branch belong to the |
| 7593 |
same named branch. A child can be explicitly assigned to a |
| 7594 |
different branch. See \%\fBhg help branch\fP\:, \%\fBhg help branches\fP\: and |
| 7595 |
\%\fBhg commit \-\-close\-branch\fP\: for more information on managing |
| 7596 |
branches. |
| 7597 |
.sp |
| 7598 |
Named branches can be thought of as a kind of namespace, dividing |
| 7599 |
the collection of changesets that comprise the repository into a |
| 7600 |
collection of disjoint subsets. A named branch is not necessarily |
| 7601 |
a topological branch. If a new named branch is created from the |
| 7602 |
head of another named branch, or the default branch, but no |
| 7603 |
further changesets are added to that previous branch, then that |
| 7604 |
previous branch will be a branch in name only. |
| 7605 |
.TP |
| 7606 |
.B Branch tip |
| 7607 |
. |
| 7608 |
See \(aqTip, branch\(aq. |
| 7609 |
.TP |
| 7610 |
.B Branch, topological |
| 7611 |
. |
| 7612 |
Every time a new child changeset is created from a parent that is |
| 7613 |
not a head, a new topological branch is created. If a topological |
| 7614 |
branch is named, it becomes a named branch. If a topological |
| 7615 |
branch is not named, it becomes an anonymous branch of the |
| 7616 |
current, possibly default, branch. |
| 7617 |
.TP |
| 7618 |
.B Changelog |
| 7619 |
. |
| 7620 |
A record of the changesets in the order in which they were added |
| 7621 |
to the repository. This includes details such as changeset id, |
| 7622 |
author, commit message, date, and list of changed files. |
| 7623 |
.TP |
| 7624 |
.B Changeset |
| 7625 |
. |
| 7626 |
A snapshot of the state of the repository used to record a change. |
| 7627 |
.TP |
| 7628 |
.B Changeset, child |
| 7629 |
. |
| 7630 |
The converse of parent changeset: if P is a parent of C, then C is |
| 7631 |
a child of P. There is no limit to the number of children that a |
| 7632 |
changeset may have. |
| 7633 |
.TP |
| 7634 |
.B Changeset id |
| 7635 |
. |
| 7636 |
A SHA\-1 hash that uniquely identifies a changeset. It may be |
| 7637 |
represented as either a "long" 40 hexadecimal digit string, or a |
| 7638 |
"short" 12 hexadecimal digit string. |
| 7639 |
.TP |
| 7640 |
.B Changeset, merge |
| 7641 |
. |
| 7642 |
A changeset with two parents. This occurs when a merge is |
| 7643 |
committed. |
| 7644 |
.TP |
| 7645 |
.B Changeset, parent |
| 7646 |
. |
| 7647 |
A revision upon which a child changeset is based. Specifically, a |
| 7648 |
parent changeset of a changeset C is a changeset whose node |
| 7649 |
immediately precedes C in the DAG. Changesets have at most two |
| 7650 |
parents. |
| 7651 |
.TP |
| 7652 |
.B Checkout |
| 7653 |
. |
| 7654 |
(Noun) The working directory being updated to a specific |
| 7655 |
revision. This use should probably be avoided where possible, as |
| 7656 |
changeset is much more appropriate than checkout in this context. |
| 7657 |
.sp |
| 7658 |
Example: "I\(aqm using checkout X." |
| 7659 |
.sp |
| 7660 |
(Verb) Updating the working directory to a specific changeset. See |
| 7661 |
\%\fBhg help update\fP\:. |
| 7662 |
.sp |
| 7663 |
Example: "I\(aqm going to check out changeset X." |
| 7664 |
.TP |
| 7665 |
.B Child changeset |
| 7666 |
. |
| 7667 |
See \(aqChangeset, child\(aq. |
| 7668 |
.TP |
| 7669 |
.B Close changeset |
| 7670 |
. |
| 7671 |
See \(aqHead, closed branch\(aq. |
| 7672 |
.TP |
| 7673 |
.B Closed branch |
| 7674 |
. |
| 7675 |
See \(aqBranch, closed\(aq. |
| 7676 |
.TP |
| 7677 |
.B Clone |
| 7678 |
. |
| 7679 |
(Noun) An entire or partial copy of a repository. The partial |
| 7680 |
clone must be in the form of a revision and its ancestors. |
| 7681 |
.sp |
| 7682 |
Example: "Is your clone up to date?" |
| 7683 |
.sp |
| 7684 |
(Verb) The process of creating a clone, using \%\fBhg clone\fP\:. |
| 7685 |
.sp |
| 7686 |
Example: "I\(aqm going to clone the repository." |
| 7687 |
.TP |
| 7688 |
.B Closed branch head |
| 7689 |
. |
| 7690 |
See \(aqHead, closed branch\(aq. |
| 7691 |
.TP |
| 7692 |
.B Commit |
| 7693 |
. |
| 7694 |
(Noun) A synonym for changeset. |
| 7695 |
.sp |
| 7696 |
Example: "Is the bug fixed in your recent commit?" |
| 7697 |
.sp |
| 7698 |
(Verb) The act of recording changes to a repository. When files |
| 7699 |
are committed in a working directory, Mercurial finds the |
| 7700 |
differences between the committed files and their parent |
| 7701 |
changeset, creating a new changeset in the repository. |
| 7702 |
.sp |
| 7703 |
Example: "You should commit those changes now." |
| 7704 |
.TP |
| 7705 |
.B Cset |
| 7706 |
. |
| 7707 |
A common abbreviation of the term changeset. |
| 7708 |
.TP |
| 7709 |
.B DAG |
| 7710 |
. |
| 7711 |
The repository of changesets of a distributed version control |
| 7712 |
system (DVCS) can be described as a directed acyclic graph (DAG), |
| 7713 |
consisting of nodes and edges, where nodes correspond to |
| 7714 |
changesets and edges imply a parent \-> child relation. This graph |
| 7715 |
can be visualized by graphical tools such as \%\fBhg log \-\-graph\fP\:. In |
| 7716 |
Mercurial, the DAG is limited by the requirement for children to |
| 7717 |
have at most two parents. |
| 7718 |
.TP |
| 7719 |
.B Deprecated |
| 7720 |
. |
| 7721 |
Feature removed from documentation, but not scheduled for removal. |
| 7722 |
.TP |
| 7723 |
.B Default branch |
| 7724 |
. |
| 7725 |
See \(aqBranch, default\(aq. |
| 7726 |
.TP |
| 7727 |
.B Descendant |
| 7728 |
. |
| 7729 |
Any changeset that can be reached by a chain of child changesets |
| 7730 |
from a given changeset. More precisely, the descendants of a |
| 7731 |
changeset can be defined by two properties: the child of a |
| 7732 |
changeset is a descendant, and the child of a descendant is a |
| 7733 |
descendant. See also: \(aqAncestor\(aq. |
| 7734 |
.TP |
| 7735 |
.B Diff |
| 7736 |
. |
| 7737 |
(Noun) The difference between the contents and attributes of files |
| 7738 |
in two changesets or a changeset and the current working |
| 7739 |
directory. The difference is usually represented in a standard |
| 7740 |
form called a "diff" or "patch". The "git diff" format is used |
| 7741 |
when the changes include copies, renames, or changes to file |
| 7742 |
attributes, none of which can be represented/handled by classic |
| 7743 |
"diff" and "patch". |
| 7744 |
.sp |
| 7745 |
Example: "Did you see my correction in the diff?" |
| 7746 |
.sp |
| 7747 |
(Verb) Diffing two changesets is the action of creating a diff or |
| 7748 |
patch. |
| 7749 |
.sp |
| 7750 |
Example: "If you diff with changeset X, you will see what I mean." |
| 7751 |
.TP |
| 7752 |
.B Directory, working |
| 7753 |
. |
| 7754 |
The working directory represents the state of the files tracked by |
| 7755 |
Mercurial, that will be recorded in the next commit. The working |
| 7756 |
directory initially corresponds to the snapshot at an existing |
| 7757 |
changeset, known as the parent of the working directory. See |
| 7758 |
\(aqParent, working directory\(aq. The state may be modified by changes |
| 7759 |
to the files introduced manually or by a merge. The repository |
| 7760 |
metadata exists in the .hg directory inside the working directory. |
| 7761 |
.TP |
| 7762 |
.B Draft |
| 7763 |
. |
| 7764 |
Changesets in the draft phase have not been shared with publishing |
| 7765 |
repositories and may thus be safely changed by history\-modifying |
| 7766 |
extensions. See \%\fBhg help phases\fP\:. |
| 7767 |
.TP |
| 7768 |
.B Experimental |
| 7769 |
. |
| 7770 |
Feature that may change or be removed at a later date. |
| 7771 |
.TP |
| 7772 |
.B Graph |
| 7773 |
. |
| 7774 |
See DAG and \%\fBhg log \-\-graph\fP\:. |
| 7775 |
.TP |
| 7776 |
.B Head |
| 7777 |
. |
| 7778 |
The term \(aqhead\(aq may be used to refer to both a branch head or a |
| 7779 |
repository head, depending on the context. See \(aqHead, branch\(aq and |
| 7780 |
\(aqHead, repository\(aq for specific definitions. |
| 7781 |
.sp |
| 7782 |
Heads are where development generally takes place and are the |
| 7783 |
usual targets for update and merge operations. |
| 7784 |
.TP |
| 7785 |
.B Head, branch |
| 7786 |
. |
| 7787 |
A changeset with no descendants on the same named branch. |
| 7788 |
.TP |
| 7789 |
.B Head, closed branch |
| 7790 |
. |
| 7791 |
A changeset that marks a head as no longer interesting. The closed |
| 7792 |
head is no longer listed by \%\fBhg heads\fP\:. A branch is considered |
| 7793 |
closed when all its heads are closed and consequently is not |
| 7794 |
listed by \%\fBhg branches\fP\:. |
| 7795 |
.sp |
| 7796 |
Closed heads can be re\-opened by committing new changeset as the |
| 7797 |
child of the changeset that marks a head as closed. |
| 7798 |
.TP |
| 7799 |
.B Head, repository |
| 7800 |
. |
| 7801 |
A topological head which has not been closed. |
| 7802 |
.TP |
| 7803 |
.B Head, topological |
| 7804 |
. |
| 7805 |
A changeset with no children in the repository. |
| 7806 |
.TP |
| 7807 |
.B History, immutable |
| 7808 |
. |
| 7809 |
Once committed, changesets cannot be altered. Extensions which |
| 7810 |
appear to change history actually create new changesets that |
| 7811 |
replace existing ones, and then destroy the old changesets. Doing |
| 7812 |
so in public repositories can result in old changesets being |
| 7813 |
reintroduced to the repository. |
| 7814 |
.TP |
| 7815 |
.B History, rewriting |
| 7816 |
. |
| 7817 |
The changesets in a repository are immutable. However, extensions |
| 7818 |
to Mercurial can be used to alter the repository, usually in such |
| 7819 |
a way as to preserve changeset contents. |
| 7820 |
.TP |
| 7821 |
.B Immutable history |
| 7822 |
. |
| 7823 |
See \(aqHistory, immutable\(aq. |
| 7824 |
.TP |
| 7825 |
.B Merge changeset |
| 7826 |
. |
| 7827 |
See \(aqChangeset, merge\(aq. |
| 7828 |
.TP |
| 7829 |
.B Manifest |
| 7830 |
. |
| 7831 |
Each changeset has a manifest, which is the list of files that are |
| 7832 |
tracked by the changeset. |
| 7833 |
.TP |
| 7834 |
.B Merge |
| 7835 |
. |
| 7836 |
Used to bring together divergent branches of work. When you update |
| 7837 |
to a changeset and then merge another changeset, you bring the |
| 7838 |
history of the latter changeset into your working directory. Once |
| 7839 |
conflicts are resolved (and marked), this merge may be committed |
| 7840 |
as a merge changeset, bringing two branches together in the DAG. |
| 7841 |
.TP |
| 7842 |
.B Named branch |
| 7843 |
. |
| 7844 |
See \(aqBranch, named\(aq. |
| 7845 |
.TP |
| 7846 |
.B Null changeset |
| 7847 |
. |
| 7848 |
The empty changeset. It is the parent state of newly\-initialized |
| 7849 |
repositories and repositories with no checked out revision. It is |
| 7850 |
thus the parent of root changesets and the effective ancestor when |
| 7851 |
merging unrelated changesets. Can be specified by the alias \(aqnull\(aq |
| 7852 |
or by the changeset ID \(aq000000000000\(aq. |
| 7853 |
.TP |
| 7854 |
.B Parent |
| 7855 |
. |
| 7856 |
See \(aqChangeset, parent\(aq. |
| 7857 |
.TP |
| 7858 |
.B Parent changeset |
| 7859 |
. |
| 7860 |
See \(aqChangeset, parent\(aq. |
| 7861 |
.TP |
| 7862 |
.B Parent, working directory |
| 7863 |
. |
| 7864 |
The working directory parent reflects a virtual revision which is |
| 7865 |
the child of the changeset (or two changesets with an uncommitted |
| 7866 |
merge) shown by \%\fBhg parents\fP\:. This is changed with |
| 7867 |
\%\fBhg update\fP\:. Other commands to see the working directory parent |
| 7868 |
are \%\fBhg summary\fP\: and \%\fBhg id\fP\:. Can be specified by the alias ".". |
| 7869 |
.TP |
| 7870 |
.B Patch |
| 7871 |
. |
| 7872 |
(Noun) The product of a diff operation. |
| 7873 |
.sp |
| 7874 |
Example: "I\(aqve sent you my patch." |
| 7875 |
.sp |
| 7876 |
(Verb) The process of using a patch file to transform one |
| 7877 |
changeset into another. |
| 7878 |
.sp |
| 7879 |
Example: "You will need to patch that revision." |
| 7880 |
.TP |
| 7881 |
.B Phase |
| 7882 |
. |
| 7883 |
A per\-changeset state tracking how the changeset has been or |
| 7884 |
should be shared. See \%\fBhg help phases\fP\:. |
| 7885 |
.TP |
| 7886 |
.B Public |
| 7887 |
. |
| 7888 |
Changesets in the public phase have been shared with publishing |
| 7889 |
repositories and are therefore considered immutable. See \%\fBhg help |
| 7890 |
phases\fP\:. |
| 7891 |
.TP |
| 7892 |
.B Pull |
| 7893 |
. |
| 7894 |
An operation in which changesets in a remote repository which are |
| 7895 |
not in the local repository are brought into the local |
| 7896 |
repository. Note that this operation without special arguments |
| 7897 |
only updates the repository, it does not update the files in the |
| 7898 |
working directory. See \%\fBhg help pull\fP\:. |
| 7899 |
.TP |
| 7900 |
.B Push |
| 7901 |
. |
| 7902 |
An operation in which changesets in a local repository which are |
| 7903 |
not in a remote repository are sent to the remote repository. Note |
| 7904 |
that this operation only adds changesets which have been committed |
| 7905 |
locally to the remote repository. Uncommitted changes are not |
| 7906 |
sent. See \%\fBhg help push\fP\:. |
| 7907 |
.TP |
| 7908 |
.B Repository |
| 7909 |
. |
| 7910 |
The metadata describing all recorded states of a collection of |
| 7911 |
files. Each recorded state is represented by a changeset. A |
| 7912 |
repository is usually (but not always) found in the \fB.hg\fP |
| 7913 |
subdirectory of a working directory. Any recorded state can be |
| 7914 |
recreated by "updating" a working directory to a specific |
| 7915 |
changeset. |
| 7916 |
.TP |
| 7917 |
.B Repository head |
| 7918 |
. |
| 7919 |
See \(aqHead, repository\(aq. |
| 7920 |
.TP |
| 7921 |
.B Revision |
| 7922 |
. |
| 7923 |
A state of the repository at some point in time. Earlier revisions |
| 7924 |
can be updated to by using \%\fBhg update\fP\:. See also \(aqRevision |
| 7925 |
number\(aq; See also \(aqChangeset\(aq. |
| 7926 |
.TP |
| 7927 |
.B Revision number |
| 7928 |
. |
| 7929 |
This integer uniquely identifies a changeset in a specific |
| 7930 |
repository. It represents the order in which changesets were added |
| 7931 |
to a repository, starting with revision number 0. Note that the |
| 7932 |
revision number may be different in each clone of a repository. To |
| 7933 |
identify changesets uniquely between different clones, see |
| 7934 |
\(aqChangeset id\(aq. |
| 7935 |
.TP |
| 7936 |
.B Revlog |
| 7937 |
. |
| 7938 |
History storage mechanism used by Mercurial. It is a form of delta |
| 7939 |
encoding, with occasional full revision of data followed by delta |
| 7940 |
of each successive revision. It includes data and an index |
| 7941 |
pointing to the data. |
| 7942 |
.TP |
| 7943 |
.B Rewriting history |
| 7944 |
. |
| 7945 |
See \(aqHistory, rewriting\(aq. |
| 7946 |
.TP |
| 7947 |
.B Root |
| 7948 |
. |
| 7949 |
A changeset that has only the null changeset as its parent. Most |
| 7950 |
repositories have only a single root changeset. |
| 7951 |
.TP |
| 7952 |
.B Secret |
| 7953 |
. |
| 7954 |
Changesets in the secret phase may not be shared via push, pull, |
| 7955 |
or clone. See \%\fBhg help phases\fP\:. |
| 7956 |
.TP |
| 7957 |
.B Tag |
| 7958 |
. |
| 7959 |
An alternative name given to a changeset. Tags can be used in all |
| 7960 |
places where Mercurial expects a changeset ID, e.g., with |
| 7961 |
\%\fBhg update\fP\:. The creation of a tag is stored in the history and |
| 7962 |
will thus automatically be shared with other using push and pull. |
| 7963 |
.TP |
| 7964 |
.B Tip |
| 7965 |
. |
| 7966 |
The changeset with the highest revision number. It is the changeset |
| 7967 |
most recently added in a repository. |
| 7968 |
.TP |
| 7969 |
.B Tip, branch |
| 7970 |
. |
| 7971 |
The head of a given branch with the highest revision number. When |
| 7972 |
a branch name is used as a revision identifier, it refers to the |
| 7973 |
branch tip. See also \(aqBranch, head\(aq. Note that because revision |
| 7974 |
numbers may be different in different repository clones, the |
| 7975 |
branch tip may be different in different cloned repositories. |
| 7976 |
.TP |
| 7977 |
.B Update |
| 7978 |
. |
| 7979 |
(Noun) Another synonym of changeset. |
| 7980 |
.sp |
| 7981 |
Example: "I\(aqve pushed an update." |
| 7982 |
.sp |
| 7983 |
(Verb) This term is usually used to describe updating the state of |
| 7984 |
the working directory to that of a specific changeset. See |
| 7985 |
\%\fBhg help update\fP\:. |
| 7986 |
.sp |
| 7987 |
Example: "You should update." |
| 7988 |
.TP |
| 7989 |
.B Working directory |
| 7990 |
. |
| 7991 |
See \(aqDirectory, working\(aq. |
| 7992 |
.TP |
| 7993 |
.B Working directory parent |
| 7994 |
. |
| 7995 |
See \(aqParent, working directory\(aq. |
| 7996 |
.UNINDENT |
| 7997 |
.SH SYNTAX FOR MERCURIAL IGNORE FILES |
| 7998 |
.SS Synopsis |
| 7999 |
.sp |
| 8000 |
The Mercurial system uses a file called \fB.hgignore\fP in the root |
| 8001 |
directory of a repository to control its behavior when it searches |
| 8002 |
for files that it is not currently tracking. |
| 8003 |
.SS Description |
| 8004 |
.sp |
| 8005 |
The working directory of a Mercurial repository will often contain |
| 8006 |
files that should not be tracked by Mercurial. These include backup |
| 8007 |
files created by editors and build products created by compilers. |
| 8008 |
These files can be ignored by listing them in a \fB.hgignore\fP file in |
| 8009 |
the root of the working directory. The \fB.hgignore\fP file must be |
| 8010 |
created manually. It is typically put under version control, so that |
| 8011 |
the settings will propagate to other repositories with push and pull. |
| 8012 |
.sp |
| 8013 |
An untracked file is ignored if its path relative to the repository |
| 8014 |
root directory, or any prefix path of that path, is matched against |
| 8015 |
any pattern in \fB.hgignore\fP. |
| 8016 |
.sp |
| 8017 |
For example, say we have an untracked file, \fBfile.c\fP, at |
| 8018 |
\fBa/b/file.c\fP inside our repository. Mercurial will ignore \fBfile.c\fP |
| 8019 |
if any pattern in \fB.hgignore\fP matches \fBa/b/file.c\fP, \fBa/b\fP or \fBa\fP. |
| 8020 |
.sp |
| 8021 |
In addition, a Mercurial configuration file can reference a set of |
| 8022 |
per\-user or global ignore files. See the \fBignore\fP configuration |
| 8023 |
key on the \fB[ui]\fP section of \%\fBhg help config\fP\: for details of how to |
| 8024 |
configure these files. |
| 8025 |
.sp |
| 8026 |
To control Mercurial\(aqs handling of files that it manages, many |
| 8027 |
commands support the \fB\-I\fP and \fB\-X\fP options; see |
| 8028 |
\%\fBhg help <command>\fP\: and \%\fBhg help patterns\fP\: for details. |
| 8029 |
.sp |
| 8030 |
Files that are already tracked are not affected by .hgignore, even |
| 8031 |
if they appear in .hgignore. An untracked file X can be explicitly |
| 8032 |
added with \%\fBhg add X\fP\:, even if X would be excluded by a pattern |
| 8033 |
in .hgignore. |
| 8034 |
.SS Syntax |
| 8035 |
.sp |
| 8036 |
An ignore file is a plain text file consisting of a list of patterns, |
| 8037 |
with one pattern per line. Empty lines are skipped. The \fB#\fP |
| 8038 |
character is treated as a comment character, and the \fB\e\fP character |
| 8039 |
is treated as an escape character. |
| 8040 |
.sp |
| 8041 |
Mercurial supports several pattern syntaxes. The default syntax used |
| 8042 |
is Python/Perl\-style regular expressions. |
| 8043 |
.sp |
| 8044 |
To change the syntax used, use a line of the following form: |
| 8045 |
.sp |
| 8046 |
.nf |
| 8047 |
.ft C |
| 8048 |
syntax: NAME |
| 8049 |
.ft P |
| 8050 |
.fi |
| 8051 |
.sp |
| 8052 |
where \fBNAME\fP is one of the following: |
| 8053 |
.INDENT 0.0 |
| 8054 |
.TP |
| 8055 |
.B \fBregexp\fP |
| 8056 |
.sp |
| 8057 |
Regular expression, Python/Perl syntax. |
| 8058 |
.TP |
| 8059 |
.B \fBglob\fP |
| 8060 |
.sp |
| 8061 |
Shell\-style glob. |
| 8062 |
.TP |
| 8063 |
.B \fBrootglob\fP |
| 8064 |
.sp |
| 8065 |
A variant of \fBglob\fP that is rooted (see below). |
| 8066 |
.UNINDENT |
| 8067 |
.sp |
| 8068 |
The chosen syntax stays in effect when parsing all patterns that |
| 8069 |
follow, until another syntax is selected. |
| 8070 |
.sp |
| 8071 |
Neither \fBglob\fP nor regexp patterns are rooted. A glob\-syntax |
| 8072 |
pattern of the form \fB*.c\fP will match a file ending in \fB.c\fP in any |
| 8073 |
directory, and a regexp pattern of the form \fB\e.c$\fP will do the |
| 8074 |
same. To root a regexp pattern, start it with \fB^\fP. To get the same |
| 8075 |
effect with glob\-syntax, you have to use \fBrootglob\fP. |
| 8076 |
.sp |
| 8077 |
Subdirectories can have their own .hgignore settings by adding |
| 8078 |
\fBsubinclude:path/to/subdir/.hgignore\fP to the root \fB.hgignore\fP. See |
| 8079 |
\%\fBhg help patterns\fP\: for details on \fBsubinclude:\fP and \fBinclude:\fP. |
| 8080 |
.IP Note |
| 8081 |
. |
| 8082 |
Patterns specified in other than \fB.hgignore\fP are always rooted. |
| 8083 |
Please see \%\fBhg help patterns\fP\: for details. |
| 8084 |
.RE |
| 8085 |
.SS Example |
| 8086 |
.sp |
| 8087 |
Here is an example ignore file. |
| 8088 |
.sp |
| 8089 |
.nf |
| 8090 |
.ft C |
| 8091 |
# use glob syntax. |
| 8092 |
syntax: glob |
| 8093 |
|
| 8094 |
*.elc |
| 8095 |
*.pyc |
| 8096 |
*~ |
| 8097 |
|
| 8098 |
# switch to regexp syntax. |
| 8099 |
syntax: regexp |
| 8100 |
^\e.pc/ |
| 8101 |
.ft P |
| 8102 |
.fi |
| 8103 |
.SS Debugging |
| 8104 |
.sp |
| 8105 |
Use the \fBdebugignore\fP command to see if and why a file is ignored, or to |
| 8106 |
see the combined ignore pattern. See \%\fBhg help debugignore\fP\: for details. |
| 8107 |
.SH CONFIGURING HGWEB |
| 8108 |
.sp |
| 8109 |
Mercurial\(aqs internal web server, hgweb, can serve either a single |
| 8110 |
repository, or a tree of repositories. In the second case, repository |
| 8111 |
paths and global options can be defined using a dedicated |
| 8112 |
configuration file common to \%\fBhg serve\fP\:, \fBhgweb.wsgi\fP, |
| 8113 |
\fBhgweb.cgi\fP and \fBhgweb.fcgi\fP. |
| 8114 |
.sp |
| 8115 |
This file uses the same syntax as other Mercurial configuration files |
| 8116 |
but recognizes only the following sections: |
| 8117 |
.INDENT 0.0 |
| 8118 |
.INDENT 3.5 |
| 8119 |
.INDENT 0.0 |
| 8120 |
.IP \(bu 2 |
| 8121 |
. |
| 8122 |
web |
| 8123 |
.IP \(bu 2 |
| 8124 |
. |
| 8125 |
paths |
| 8126 |
.IP \(bu 2 |
| 8127 |
. |
| 8128 |
collections |
| 8129 |
.UNINDENT |
| 8130 |
.UNINDENT |
| 8131 |
.UNINDENT |
| 8132 |
.sp |
| 8133 |
The \fBweb\fP options are thoroughly described in \%\fBhg help config\fP\:. |
| 8134 |
.sp |
| 8135 |
The \fBpaths\fP section maps URL paths to paths of repositories in the |
| 8136 |
filesystem. hgweb will not expose the filesystem directly \- only |
| 8137 |
Mercurial repositories can be published and only according to the |
| 8138 |
configuration. |
| 8139 |
.sp |
| 8140 |
The left hand side is the path in the URL. Note that hgweb reserves |
| 8141 |
subpaths like \fBrev\fP or \fBfile\fP, try using different names for |
| 8142 |
nested repositories to avoid confusing effects. |
| 8143 |
.sp |
| 8144 |
The right hand side is the path in the filesystem. If the specified |
| 8145 |
path ends with \fB*\fP or \fB**\fP the filesystem will be searched |
| 8146 |
recursively for repositories below that point. |
| 8147 |
With \fB*\fP it will not recurse into the repositories it finds (except for |
| 8148 |
\fB.hg/patches\fP). |
| 8149 |
With \fB**\fP it will also search inside repository working directories |
| 8150 |
and possibly find subrepositories. |
| 8151 |
.sp |
| 8152 |
In this example: |
| 8153 |
.sp |
| 8154 |
.nf |
| 8155 |
.ft C |
| 8156 |
[paths] |
| 8157 |
/projects/a = /srv/tmprepos/a |
| 8158 |
/projects/b = c:/repos/b |
| 8159 |
/ = /srv/repos/* |
| 8160 |
/user/bob = /home/bob/repos/** |
| 8161 |
.ft P |
| 8162 |
.fi |
| 8163 |
.INDENT 0.0 |
| 8164 |
.IP \(bu 2 |
| 8165 |
. |
| 8166 |
The first two entries make two repositories in different directories |
| 8167 |
appear under the same directory in the web interface |
| 8168 |
.IP \(bu 2 |
| 8169 |
. |
| 8170 |
The third entry will publish every Mercurial repository found in |
| 8171 |
\fB/srv/repos/\fP, for instance the repository \fB/srv/repos/quux/\fP |
| 8172 |
will appear as \fBhttp://server/quux/\fP |
| 8173 |
.IP \(bu 2 |
| 8174 |
. |
| 8175 |
The fourth entry will publish both \fBhttp://server/user/bob/quux/\fP |
| 8176 |
and \fBhttp://server/user/bob/quux/testsubrepo/\fP |
| 8177 |
.UNINDENT |
| 8178 |
.sp |
| 8179 |
The \fBcollections\fP section is deprecated and has been superseded by |
| 8180 |
\fBpaths\fP. |
| 8181 |
.SS URLs and Common Arguments |
| 8182 |
.sp |
| 8183 |
URLs under each repository have the form \fB/{command}[/{arguments}]\fP |
| 8184 |
where \fB{command}\fP represents the name of a command or handler and |
| 8185 |
\fB{arguments}\fP represents any number of additional URL parameters |
| 8186 |
to that command. |
| 8187 |
.sp |
| 8188 |
The web server has a default style associated with it. Styles map to |
| 8189 |
a collection of named templates. Each template is used to render a |
| 8190 |
specific piece of data, such as a changeset or diff. |
| 8191 |
.sp |
| 8192 |
The style for the current request can be overridden two ways. First, |
| 8193 |
if \fB{command}\fP contains a hyphen (\fB\-\fP), the text before the hyphen |
| 8194 |
defines the style. For example, \fB/atom\-log\fP will render the \fBlog\fP |
| 8195 |
command handler with the \fBatom\fP style. The second way to set the |
| 8196 |
style is with the \fBstyle\fP query string argument. For example, |
| 8197 |
\fB/log?style=atom\fP. The hyphenated URL parameter is preferred. |
| 8198 |
.sp |
| 8199 |
Not all templates are available for all styles. Attempting to use |
| 8200 |
a style that doesn\(aqt have all templates defined may result in an error |
| 8201 |
rendering the page. |
| 8202 |
.sp |
| 8203 |
Many commands take a \fB{revision}\fP URL parameter. This defines the |
| 8204 |
changeset to operate on. This is commonly specified as the short, |
| 8205 |
12 digit hexadecimal abbreviation for the full 40 character unique |
| 8206 |
revision identifier. However, any value described by |
| 8207 |
\%\fBhg help revisions\fP\: typically works. |
| 8208 |
.SS Commands and URLs |
| 8209 |
.sp |
| 8210 |
The following web commands and their URLs are available: |
| 8211 |
.SS /annotate/{revision}/{path} |
| 8212 |
.sp |
| 8213 |
Show changeset information for each line in a file. |
| 8214 |
.sp |
| 8215 |
The \fBignorews\fP, \fBignorewsamount\fP, \fBignorewseol\fP, and |
| 8216 |
\fBignoreblanklines\fP query string arguments have the same meaning as |
| 8217 |
their \fB[annotate]\fP config equivalents. It uses the hgrc boolean |
| 8218 |
parsing logic to interpret the value. e.g. \fB0\fP and \fBfalse\fP are |
| 8219 |
false and \fB1\fP and \fBtrue\fP are true. If not defined, the server |
| 8220 |
default settings are used. |
| 8221 |
.sp |
| 8222 |
The \fBfileannotate\fP template is rendered. |
| 8223 |
.SS /archive/{revision}.{format}[/{path}] |
| 8224 |
.sp |
| 8225 |
Obtain an archive of repository content. |
| 8226 |
.sp |
| 8227 |
The content and type of the archive is defined by a URL path parameter. |
| 8228 |
\fBformat\fP is the file extension of the archive type to be generated. e.g. |
| 8229 |
\fBzip\fP or \fBtar.bz2\fP. Not all archive types may be allowed by your |
| 8230 |
server configuration. |
| 8231 |
.sp |
| 8232 |
The optional \fBpath\fP URL parameter controls content to include in the |
| 8233 |
archive. If omitted, every file in the specified revision is present in the |
| 8234 |
archive. If included, only the specified file or contents of the specified |
| 8235 |
directory will be included in the archive. |
| 8236 |
.sp |
| 8237 |
No template is used for this handler. Raw, binary content is generated. |
| 8238 |
.SS /bookmarks |
| 8239 |
.sp |
| 8240 |
Show information about bookmarks. |
| 8241 |
.sp |
| 8242 |
No arguments are accepted. |
| 8243 |
.sp |
| 8244 |
The \fBbookmarks\fP template is rendered. |
| 8245 |
.SS /branches |
| 8246 |
.sp |
| 8247 |
Show information about branches. |
| 8248 |
.sp |
| 8249 |
All known branches are contained in the output, even closed branches. |
| 8250 |
.sp |
| 8251 |
No arguments are accepted. |
| 8252 |
.sp |
| 8253 |
The \fBbranches\fP template is rendered. |
| 8254 |
.SS /changelog[/{revision}] |
| 8255 |
.sp |
| 8256 |
Show information about multiple changesets. |
| 8257 |
.sp |
| 8258 |
If the optional \fBrevision\fP URL argument is absent, information about |
| 8259 |
all changesets starting at \fBtip\fP will be rendered. If the \fBrevision\fP |
| 8260 |
argument is present, changesets will be shown starting from the specified |
| 8261 |
revision. |
| 8262 |
.sp |
| 8263 |
If \fBrevision\fP is absent, the \fBrev\fP query string argument may be |
| 8264 |
defined. This will perform a search for changesets. |
| 8265 |
.sp |
| 8266 |
The argument for \fBrev\fP can be a single revision, a revision set, |
| 8267 |
or a literal keyword to search for in changeset data (equivalent to |
| 8268 |
\%\fBhg log \-k\fP\:). |
| 8269 |
.sp |
| 8270 |
The \fBrevcount\fP query string argument defines the maximum numbers of |
| 8271 |
changesets to render. |
| 8272 |
.sp |
| 8273 |
For non\-searches, the \fBchangelog\fP template will be rendered. |
| 8274 |
.SS /changeset[/{revision}] |
| 8275 |
.sp |
| 8276 |
Show information about a single changeset. |
| 8277 |
.sp |
| 8278 |
A URL path argument is the changeset identifier to show. See \fBhg help |
| 8279 |
revisions\fP for possible values. If not defined, the \fBtip\fP changeset |
| 8280 |
will be shown. |
| 8281 |
.sp |
| 8282 |
The \fBchangeset\fP template is rendered. Contents of the \fBchangesettag\fP, |
| 8283 |
\fBchangesetbookmark\fP, \fBfilenodelink\fP, \fBfilenolink\fP, and the many |
| 8284 |
templates related to diffs may all be used to produce the output. |
| 8285 |
.SS /comparison/{revision}/{path} |
| 8286 |
.sp |
| 8287 |
Show a comparison between the old and new versions of a file from changes |
| 8288 |
made on a particular revision. |
| 8289 |
.sp |
| 8290 |
This is similar to the \fBdiff\fP handler. However, this form features |
| 8291 |
a split or side\-by\-side diff rather than a unified diff. |
| 8292 |
.sp |
| 8293 |
The \fBcontext\fP query string argument can be used to control the lines of |
| 8294 |
context in the diff. |
| 8295 |
.sp |
| 8296 |
The \fBfilecomparison\fP template is rendered. |
| 8297 |
.SS /diff/{revision}/{path} |
| 8298 |
.sp |
| 8299 |
Show how a file changed in a particular commit. |
| 8300 |
.sp |
| 8301 |
The \fBfilediff\fP template is rendered. |
| 8302 |
.sp |
| 8303 |
This handler is registered under both the \fB/diff\fP and \fB/filediff\fP |
| 8304 |
paths. \fB/diff\fP is used in modern code. |
| 8305 |
.SS /file/{revision}[/{path}] |
| 8306 |
.sp |
| 8307 |
Show information about a directory or file in the repository. |
| 8308 |
.sp |
| 8309 |
Info about the \fBpath\fP given as a URL parameter will be rendered. |
| 8310 |
.sp |
| 8311 |
If \fBpath\fP is a directory, information about the entries in that |
| 8312 |
directory will be rendered. This form is equivalent to the \fBmanifest\fP |
| 8313 |
handler. |
| 8314 |
.sp |
| 8315 |
If \fBpath\fP is a file, information about that file will be shown via |
| 8316 |
the \fBfilerevision\fP template. |
| 8317 |
.sp |
| 8318 |
If \fBpath\fP is not defined, information about the root directory will |
| 8319 |
be rendered. |
| 8320 |
.SS /diff/{revision}/{path} |
| 8321 |
.sp |
| 8322 |
Show how a file changed in a particular commit. |
| 8323 |
.sp |
| 8324 |
The \fBfilediff\fP template is rendered. |
| 8325 |
.sp |
| 8326 |
This handler is registered under both the \fB/diff\fP and \fB/filediff\fP |
| 8327 |
paths. \fB/diff\fP is used in modern code. |
| 8328 |
.SS /filelog/{revision}/{path} |
| 8329 |
.sp |
| 8330 |
Show information about the history of a file in the repository. |
| 8331 |
.sp |
| 8332 |
The \fBrevcount\fP query string argument can be defined to control the |
| 8333 |
maximum number of entries to show. |
| 8334 |
.sp |
| 8335 |
The \fBfilelog\fP template will be rendered. |
| 8336 |
.SS /graph[/{revision}] |
| 8337 |
.sp |
| 8338 |
Show information about the graphical topology of the repository. |
| 8339 |
.sp |
| 8340 |
Information rendered by this handler can be used to create visual |
| 8341 |
representations of repository topology. |
| 8342 |
.sp |
| 8343 |
The \fBrevision\fP URL parameter controls the starting changeset. If it\(aqs |
| 8344 |
absent, the default is \fBtip\fP. |
| 8345 |
.sp |
| 8346 |
The \fBrevcount\fP query string argument can define the number of changesets |
| 8347 |
to show information for. |
| 8348 |
.sp |
| 8349 |
The \fBgraphtop\fP query string argument can specify the starting changeset |
| 8350 |
for producing \fBjsdata\fP variable that is used for rendering graph in |
| 8351 |
JavaScript. By default it has the same value as \fBrevision\fP. |
| 8352 |
.sp |
| 8353 |
This handler will render the \fBgraph\fP template. |
| 8354 |
.SS /help[/{topic}] |
| 8355 |
.sp |
| 8356 |
Render help documentation. |
| 8357 |
.sp |
| 8358 |
This web command is roughly equivalent to \%\fBhg help\fP\:. If a \fBtopic\fP |
| 8359 |
is defined, that help topic will be rendered. If not, an index of |
| 8360 |
available help topics will be rendered. |
| 8361 |
.sp |
| 8362 |
The \fBhelp\fP template will be rendered when requesting help for a topic. |
| 8363 |
\fBhelptopics\fP will be rendered for the index of help topics. |
| 8364 |
.SS /log[/{revision}[/{path}]] |
| 8365 |
.sp |
| 8366 |
Show repository or file history. |
| 8367 |
.sp |
| 8368 |
For URLs of the form \fB/log/{revision}\fP, a list of changesets starting at |
| 8369 |
the specified changeset identifier is shown. If \fB{revision}\fP is not |
| 8370 |
defined, the default is \fBtip\fP. This form is equivalent to the |
| 8371 |
\fBchangelog\fP handler. |
| 8372 |
.sp |
| 8373 |
For URLs of the form \fB/log/{revision}/{file}\fP, the history for a specific |
| 8374 |
file will be shown. This form is equivalent to the \fBfilelog\fP handler. |
| 8375 |
.SS /manifest[/{revision}[/{path}]] |
| 8376 |
.sp |
| 8377 |
Show information about a directory. |
| 8378 |
.sp |
| 8379 |
If the URL path arguments are omitted, information about the root |
| 8380 |
directory for the \fBtip\fP changeset will be shown. |
| 8381 |
.sp |
| 8382 |
Because this handler can only show information for directories, it |
| 8383 |
is recommended to use the \fBfile\fP handler instead, as it can handle both |
| 8384 |
directories and files. |
| 8385 |
.sp |
| 8386 |
The \fBmanifest\fP template will be rendered for this handler. |
| 8387 |
.SS /changeset[/{revision}] |
| 8388 |
.sp |
| 8389 |
Show information about a single changeset. |
| 8390 |
.sp |
| 8391 |
A URL path argument is the changeset identifier to show. See \fBhg help |
| 8392 |
revisions\fP for possible values. If not defined, the \fBtip\fP changeset |
| 8393 |
will be shown. |
| 8394 |
.sp |
| 8395 |
The \fBchangeset\fP template is rendered. Contents of the \fBchangesettag\fP, |
| 8396 |
\fBchangesetbookmark\fP, \fBfilenodelink\fP, \fBfilenolink\fP, and the many |
| 8397 |
templates related to diffs may all be used to produce the output. |
| 8398 |
.SS /shortlog |
| 8399 |
.sp |
| 8400 |
Show basic information about a set of changesets. |
| 8401 |
.sp |
| 8402 |
This accepts the same parameters as the \fBchangelog\fP handler. The only |
| 8403 |
difference is the \fBshortlog\fP template will be rendered instead of the |
| 8404 |
\fBchangelog\fP template. |
| 8405 |
.SS /summary |
| 8406 |
.sp |
| 8407 |
Show a summary of repository state. |
| 8408 |
.sp |
| 8409 |
Information about the latest changesets, bookmarks, tags, and branches |
| 8410 |
is captured by this handler. |
| 8411 |
.sp |
| 8412 |
The \fBsummary\fP template is rendered. |
| 8413 |
.SS /tags |
| 8414 |
.sp |
| 8415 |
Show information about tags. |
| 8416 |
.sp |
| 8417 |
No arguments are accepted. |
| 8418 |
.sp |
| 8419 |
The \fBtags\fP template is rendered. |
| 8420 |
.SH TECHNICAL IMPLEMENTATION TOPICS |
| 8421 |
.sp |
| 8422 |
To access a subtopic, use "hg help internals.{subtopic\-name}" |
| 8423 |
.INDENT 0.0 |
| 8424 |
.INDENT 3.5 |
| 8425 |
.INDENT 0.0 |
| 8426 |
.TP |
| 8427 |
.B bid\-merge |
| 8428 |
. |
| 8429 |
Bid Merge Algorithm |
| 8430 |
.TP |
| 8431 |
.B bundle2 |
| 8432 |
. |
| 8433 |
Bundle2 |
| 8434 |
.TP |
| 8435 |
.B bundles |
| 8436 |
. |
| 8437 |
Bundles |
| 8438 |
.TP |
| 8439 |
.B cbor |
| 8440 |
. |
| 8441 |
CBOR |
| 8442 |
.TP |
| 8443 |
.B censor |
| 8444 |
. |
| 8445 |
Censor |
| 8446 |
.TP |
| 8447 |
.B changegroups |
| 8448 |
. |
| 8449 |
Changegroups |
| 8450 |
.TP |
| 8451 |
.B config |
| 8452 |
. |
| 8453 |
Config Registrar |
| 8454 |
.TP |
| 8455 |
.B dirstate\-v2 |
| 8456 |
. |
| 8457 |
dirstate\-v2 file format |
| 8458 |
.TP |
| 8459 |
.B extensions |
| 8460 |
. |
| 8461 |
Extension API |
| 8462 |
.TP |
| 8463 |
.B file\-index |
| 8464 |
. |
| 8465 |
File Index |
| 8466 |
.TP |
| 8467 |
.B mergestate |
| 8468 |
. |
| 8469 |
Mergestate |
| 8470 |
.TP |
| 8471 |
.B requirements |
| 8472 |
. |
| 8473 |
Repository Requirements |
| 8474 |
.TP |
| 8475 |
.B revlogs |
| 8476 |
. |
| 8477 |
Revision Logs |
| 8478 |
.TP |
| 8479 |
.B wireprotocol |
| 8480 |
. |
| 8481 |
Wire Protocol |
| 8482 |
.TP |
| 8483 |
.B wireprotocolrpc |
| 8484 |
. |
| 8485 |
Wire Protocol RPC |
| 8486 |
.TP |
| 8487 |
.B wireprotocolv2 |
| 8488 |
. |
| 8489 |
Wire Protocol Version 2 |
| 8490 |
.UNINDENT |
| 8491 |
.UNINDENT |
| 8492 |
.UNINDENT |
| 8493 |
.SH MERGE TOOLS |
| 8494 |
.sp |
| 8495 |
To merge files Mercurial uses merge tools. |
| 8496 |
.sp |
| 8497 |
A merge tool combines two different versions of a file into a merged |
| 8498 |
file. Merge tools are given the two files and the greatest common |
| 8499 |
ancestor of the two file versions, so they can determine the changes |
| 8500 |
made on both branches. |
| 8501 |
.sp |
| 8502 |
Merge tools are used both for \%\fBhg resolve\fP\:, \%\fBhg merge\fP\:, \%\fBhg update\fP\:, |
| 8503 |
\%\fBhg backout\fP\: and in several extensions. |
| 8504 |
.sp |
| 8505 |
Usually, the merge tool tries to automatically reconcile the files by |
| 8506 |
combining all non\-overlapping changes that occurred separately in |
| 8507 |
the two different evolutions of the same initial base file. Furthermore, some |
| 8508 |
interactive merge programs make it easier to manually resolve |
| 8509 |
conflicting merges, either in a graphical way, or by inserting some |
| 8510 |
conflict markers. Mercurial does not include any interactive merge |
| 8511 |
programs but relies on external tools for that. |
| 8512 |
.SS Available merge tools |
| 8513 |
.sp |
| 8514 |
External merge tools and their properties are configured in the |
| 8515 |
merge\-tools configuration section \- see hgrc(5) \- but they can often just |
| 8516 |
be named by their executable. |
| 8517 |
.sp |
| 8518 |
A merge tool is generally usable if its executable can be found on the |
| 8519 |
system and if it can handle the merge. The executable is found if it |
| 8520 |
is an absolute or relative executable path or the name of an |
| 8521 |
application in the executable search path. The tool is assumed to be |
| 8522 |
able to handle the merge if it can handle symlinks if the file is a |
| 8523 |
symlink, if it can handle binary files if the file is binary, and if a |
| 8524 |
GUI is available if the tool requires a GUI. |
| 8525 |
.sp |
| 8526 |
There are some internal merge tools which can be used. The internal |
| 8527 |
merge tools are: |
| 8528 |
.INDENT 0.0 |
| 8529 |
.TP |
| 8530 |
.B \fB:dump\fP |
| 8531 |
.sp |
| 8532 |
Creates three versions of the files to merge, containing the |
| 8533 |
contents of local, other and base. These files can then be used to |
| 8534 |
perform a merge manually. If the file to be merged is named |
| 8535 |
\fBa.txt\fP, these files will accordingly be named \fBa.txt.local\fP, |
| 8536 |
\fBa.txt.other\fP and \fBa.txt.base\fP and they will be placed in the |
| 8537 |
same directory as \fBa.txt\fP. |
| 8538 |
.sp |
| 8539 |
This implies premerge. Therefore, files aren\(aqt dumped, if premerge |
| 8540 |
runs successfully. Use :forcedump to forcibly write files out. |
| 8541 |
.sp |
| 8542 |
(actual capabilities: binary, symlink) |
| 8543 |
.TP |
| 8544 |
.B \fB:fail\fP |
| 8545 |
.sp |
| 8546 |
Rather than attempting to merge files that were modified on both |
| 8547 |
branches, it marks them as unresolved. The resolve command must be |
| 8548 |
used to resolve these conflicts. |
| 8549 |
.sp |
| 8550 |
(actual capabilities: binary, symlink) |
| 8551 |
.TP |
| 8552 |
.B \fB:forcedump\fP |
| 8553 |
.sp |
| 8554 |
Creates three versions of the files as same as :dump, but omits premerge. |
| 8555 |
.sp |
| 8556 |
(actual capabilities: binary, symlink) |
| 8557 |
.TP |
| 8558 |
.B \fB:local\fP |
| 8559 |
.sp |
| 8560 |
Uses the local \fIp1()\fP version of files as the merged version. |
| 8561 |
.sp |
| 8562 |
(actual capabilities: binary, symlink) |
| 8563 |
.TP |
| 8564 |
.B \fB:merge\fP |
| 8565 |
.sp |
| 8566 |
Uses the internal non\-interactive simple merge algorithm for merging |
| 8567 |
files. It will fail if there are any conflicts and leave markers in |
| 8568 |
the partially merged file. Markers will have two sections, one for each side |
| 8569 |
of merge. |
| 8570 |
.TP |
| 8571 |
.B \fB:merge\-local\fP |
| 8572 |
.sp |
| 8573 |
Like :merge, but resolve all conflicts non\-interactively in favor |
| 8574 |
of the local \fIp1()\fP changes. |
| 8575 |
.TP |
| 8576 |
.B \fB:merge\-other\fP |
| 8577 |
.sp |
| 8578 |
Like :merge, but resolve all conflicts non\-interactively in favor |
| 8579 |
of the other \fIp2()\fP changes. |
| 8580 |
.TP |
| 8581 |
.B \fB:merge3\fP |
| 8582 |
.sp |
| 8583 |
Uses the internal non\-interactive simple merge algorithm for merging |
| 8584 |
files. It will fail if there are any conflicts and leave markers in |
| 8585 |
the partially merged file. Marker will have three sections, one from each |
| 8586 |
side of the merge and one for the base content. |
| 8587 |
.TP |
| 8588 |
.B \fB:mergediff\fP |
| 8589 |
.sp |
| 8590 |
Uses the internal non\-interactive simple merge algorithm for merging |
| 8591 |
files. It will fail if there are any conflicts and leave markers in |
| 8592 |
the partially merged file. The marker will have two sections, one with the |
| 8593 |
content from one side of the merge, and one with a diff from the base |
| 8594 |
content to the content on the other side. (experimental) |
| 8595 |
.TP |
| 8596 |
.B \fB:other\fP |
| 8597 |
.sp |
| 8598 |
Uses the other \fIp2()\fP version of files as the merged version. |
| 8599 |
.sp |
| 8600 |
(actual capabilities: binary, symlink) |
| 8601 |
.TP |
| 8602 |
.B \fB:prompt\fP |
| 8603 |
.sp |
| 8604 |
Asks the user which of the local \fIp1()\fP or the other \fIp2()\fP version to |
| 8605 |
keep as the merged version. |
| 8606 |
.sp |
| 8607 |
(actual capabilities: binary, symlink) |
| 8608 |
.TP |
| 8609 |
.B \fB:tagmerge\fP |
| 8610 |
.sp |
| 8611 |
Uses the internal tag merge algorithm (experimental). |
| 8612 |
.TP |
| 8613 |
.B \fB:union\fP |
| 8614 |
.sp |
| 8615 |
Uses the internal non\-interactive simple merge algorithm for merging |
| 8616 |
files. It will use both local and other sides for conflict regions by |
| 8617 |
adding local on top of other. |
| 8618 |
No markers are inserted. |
| 8619 |
.TP |
| 8620 |
.B \fB:union\-other\-first\fP |
| 8621 |
.sp |
| 8622 |
Like :union, but add other on top of local. |
| 8623 |
.UNINDENT |
| 8624 |
.sp |
| 8625 |
Internal tools are always available and do not require a GUI but will |
| 8626 |
by default not handle symlinks or binary files. See next section for |
| 8627 |
detail about "actual capabilities" described above. |
| 8628 |
.SS Choosing a merge tool |
| 8629 |
.sp |
| 8630 |
Mercurial uses these rules when deciding which merge tool to use: |
| 8631 |
.INDENT 0.0 |
| 8632 |
.IP 1. 3 |
| 8633 |
. |
| 8634 |
If a tool has been specified with the \-\-tool option to merge or resolve, it |
| 8635 |
is used. If it is the name of a tool in the merge\-tools configuration, its |
| 8636 |
configuration is used. Otherwise the specified tool must be executable by |
| 8637 |
the shell. |
| 8638 |
.IP 2. 3 |
| 8639 |
. |
| 8640 |
If the \fBHGMERGE\fP environment variable is present, its value is used and |
| 8641 |
must be executable by the shell. |
| 8642 |
.IP 3. 3 |
| 8643 |
. |
| 8644 |
If the filename of the file to be merged matches any of the patterns in the |
| 8645 |
merge\-patterns configuration section, the first usable merge tool |
| 8646 |
corresponding to a matching pattern is used. |
| 8647 |
.IP 4. 3 |
| 8648 |
. |
| 8649 |
If ui.merge is set it will be considered next. If the value is not the name |
| 8650 |
of a configured tool, the specified value is used and must be executable by |
| 8651 |
the shell. Otherwise the named tool is used if it is usable. |
| 8652 |
.IP 5. 3 |
| 8653 |
. |
| 8654 |
If any usable merge tools are present in the merge\-tools configuration |
| 8655 |
section, the one with the highest priority is used. |
| 8656 |
.IP 6. 3 |
| 8657 |
. |
| 8658 |
If a program named \fBhgmerge\fP can be found on the system, it is used \- but |
| 8659 |
it will by default not be used for symlinks and binary files. |
| 8660 |
.IP 7. 3 |
| 8661 |
. |
| 8662 |
If the file to be merged is not binary and is not a symlink, then |
| 8663 |
internal \fB:merge\fP is used. |
| 8664 |
.IP 8. 3 |
| 8665 |
. |
| 8666 |
Otherwise, \fB:prompt\fP is used. |
| 8667 |
.UNINDENT |
| 8668 |
.sp |
| 8669 |
For historical reason, Mercurial treats merge tools as below while |
| 8670 |
examining rules above. |
| 8671 |
.TS |
| 8672 |
center; |
| 8673 |
|l|l|l|l|. |
| 8674 |
_ |
| 8675 |
T{ |
| 8676 |
step |
| 8677 |
T} T{ |
| 8678 |
specified via |
| 8679 |
T} T{ |
| 8680 |
binary |
| 8681 |
T} T{ |
| 8682 |
symlink |
| 8683 |
T} |
| 8684 |
_ |
| 8685 |
T{ |
| 8686 |
.INDENT 0.0 |
| 8687 |
.IP 1. 3 |
| 8688 |
.UNINDENT |
| 8689 |
T} T{ |
| 8690 |
\-\-tool |
| 8691 |
T} T{ |
| 8692 |
o/o |
| 8693 |
T} T{ |
| 8694 |
o/o |
| 8695 |
T} |
| 8696 |
_ |
| 8697 |
T{ |
| 8698 |
.INDENT 0.0 |
| 8699 |
.IP 2. 3 |
| 8700 |
.UNINDENT |
| 8701 |
T} T{ |
| 8702 |
HGMERGE |
| 8703 |
T} T{ |
| 8704 |
o/o |
| 8705 |
T} T{ |
| 8706 |
o/o |
| 8707 |
T} |
| 8708 |
_ |
| 8709 |
T{ |
| 8710 |
.INDENT 0.0 |
| 8711 |
.IP 3. 3 |
| 8712 |
.UNINDENT |
| 8713 |
T} T{ |
| 8714 |
merge\-patterns |
| 8715 |
T} T{ |
| 8716 |
o/o(*) |
| 8717 |
T} T{ |
| 8718 |
x/?(*) |
| 8719 |
T} |
| 8720 |
_ |
| 8721 |
T{ |
| 8722 |
.INDENT 0.0 |
| 8723 |
.IP 4. 3 |
| 8724 |
.UNINDENT |
| 8725 |
T} T{ |
| 8726 |
ui.merge |
| 8727 |
T} T{ |
| 8728 |
x/?(*) |
| 8729 |
T} T{ |
| 8730 |
x/?(*) |
| 8731 |
T} |
| 8732 |
_ |
| 8733 |
.TE |
| 8734 |
.sp |
| 8735 |
Each capability column indicates Mercurial behavior for |
| 8736 |
internal/external merge tools at examining each rule. |
| 8737 |
.INDENT 0.0 |
| 8738 |
.IP \(bu 2 |
| 8739 |
. |
| 8740 |
"o": "assume that a tool has capability" |
| 8741 |
.IP \(bu 2 |
| 8742 |
. |
| 8743 |
"x": "assume that a tool does not have capability" |
| 8744 |
.IP \(bu 2 |
| 8745 |
. |
| 8746 |
"?": "check actual capability of a tool" |
| 8747 |
.UNINDENT |
| 8748 |
.sp |
| 8749 |
If \fBmerge.strict\-capability\-check\fP configuration is true, Mercurial |
| 8750 |
checks capabilities of merge tools strictly in (*) cases above (= each |
| 8751 |
capability column becomes "?/?"). It is false by default for backward |
| 8752 |
compatibility. |
| 8753 |
.IP Note |
| 8754 |
. |
| 8755 |
After selecting a merge program, Mercurial will by default attempt |
| 8756 |
to merge the files using a simple merge algorithm first. Only if it doesn\(aqt |
| 8757 |
succeed because of conflicting changes will Mercurial actually execute the |
| 8758 |
merge program. Whether to use the simple merge algorithm first can be |
| 8759 |
controlled by the premerge setting of the merge tool. Premerge is enabled by |
| 8760 |
default unless the file is binary or a symlink. |
| 8761 |
.RE |
| 8762 |
.sp |
| 8763 |
See the merge\-tools and ui sections of hgrc(5) for details on the |
| 8764 |
configuration of merge tools. |
| 8765 |
.SH PAGER SUPPORT |
| 8766 |
.sp |
| 8767 |
Some Mercurial commands can produce a lot of output, and Mercurial will |
| 8768 |
attempt to use a pager to make those commands more pleasant. |
| 8769 |
.sp |
| 8770 |
To set the pager that should be used, set the application variable: |
| 8771 |
.sp |
| 8772 |
.nf |
| 8773 |
.ft C |
| 8774 |
[pager] |
| 8775 |
pager = less \-FRX |
| 8776 |
.ft P |
| 8777 |
.fi |
| 8778 |
.sp |
| 8779 |
If no pager is set in the user or repository configuration, Mercurial uses the |
| 8780 |
environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
| 8781 |
or system configuration is used. If none of these are set, a default pager will |
| 8782 |
be used, typically \fIless\fP on Unix and \fImore\fP on Windows. |
| 8783 |
.sp |
| 8784 |
On Windows, \fImore\fP is not color aware, so using it effectively disables color. |
| 8785 |
MSYS and Cygwin shells provide \fIless\fP as a pager, which can be configured to |
| 8786 |
support ANSI color codes. See \%\fBhg help config.color.pagermode\fP\: to configure |
| 8787 |
the color mode when invoking a pager. |
| 8788 |
.sp |
| 8789 |
You can disable the pager for certain commands by adding them to the |
| 8790 |
pager.ignore list: |
| 8791 |
.sp |
| 8792 |
.nf |
| 8793 |
.ft C |
| 8794 |
[pager] |
| 8795 |
ignore = version, help, update |
| 8796 |
.ft P |
| 8797 |
.fi |
| 8798 |
.sp |
| 8799 |
To ignore global commands like \%\fBhg version\fP\: or \%\fBhg help\fP\:, you have |
| 8800 |
to specify them in your user configuration file. |
| 8801 |
.sp |
| 8802 |
To control whether the pager is used at all for an individual command, |
| 8803 |
you can use \-\-pager=<value>: |
| 8804 |
.INDENT 0.0 |
| 8805 |
.INDENT 3.5 |
| 8806 |
.INDENT 0.0 |
| 8807 |
.IP \(bu 2 |
| 8808 |
. |
| 8809 |
use as needed: \fIauto\fP. |
| 8810 |
.IP \(bu 2 |
| 8811 |
. |
| 8812 |
require the pager: \fIyes\fP or \fIon\fP. |
| 8813 |
.IP \(bu 2 |
| 8814 |
. |
| 8815 |
suppress the pager: \fIno\fP or \fIoff\fP (any unrecognized value |
| 8816 |
will also work). |
| 8817 |
.UNINDENT |
| 8818 |
.UNINDENT |
| 8819 |
.UNINDENT |
| 8820 |
.sp |
| 8821 |
To globally turn off all attempts to use a pager, set: |
| 8822 |
.sp |
| 8823 |
.nf |
| 8824 |
.ft C |
| 8825 |
[ui] |
| 8826 |
paginate = never |
| 8827 |
.ft P |
| 8828 |
.fi |
| 8829 |
.sp |
| 8830 |
which will prevent the pager from running. |
| 8831 |
.SH FILE NAME PATTERNS |
| 8832 |
.sp |
| 8833 |
Mercurial accepts several notations for identifying one or more files |
| 8834 |
at a time. |
| 8835 |
.sp |
| 8836 |
By default, Mercurial treats filenames verbatim without pattern |
| 8837 |
matching, relative to the current working directory. Note that your |
| 8838 |
system shell might perform pattern matching of its own before passing |
| 8839 |
filenames into Mercurial. |
| 8840 |
.sp |
| 8841 |
Alternate pattern notations must be specified explicitly. |
| 8842 |
.IP Note |
| 8843 |
. |
| 8844 |
Patterns specified in \fB.hgignore\fP are not rooted. |
| 8845 |
Please see \%\fBhg help hgignore\fP\: for details. |
| 8846 |
.RE |
| 8847 |
.sp |
| 8848 |
To use a plain path name without any pattern matching, start it with |
| 8849 |
\fBpath:\fP. These path names must completely match starting at the |
| 8850 |
current repository root, and when the path points to a directory, it is matched |
| 8851 |
recursively. To match all files in a directory non\-recursively (not including |
| 8852 |
any files in subdirectories), \fBrootfilesin:\fP can be used, specifying an |
| 8853 |
absolute path (relative to the repository root). To match a single file exactly, |
| 8854 |
relative to the repository root, you can use \fBfilepath:\fP. |
| 8855 |
.sp |
| 8856 |
To use an extended glob, start a name with \fBglob:\fP. Globs are rooted |
| 8857 |
at the current directory; a glob such as \fB*.c\fP will only match files |
| 8858 |
in the current directory ending with \fB.c\fP. \fBrootglob:\fP can be used |
| 8859 |
instead of \fBglob:\fP for a glob that is rooted at the root of the |
| 8860 |
repository. |
| 8861 |
.sp |
| 8862 |
The supported glob syntax extensions are \fB**\fP to match any string |
| 8863 |
across path separators and \fB{a,b}\fP to mean "a or b". |
| 8864 |
.sp |
| 8865 |
To use a Perl/Python regular expression, start a name with \fBre:\fP. |
| 8866 |
Regexp pattern matching is anchored at the root of the repository. |
| 8867 |
.sp |
| 8868 |
To read name patterns from a file, use \fBlistfile:\fP or \fBlistfile0:\fP. |
| 8869 |
The latter expects null delimited patterns while the former expects line |
| 8870 |
feeds. Each string read from the file is itself treated as a file |
| 8871 |
pattern. |
| 8872 |
.sp |
| 8873 |
To read a set of patterns from a file, use \fBinclude:\fP or \fBsubinclude:\fP. |
| 8874 |
\fBinclude:\fP will use all the patterns from the given file and treat them as if |
| 8875 |
they had been passed in manually. \fBsubinclude:\fP will only apply the patterns |
| 8876 |
against files that are under the subinclude file\(aqs directory. See \%\fBhg help |
| 8877 |
hgignore\fP\: for details on the format of these files. |
| 8878 |
.sp |
| 8879 |
All patterns, except for \fBglob:\fP specified in command line (not for |
| 8880 |
\fB\-I\fP or \fB\-X\fP options), can match also against directories: files |
| 8881 |
under matched directories are treated as matched. |
| 8882 |
For \fB\-I\fP and \fB\-X\fP options, \fBglob:\fP will match directories recursively. |
| 8883 |
.sp |
| 8884 |
Plain examples: |
| 8885 |
.sp |
| 8886 |
.nf |
| 8887 |
.ft C |
| 8888 |
path:foo/bar a name bar in a directory named foo in the root |
| 8889 |
of the repository |
| 8890 |
path:some/path a file or directory named "some/path" |
| 8891 |
filepath:some/path/to/a/file exactly a single file named |
| 8892 |
"some/path/to/a/file", relative to the root |
| 8893 |
of the repository |
| 8894 |
rootfilesin:foo/bar the files in a directory called foo/bar, but |
| 8895 |
not any files in its subdirectories and not |
| 8896 |
a file bar in directory foo |
| 8897 |
.ft P |
| 8898 |
.fi |
| 8899 |
.sp |
| 8900 |
Glob examples: |
| 8901 |
.sp |
| 8902 |
.nf |
| 8903 |
.ft C |
| 8904 |
glob:*.c any name ending in ".c" in the current directory |
| 8905 |
*.c any name ending in ".c" in the current directory |
| 8906 |
**.c any name ending in ".c" in any subdirectory of the |
| 8907 |
current directory including itself. |
| 8908 |
foo/* any file in directory foo |
| 8909 |
foo/** any file in directory foo plus all its subdirectories, |
| 8910 |
recursively |
| 8911 |
foo/*.c any name ending in ".c" in the directory foo |
| 8912 |
foo/**.c any name ending in ".c" in any subdirectory of foo |
| 8913 |
including itself. |
| 8914 |
rootglob:*.c any name ending in ".c" in the root of the repository |
| 8915 |
.ft P |
| 8916 |
.fi |
| 8917 |
.sp |
| 8918 |
Regexp examples: |
| 8919 |
.sp |
| 8920 |
.nf |
| 8921 |
.ft C |
| 8922 |
re:.*\e.c$ any name ending in ".c", anywhere in the repository |
| 8923 |
.ft P |
| 8924 |
.fi |
| 8925 |
.sp |
| 8926 |
File examples: |
| 8927 |
.sp |
| 8928 |
.nf |
| 8929 |
.ft C |
| 8930 |
listfile:list.txt read list from list.txt with one file pattern per line |
| 8931 |
listfile0:list.txt read list from list.txt with null byte delimiters |
| 8932 |
.ft P |
| 8933 |
.fi |
| 8934 |
.sp |
| 8935 |
See also \%\fBhg help filesets\fP\:. |
| 8936 |
.sp |
| 8937 |
Include examples: |
| 8938 |
.sp |
| 8939 |
.nf |
| 8940 |
.ft C |
| 8941 |
include:path/to/mypatternfile reads patterns to be applied to all paths |
| 8942 |
subinclude:path/to/subignorefile reads patterns specifically for paths in the |
| 8943 |
subdirectory |
| 8944 |
.ft P |
| 8945 |
.fi |
| 8946 |
.SH WORKING WITH PHASES |
| 8947 |
.SS What are phases? |
| 8948 |
.sp |
| 8949 |
Phases are a system for tracking which changesets have been or should |
| 8950 |
be shared. This helps prevent common mistakes when modifying history |
| 8951 |
(for instance, with the mq or rebase extensions). |
| 8952 |
.sp |
| 8953 |
Each changeset in a repository is in one of the following phases: |
| 8954 |
.INDENT 0.0 |
| 8955 |
.INDENT 3.5 |
| 8956 |
.INDENT 0.0 |
| 8957 |
.IP \(bu 2 |
| 8958 |
. |
| 8959 |
public : changeset is visible on a public server |
| 8960 |
.IP \(bu 2 |
| 8961 |
. |
| 8962 |
draft : changeset is not yet published |
| 8963 |
.IP \(bu 2 |
| 8964 |
. |
| 8965 |
secret : changeset should not be pushed, pulled, or cloned |
| 8966 |
.UNINDENT |
| 8967 |
.UNINDENT |
| 8968 |
.UNINDENT |
| 8969 |
.sp |
| 8970 |
These phases are ordered (public < draft < secret) and no changeset |
| 8971 |
can be in a lower phase than its ancestors. For instance, if a |
| 8972 |
changeset is public, all its ancestors are also public. Lastly, |
| 8973 |
changeset phases should only be changed towards the public phase. |
| 8974 |
.SS How are phases managed? |
| 8975 |
.sp |
| 8976 |
For the most part, phases should work transparently. By default, a |
| 8977 |
changeset is created in the draft phase and is moved into the public |
| 8978 |
phase when it is pushed to another repository. |
| 8979 |
.sp |
| 8980 |
Once changesets become public, extensions like mq and rebase will |
| 8981 |
refuse to operate on them to prevent creating duplicate changesets. |
| 8982 |
Phases can also be manually manipulated with the \%\fBhg phase\fP\: command |
| 8983 |
if needed. See \%\fBhg help \-v phase\fP\: for examples. |
| 8984 |
.sp |
| 8985 |
To make your commits secret by default, put this in your |
| 8986 |
configuration file: |
| 8987 |
.sp |
| 8988 |
.nf |
| 8989 |
.ft C |
| 8990 |
[phases] |
| 8991 |
new\-commit = secret |
| 8992 |
.ft P |
| 8993 |
.fi |
| 8994 |
.SS Phases and servers |
| 8995 |
.sp |
| 8996 |
Normally, all servers are \fBpublishing\fP by default. This means: |
| 8997 |
.sp |
| 8998 |
.nf |
| 8999 |
.ft C |
| 9000 |
\- all draft changesets that are pulled or cloned appear in phase |
| 9001 |
public on the client |
| 9002 |
|
| 9003 |
\- all draft changesets that are pushed appear as public on both |
| 9004 |
client and server |
| 9005 |
|
| 9006 |
\- secret changesets are neither pushed, pulled, or cloned |
| 9007 |
.ft P |
| 9008 |
.fi |
| 9009 |
.IP Note |
| 9010 |
. |
| 9011 |
Pulling a draft changeset from a publishing server does not mark it |
| 9012 |
as public on the server side due to the read\-only nature of pull. |
| 9013 |
.RE |
| 9014 |
.sp |
| 9015 |
Sometimes it may be desirable to push and pull changesets in the draft |
| 9016 |
phase to share unfinished work. This can be done by setting a |
| 9017 |
repository to disable publishing in its configuration file: |
| 9018 |
.sp |
| 9019 |
.nf |
| 9020 |
.ft C |
| 9021 |
[phases] |
| 9022 |
publish = False |
| 9023 |
.ft P |
| 9024 |
.fi |
| 9025 |
.sp |
| 9026 |
See \%\fBhg help config\fP\: for more information on configuration files. |
| 9027 |
.IP Note |
| 9028 |
. |
| 9029 |
Servers running older versions of Mercurial are treated as |
| 9030 |
publishing. |
| 9031 |
.RE |
| 9032 |
.IP Note |
| 9033 |
. |
| 9034 |
Changesets in secret phase are not exchanged with the server. This |
| 9035 |
applies to their content: file names, file contents, and changeset |
| 9036 |
metadata. For technical reasons, the identifier (e.g. d825e4025e39) |
| 9037 |
of the secret changeset may be communicated to the server. |
| 9038 |
.RE |
| 9039 |
.SS Examples |
| 9040 |
.INDENT 0.0 |
| 9041 |
.INDENT 3.5 |
| 9042 |
.INDENT 0.0 |
| 9043 |
.IP \(bu 2 |
| 9044 |
. |
| 9045 |
list changesets in draft or secret phase: |
| 9046 |
.sp |
| 9047 |
.nf |
| 9048 |
.ft C |
| 9049 |
hg log \-r "not public()" |
| 9050 |
.ft P |
| 9051 |
.fi |
| 9052 |
.IP \(bu 2 |
| 9053 |
. |
| 9054 |
change all secret changesets to draft: |
| 9055 |
.sp |
| 9056 |
.nf |
| 9057 |
.ft C |
| 9058 |
hg phase \-\-draft "secret()" |
| 9059 |
.ft P |
| 9060 |
.fi |
| 9061 |
.IP \(bu 2 |
| 9062 |
. |
| 9063 |
forcibly move the current changeset and descendants from public to draft: |
| 9064 |
.sp |
| 9065 |
.nf |
| 9066 |
.ft C |
| 9067 |
hg phase \-\-force \-\-draft . |
| 9068 |
.ft P |
| 9069 |
.fi |
| 9070 |
.IP \(bu 2 |
| 9071 |
. |
| 9072 |
show a list of changeset revisions and each corresponding phase: |
| 9073 |
.sp |
| 9074 |
.nf |
| 9075 |
.ft C |
| 9076 |
hg log \-\-template "{rev} {phase}\en" |
| 9077 |
.ft P |
| 9078 |
.fi |
| 9079 |
.IP \(bu 2 |
| 9080 |
. |
| 9081 |
resynchronize draft changesets relative to a remote repository: |
| 9082 |
.sp |
| 9083 |
.nf |
| 9084 |
.ft C |
| 9085 |
hg phase \-fd "outgoing(URL)" |
| 9086 |
.ft P |
| 9087 |
.fi |
| 9088 |
.UNINDENT |
| 9089 |
.UNINDENT |
| 9090 |
.UNINDENT |
| 9091 |
.sp |
| 9092 |
See \%\fBhg help phase\fP\: for more information on manually manipulating phases. |
| 9093 |
.SH SPECIFYING REVISIONS |
| 9094 |
.sp |
| 9095 |
Mercurial supports several ways to specify revisions. |
| 9096 |
.SS Specifying single revisions |
| 9097 |
.sp |
| 9098 |
A plain integer is treated as a revision number. Negative integers are |
| 9099 |
treated as sequential offsets from the tip, with \-1 denoting the tip, |
| 9100 |
\-2 denoting the revision prior to the tip, and so forth. |
| 9101 |
.sp |
| 9102 |
A 40\-digit hexadecimal string is treated as a unique revision identifier. |
| 9103 |
A hexadecimal string less than 40 characters long is treated as a |
| 9104 |
unique revision identifier and is referred to as a short\-form |
| 9105 |
identifier. A short\-form identifier is only valid if it is the prefix |
| 9106 |
of exactly one full\-length identifier. |
| 9107 |
.sp |
| 9108 |
Any other string is treated as a bookmark, tag, or branch name. A |
| 9109 |
bookmark is a movable pointer to a revision. A tag is a permanent name |
| 9110 |
associated with a revision. A branch name denotes the tipmost open branch head |
| 9111 |
of that branch \- or if they are all closed, the tipmost closed head of the |
| 9112 |
branch. Bookmark, tag, and branch names must not contain the ":" character. |
| 9113 |
.sp |
| 9114 |
The reserved name "tip" always identifies the most recent revision. |
| 9115 |
.sp |
| 9116 |
The reserved name "null" indicates the null revision. This is the |
| 9117 |
revision of an empty repository, and the parent of revision 0. |
| 9118 |
.sp |
| 9119 |
The reserved name "." indicates the working directory parent. If no |
| 9120 |
working directory is checked out, it is equivalent to null. If an |
| 9121 |
uncommitted merge is in progress, "." is the revision of the first |
| 9122 |
parent. |
| 9123 |
.sp |
| 9124 |
Finally, commands that expect a single revision (like \fBhg update\fP) also |
| 9125 |
accept revsets (see below for details). When given a revset, they use the |
| 9126 |
last revision of the revset. A few commands accept two single revisions |
| 9127 |
(like \fBhg diff\fP). When given a revset, they use the first and the last |
| 9128 |
revisions of the revset. |
| 9129 |
.SS Specifying multiple revisions |
| 9130 |
.sp |
| 9131 |
Mercurial supports a functional language for selecting a set of |
| 9132 |
revisions. Expressions in this language are called revsets. |
| 9133 |
.sp |
| 9134 |
The language supports a number of predicates which are joined by infix |
| 9135 |
operators. Parenthesis can be used for grouping. |
| 9136 |
.sp |
| 9137 |
Identifiers such as branch names may need quoting with single or |
| 9138 |
double quotes if they contain characters like \fB\-\fP or if they match |
| 9139 |
one of the predefined predicates. |
| 9140 |
.sp |
| 9141 |
Special characters can be used in quoted identifiers by escaping them, |
| 9142 |
e.g., \fB\en\fP is interpreted as a newline. To prevent them from being |
| 9143 |
interpreted, strings can be prefixed with \fBr\fP, e.g. \fBr\(aq...\(aq\fP. |
| 9144 |
.SS Operators |
| 9145 |
.sp |
| 9146 |
There is a single prefix operator: |
| 9147 |
.INDENT 0.0 |
| 9148 |
.TP |
| 9149 |
.B \fBnot x\fP |
| 9150 |
.sp |
| 9151 |
Changesets not in x. Short form is \fB! x\fP. |
| 9152 |
.UNINDENT |
| 9153 |
.sp |
| 9154 |
These are the supported infix operators: |
| 9155 |
.INDENT 0.0 |
| 9156 |
.TP |
| 9157 |
.B \fBx::y\fP |
| 9158 |
.sp |
| 9159 |
A DAG range, meaning all changesets that are descendants of x and |
| 9160 |
ancestors of y, including x and y themselves. If the first endpoint |
| 9161 |
is left out, this is equivalent to \fBancestors(y)\fP, if the second |
| 9162 |
is left out it is equivalent to \fBdescendants(x)\fP. |
| 9163 |
.sp |
| 9164 |
An alternative syntax is \fBx..y\fP. |
| 9165 |
.TP |
| 9166 |
.B \fBx:y\fP |
| 9167 |
.sp |
| 9168 |
All changesets with revision numbers between x and y, both |
| 9169 |
inclusive. Either endpoint can be left out, they default to 0 and |
| 9170 |
tip. |
| 9171 |
.TP |
| 9172 |
.B \fBx and y\fP |
| 9173 |
.sp |
| 9174 |
The intersection of changesets in x and y. Short form is \fBx & y\fP. |
| 9175 |
.TP |
| 9176 |
.B \fBx or y\fP |
| 9177 |
.sp |
| 9178 |
The union of changesets in x and y. There are two alternative short |
| 9179 |
forms: \fBx | y\fP and \fBx + y\fP. |
| 9180 |
.TP |
| 9181 |
.B \fBx \- y\fP |
| 9182 |
.sp |
| 9183 |
Changesets in x but not in y. |
| 9184 |
.TP |
| 9185 |
.B \fBx % y\fP |
| 9186 |
.sp |
| 9187 |
Changesets that are ancestors of x but not ancestors of y (i.e. ::x \- ::y). |
| 9188 |
This is shorthand notation for \fBonly(x, y)\fP (see below). The second |
| 9189 |
argument is optional and, if left out, is equivalent to \fBonly(x)\fP. |
| 9190 |
.TP |
| 9191 |
.B \fBx^n\fP |
| 9192 |
.sp |
| 9193 |
The nth parent of x, n == 0, 1, or 2. |
| 9194 |
For n == 0, x; for n == 1, the first parent of each changeset in x; |
| 9195 |
for n == 2, the second parent of changeset in x. |
| 9196 |
.TP |
| 9197 |
.B \fBx~n\fP |
| 9198 |
.sp |
| 9199 |
The nth first ancestor of x; \fBx~0\fP is x; \fBx~3\fP is \fBx^^^\fP. |
| 9200 |
For n < 0, the nth unambiguous descendent of x. |
| 9201 |
.TP |
| 9202 |
.B \fBx ## y\fP |
| 9203 |
.sp |
| 9204 |
Concatenate strings and identifiers into one string. |
| 9205 |
.sp |
| 9206 |
All other prefix, infix and postfix operators have lower priority than |
| 9207 |
\fB##\fP. For example, \fBa1 ## a2~2\fP is equivalent to \fB(a1 ## a2)~2\fP. |
| 9208 |
.sp |
| 9209 |
For example: |
| 9210 |
.sp |
| 9211 |
.nf |
| 9212 |
.ft C |
| 9213 |
[revsetalias] |
| 9214 |
issue(a1) = grep(r\(aq\ebissue[ :]?\(aq ## a1 ## r\(aq\eb|\ebbug\e(\(aq ## a1 ## r\(aq\e)\(aq) |
| 9215 |
.ft P |
| 9216 |
.fi |
| 9217 |
.sp |
| 9218 |
\fBissue(1234)\fP is equivalent to |
| 9219 |
\fBgrep(r\(aq\ebissue[ :]?1234\eb|\ebbug\e(1234\e)\(aq)\fP |
| 9220 |
in this case. This matches against all of "issue 1234", "issue:1234", |
| 9221 |
"issue1234" and "bug(1234)". |
| 9222 |
.UNINDENT |
| 9223 |
.sp |
| 9224 |
There is a single postfix operator: |
| 9225 |
.INDENT 0.0 |
| 9226 |
.TP |
| 9227 |
.B \fBx^\fP |
| 9228 |
.sp |
| 9229 |
Equivalent to \fBx^1\fP, the first parent of each changeset in x. |
| 9230 |
.UNINDENT |
| 9231 |
.SS Patterns |
| 9232 |
.sp |
| 9233 |
Where noted, predicates that perform string matching can accept a pattern |
| 9234 |
string. The pattern may be either a literal, or a regular expression. If the |
| 9235 |
pattern starts with \fBre:\fP, the remainder of the pattern is treated as a |
| 9236 |
regular expression. Otherwise, it is treated as a literal. To match a pattern |
| 9237 |
that actually starts with \fBre:\fP, use the prefix \fBliteral:\fP. |
| 9238 |
.sp |
| 9239 |
Matching is case\-sensitive, unless otherwise noted. To perform a case\- |
| 9240 |
insensitive match on a case\-sensitive predicate, use a regular expression, |
| 9241 |
prefixed with \fB(?i)\fP. |
| 9242 |
.sp |
| 9243 |
For example, \fBtag(r\(aqre:(?i)release\(aq)\fP matches "release" or "RELEASE" |
| 9244 |
or "Release", etc. |
| 9245 |
.SS Predicates |
| 9246 |
.sp |
| 9247 |
The following predicates are supported: |
| 9248 |
.INDENT 0.0 |
| 9249 |
.TP |
| 9250 |
.B \fBadds(pattern)\fP |
| 9251 |
.sp |
| 9252 |
Changesets that add a file matching pattern. |
| 9253 |
.sp |
| 9254 |
The pattern without explicit kind like \fBglob:\fP is expected to be |
| 9255 |
relative to the current directory and match against a file or a |
| 9256 |
directory. |
| 9257 |
.TP |
| 9258 |
.B \fBall()\fP |
| 9259 |
.sp |
| 9260 |
All changesets, the same as \fB0:tip\fP. |
| 9261 |
.TP |
| 9262 |
.B \fBancestor(*changeset)\fP |
| 9263 |
.sp |
| 9264 |
A greatest common ancestor of the changesets. |
| 9265 |
.sp |
| 9266 |
Accepts 0 or more changesets. |
| 9267 |
Will return empty list when passed no args. |
| 9268 |
Greatest common ancestor of a single changeset is that changeset. |
| 9269 |
.TP |
| 9270 |
.B \fBancestors(set[, depth])\fP |
| 9271 |
.sp |
| 9272 |
Changesets that are ancestors of changesets in set, including the |
| 9273 |
given changesets themselves. |
| 9274 |
.sp |
| 9275 |
If depth is specified, the result only includes changesets up to |
| 9276 |
the specified generation. |
| 9277 |
.TP |
| 9278 |
.B \fBauthor(string)\fP |
| 9279 |
.sp |
| 9280 |
Alias for \fBuser(string)\fP. |
| 9281 |
.TP |
| 9282 |
.B \fBbisect(string)\fP |
| 9283 |
.sp |
| 9284 |
Changesets marked in the specified bisect status: |
| 9285 |
.INDENT 7.0 |
| 9286 |
.IP \(bu 2 |
| 9287 |
. |
| 9288 |
\fBgood\fP, \fBbad\fP, \fBskip\fP: csets explicitly marked as good/bad/skip |
| 9289 |
.IP \(bu 2 |
| 9290 |
. |
| 9291 |
\fBgoods\fP, \fBbads\fP : csets topologically good/bad |
| 9292 |
.IP \(bu 2 |
| 9293 |
. |
| 9294 |
\fBrange\fP : csets taking part in the bisection |
| 9295 |
.IP \(bu 2 |
| 9296 |
. |
| 9297 |
\fBpruned\fP : csets that are goods, bads or skipped |
| 9298 |
.IP \(bu 2 |
| 9299 |
. |
| 9300 |
\fBuntested\fP : csets whose fate is yet unknown |
| 9301 |
.IP \(bu 2 |
| 9302 |
. |
| 9303 |
\fBignored\fP : csets ignored due to DAG topology |
| 9304 |
.IP \(bu 2 |
| 9305 |
. |
| 9306 |
\fBcurrent\fP : the cset currently being bisected |
| 9307 |
.UNINDENT |
| 9308 |
.TP |
| 9309 |
.B \fBbookmark([name])\fP |
| 9310 |
.sp |
| 9311 |
The named bookmark or all bookmarks. |
| 9312 |
.sp |
| 9313 |
Pattern matching is supported for \fIname\fP. See \%\fBhg help revisions.patterns\fP\:. |
| 9314 |
.TP |
| 9315 |
.B \fBbranch(string or set)\fP |
| 9316 |
.sp |
| 9317 |
All changesets belonging to the given branch or the branches of the given |
| 9318 |
changesets. |
| 9319 |
.sp |
| 9320 |
Pattern matching is supported for \fIstring\fP. See |
| 9321 |
\%\fBhg help revisions.patterns\fP\:. |
| 9322 |
.TP |
| 9323 |
.B \fBbranchpoint()\fP |
| 9324 |
.sp |
| 9325 |
Changesets with more than one child. |
| 9326 |
.TP |
| 9327 |
.B \fBbundle()\fP |
| 9328 |
.sp |
| 9329 |
Changesets in the bundle. |
| 9330 |
.sp |
| 9331 |
Bundle must be specified by the \-R option. |
| 9332 |
.TP |
| 9333 |
.B \fBchildren(set)\fP |
| 9334 |
.sp |
| 9335 |
Child changesets of changesets in set. |
| 9336 |
.TP |
| 9337 |
.B \fBclosed()\fP |
| 9338 |
.sp |
| 9339 |
Changeset is closed. |
| 9340 |
.TP |
| 9341 |
.B \fBcommonancestors(set)\fP |
| 9342 |
.sp |
| 9343 |
Changesets that are ancestors of every changeset in set. |
| 9344 |
.TP |
| 9345 |
.B \fBconflictlocal()\fP |
| 9346 |
.sp |
| 9347 |
The local side of the merge, if currently in an unresolved merge. |
| 9348 |
.sp |
| 9349 |
"merge" here includes merge conflicts from e.g. \(aqhg rebase\(aq or \(aqhg graft\(aq. |
| 9350 |
.TP |
| 9351 |
.B \fBconflictother()\fP |
| 9352 |
.sp |
| 9353 |
The other side of the merge, if currently in an unresolved merge. |
| 9354 |
.sp |
| 9355 |
"merge" here includes merge conflicts from e.g. \(aqhg rebase\(aq or \(aqhg graft\(aq. |
| 9356 |
.TP |
| 9357 |
.B \fBcontains(pattern)\fP |
| 9358 |
.sp |
| 9359 |
The revision\(aqs manifest contains a file matching pattern (but might not |
| 9360 |
modify it). See \%\fBhg help patterns\fP\: for information about file patterns. |
| 9361 |
.sp |
| 9362 |
The pattern without explicit kind like \fBglob:\fP is expected to be |
| 9363 |
relative to the current directory and match against a file exactly |
| 9364 |
for efficiency. |
| 9365 |
.TP |
| 9366 |
.B \fBconverted([id])\fP |
| 9367 |
.sp |
| 9368 |
Changesets converted from the given identifier in the old repository if |
| 9369 |
present, or all converted changesets if no identifier is specified. |
| 9370 |
.TP |
| 9371 |
.B \fBdate(interval)\fP |
| 9372 |
.sp |
| 9373 |
Changesets within the interval, see \%\fBhg help dates\fP\:. |
| 9374 |
.TP |
| 9375 |
.B \fBdesc(string)\fP |
| 9376 |
.sp |
| 9377 |
Search commit message for string. The match is case\-insensitive. |
| 9378 |
.sp |
| 9379 |
Pattern matching is supported for \fIstring\fP. See |
| 9380 |
\%\fBhg help revisions.patterns\fP\:. |
| 9381 |
.TP |
| 9382 |
.B \fBdescendants(set[, depth])\fP |
| 9383 |
.sp |
| 9384 |
Changesets which are descendants of changesets in set, including the |
| 9385 |
given changesets themselves. |
| 9386 |
.sp |
| 9387 |
If depth is specified, the result only includes changesets up to |
| 9388 |
the specified generation. |
| 9389 |
.TP |
| 9390 |
.B \fBdestination([set])\fP |
| 9391 |
.sp |
| 9392 |
Changesets that were created by a graft, transplant or rebase operation, |
| 9393 |
with the given revisions specified as the source. Omitting the optional set |
| 9394 |
is the same as passing all(). |
| 9395 |
.TP |
| 9396 |
.B \fBdiffcontains(pattern)\fP |
| 9397 |
.sp |
| 9398 |
Search revision differences for when the pattern was added or removed. |
| 9399 |
.sp |
| 9400 |
The pattern may be a substring literal or a regular expression. See |
| 9401 |
\%\fBhg help revisions.patterns\fP\:. |
| 9402 |
.TP |
| 9403 |
.B \fBdraft()\fP |
| 9404 |
.sp |
| 9405 |
Changeset in draft phase. |
| 9406 |
.TP |
| 9407 |
.B \fBexpectsize(set[, size])\fP |
| 9408 |
.sp |
| 9409 |
Return the given revset if size matches the revset size. |
| 9410 |
Abort if the revset doesn\(aqt expect given size. |
| 9411 |
size can either be an integer range or an integer. |
| 9412 |
.sp |
| 9413 |
For example, \fBexpectsize(0:1, 3:5)\fP will abort as revset size is 2 and |
| 9414 |
2 is not between 3 and 5 inclusive. |
| 9415 |
.TP |
| 9416 |
.B \fBextra(label, [value])\fP |
| 9417 |
.sp |
| 9418 |
Changesets with the given label in the extra metadata, with the given |
| 9419 |
optional value. |
| 9420 |
.sp |
| 9421 |
Pattern matching is supported for \fIvalue\fP. See |
| 9422 |
\%\fBhg help revisions.patterns\fP\:. |
| 9423 |
.TP |
| 9424 |
.B \fBfile(pattern)\fP |
| 9425 |
.sp |
| 9426 |
Changesets affecting files matched by pattern. |
| 9427 |
.sp |
| 9428 |
For a faster but less accurate result, consider using \fBfilelog()\fP |
| 9429 |
instead. |
| 9430 |
.sp |
| 9431 |
This predicate uses \fBglob:\fP as the default kind of pattern. |
| 9432 |
.TP |
| 9433 |
.B \fBfilelog(pattern)\fP |
| 9434 |
.sp |
| 9435 |
Changesets connected to the specified filelog. |
| 9436 |
.sp |
| 9437 |
For performance reasons, visits only revisions mentioned in the file\-level |
| 9438 |
filelog, rather than filtering through all changesets (much faster, but |
| 9439 |
doesn\(aqt include deletes or duplicate changes). For a slower, more accurate |
| 9440 |
result, use \fBfile()\fP. |
| 9441 |
.sp |
| 9442 |
The pattern without explicit kind like \fBglob:\fP is expected to be |
| 9443 |
relative to the current directory and match against a file exactly |
| 9444 |
for efficiency. |
| 9445 |
.TP |
| 9446 |
.B \fBfirst(set, [n])\fP |
| 9447 |
.sp |
| 9448 |
An alias for limit(). |
| 9449 |
.TP |
| 9450 |
.B \fBfollow([file[, startrev]])\fP |
| 9451 |
.sp |
| 9452 |
An alias for \fB::.\fP (ancestors of the working directory\(aqs first parent). |
| 9453 |
If file pattern is specified, the histories of files matching given |
| 9454 |
pattern in the revision given by startrev are followed, including copies. |
| 9455 |
.TP |
| 9456 |
.B \fBfollowlines(file, fromline:toline[, startrev=., descend=False])\fP |
| 9457 |
.sp |
| 9458 |
Changesets modifying \fIfile\fP in line range (\(aqfromline\(aq, \(aqtoline\(aq). |
| 9459 |
.sp |
| 9460 |
Line range corresponds to \(aqfile\(aq content at \(aqstartrev\(aq and should hence be |
| 9461 |
consistent with file size. If startrev is not specified, working directory\(aqs |
| 9462 |
parent is used. |
| 9463 |
.sp |
| 9464 |
By default, ancestors of \(aqstartrev\(aq are returned. If \(aqdescend\(aq is True, |
| 9465 |
descendants of \(aqstartrev\(aq are returned though renames are (currently) not |
| 9466 |
followed in this direction. |
| 9467 |
.TP |
| 9468 |
.B \fBgrep(regex)\fP |
| 9469 |
.sp |
| 9470 |
Like \fBkeyword(string)\fP but accepts a regex. Use \fBgrep(r\(aq...\(aq)\fP |
| 9471 |
to ensure special escape characters are handled correctly. Unlike |
| 9472 |
\fBkeyword(string)\fP, the match is case\-sensitive. |
| 9473 |
.TP |
| 9474 |
.B \fBhead()\fP |
| 9475 |
.sp |
| 9476 |
Changeset is a named branch head. |
| 9477 |
.TP |
| 9478 |
.B \fBheads(set)\fP |
| 9479 |
.sp |
| 9480 |
Members of set with no children in set. |
| 9481 |
.TP |
| 9482 |
.B \fBhidden()\fP |
| 9483 |
.sp |
| 9484 |
Hidden changesets. |
| 9485 |
.TP |
| 9486 |
.B \fBid(string)\fP |
| 9487 |
.sp |
| 9488 |
Revision non\-ambiguously specified by the given hex string prefix. |
| 9489 |
.TP |
| 9490 |
.B \fBkeyword(string)\fP |
| 9491 |
.sp |
| 9492 |
Search commit message, user name, and names of changed files for |
| 9493 |
string. The match is case\-insensitive. |
| 9494 |
.sp |
| 9495 |
For a regular expression or case sensitive search of these fields, use |
| 9496 |
\fBgrep(regex)\fP. |
| 9497 |
.TP |
| 9498 |
.B \fBlast(set, [n])\fP |
| 9499 |
.sp |
| 9500 |
Last n members of set, defaulting to 1. |
| 9501 |
.TP |
| 9502 |
.B \fBlimit(set[, n[, offset]])\fP |
| 9503 |
.sp |
| 9504 |
First n members of set, defaulting to 1, starting from offset. |
| 9505 |
.TP |
| 9506 |
.B \fBmatching(revision [, field])\fP |
| 9507 |
.sp |
| 9508 |
Changesets in which a given set of fields match the set of fields in the |
| 9509 |
selected revision or set. |
| 9510 |
.sp |
| 9511 |
To match more than one field pass the list of fields to match separated |
| 9512 |
by spaces (e.g. \fBauthor description\fP). |
| 9513 |
.sp |
| 9514 |
Valid fields are most regular revision fields and some special fields. |
| 9515 |
.sp |
| 9516 |
Regular revision fields are \fBdescription\fP, \fBauthor\fP, \fBbranch\fP, |
| 9517 |
\fBdate\fP, \fBfiles\fP, \fBphase\fP, \fBparents\fP, \fBsubstate\fP, \fBuser\fP |
| 9518 |
and \fBdiff\fP. |
| 9519 |
Note that \fBauthor\fP and \fBuser\fP are synonyms. \fBdiff\fP refers to the |
| 9520 |
contents of the revision. Two revisions matching their \fBdiff\fP will |
| 9521 |
also match their \fBfiles\fP. |
| 9522 |
.sp |
| 9523 |
Special fields are \fBsummary\fP and \fBmetadata\fP: |
| 9524 |
\fBsummary\fP matches the first line of the description. |
| 9525 |
\fBmetadata\fP is equivalent to matching \fBdescription user date\fP |
| 9526 |
(i.e. it matches the main metadata fields). |
| 9527 |
.sp |
| 9528 |
\fBmetadata\fP is the default field which is used when no fields are |
| 9529 |
specified. You can match more than one field at a time. |
| 9530 |
.TP |
| 9531 |
.B \fBmax(set)\fP |
| 9532 |
.sp |
| 9533 |
Changeset with highest revision number in set. |
| 9534 |
.TP |
| 9535 |
.B \fBmerge()\fP |
| 9536 |
.sp |
| 9537 |
Changeset is a merge changeset. |
| 9538 |
.TP |
| 9539 |
.B \fBmin(set)\fP |
| 9540 |
.sp |
| 9541 |
Changeset with lowest revision number in set. |
| 9542 |
.TP |
| 9543 |
.B \fBmodifies(pattern)\fP |
| 9544 |
.sp |
| 9545 |
Changesets modifying files matched by pattern. |
| 9546 |
.sp |
| 9547 |
The pattern without explicit kind like \fBglob:\fP is expected to be |
| 9548 |
relative to the current directory and match against a file or a |
| 9549 |
directory. |
| 9550 |
.TP |
| 9551 |
.B \fBnamed(namespace)\fP |
| 9552 |
.sp |
| 9553 |
The changesets in a given namespace. |
| 9554 |
.sp |
| 9555 |
Pattern matching is supported for \fInamespace\fP. See |
| 9556 |
\%\fBhg help revisions.patterns\fP\:. |
| 9557 |
.TP |
| 9558 |
.B \fBnodefromfile(path)\fP |
| 9559 |
.sp |
| 9560 |
Read a list of nodes from the file at \fIpath\fP. |
| 9561 |
.sp |
| 9562 |
This applies \fIid(LINE)\fP to each line of the file. |
| 9563 |
.sp |
| 9564 |
This is useful when the amount of nodes you need to specify gets too large |
| 9565 |
for the command line. |
| 9566 |
.TP |
| 9567 |
.B \fBnone()\fP |
| 9568 |
.sp |
| 9569 |
No changesets. |
| 9570 |
.TP |
| 9571 |
.B \fBonly(set, [set])\fP |
| 9572 |
.sp |
| 9573 |
Changesets that are ancestors of the first set that are not ancestors |
| 9574 |
of any other head in the repo. If a second set is specified, the result |
| 9575 |
is ancestors of the first set that are not ancestors of the second set |
| 9576 |
(i.e. ::<set1> \- ::<set2>). |
| 9577 |
.TP |
| 9578 |
.B \fBorigin([set])\fP |
| 9579 |
.sp |
| 9580 |
Changesets that were specified as a source for the grafts, transplants or |
| 9581 |
rebases that created the given revisions. Omitting the optional set is the |
| 9582 |
same as passing all(). If a changeset created by these operations is itself |
| 9583 |
specified as a source for one of these operations, only the source changeset |
| 9584 |
for the first operation is selected. |
| 9585 |
.TP |
| 9586 |
.B \fBoutgoing([path])\fP |
| 9587 |
.sp |
| 9588 |
Changesets not found in the specified destination repository, or the |
| 9589 |
default push location. |
| 9590 |
.sp |
| 9591 |
If the location resolve to multiple repositories, the union of all |
| 9592 |
outgoing changeset will be used. |
| 9593 |
.TP |
| 9594 |
.B \fBp1([set])\fP |
| 9595 |
.sp |
| 9596 |
First parent of changesets in set, or the working directory. |
| 9597 |
.TP |
| 9598 |
.B \fBp2([set])\fP |
| 9599 |
.sp |
| 9600 |
Second parent of changesets in set, or the working directory. |
| 9601 |
.TP |
| 9602 |
.B \fBparents([set])\fP |
| 9603 |
.sp |
| 9604 |
The set of all parents for all changesets in set, or the working directory. |
| 9605 |
.TP |
| 9606 |
.B \fBpresent(set)\fP |
| 9607 |
.sp |
| 9608 |
An empty set, if any revision in set isn\(aqt found; otherwise, |
| 9609 |
all revisions in set. |
| 9610 |
.sp |
| 9611 |
If any of specified revisions is not present in the local repository, |
| 9612 |
the query is normally aborted. But this predicate allows the query |
| 9613 |
to continue even in such cases. |
| 9614 |
.TP |
| 9615 |
.B \fBpublic()\fP |
| 9616 |
.sp |
| 9617 |
Changeset in public phase. |
| 9618 |
.TP |
| 9619 |
.B \fBremote([id [,path]])\fP |
| 9620 |
.sp |
| 9621 |
Local revision that corresponds to the given identifier in a |
| 9622 |
remote repository, if present. Here, the \(aq.\(aq identifier is a |
| 9623 |
synonym for the current local branch. |
| 9624 |
.TP |
| 9625 |
.B \fBremoves(pattern)\fP |
| 9626 |
.sp |
| 9627 |
Changesets which remove files matching pattern. |
| 9628 |
.sp |
| 9629 |
The pattern without explicit kind like \fBglob:\fP is expected to be |
| 9630 |
relative to the current directory and match against a file or a |
| 9631 |
directory. |
| 9632 |
.TP |
| 9633 |
.B \fBrev(number)\fP |
| 9634 |
.sp |
| 9635 |
Revision with the given numeric identifier. |
| 9636 |
.TP |
| 9637 |
.B \fBreverse(set)\fP |
| 9638 |
.sp |
| 9639 |
Reverse order of set. |
| 9640 |
.TP |
| 9641 |
.B \fBrevset(set)\fP |
| 9642 |
.sp |
| 9643 |
Strictly interpret the content as a revset. |
| 9644 |
.sp |
| 9645 |
The content of this special predicate will be strictly interpreted as a |
| 9646 |
revset. For example, \fBrevset(id(0))\fP will be interpreted as "id(0)" |
| 9647 |
without possible ambiguity with a "id(0)" bookmark or tag. |
| 9648 |
.TP |
| 9649 |
.B \fBroots(set)\fP |
| 9650 |
.sp |
| 9651 |
Changesets in set with no parent changeset in set. |
| 9652 |
.TP |
| 9653 |
.B \fBsecret()\fP |
| 9654 |
.sp |
| 9655 |
Changeset in secret phase. |
| 9656 |
.TP |
| 9657 |
.B \fBsort(set[, [\-]key... [, ...]])\fP |
| 9658 |
.sp |
| 9659 |
Sort set by keys. The default sort order is ascending, specify a key |
| 9660 |
as \fB\-key\fP to sort in descending order. |
| 9661 |
.sp |
| 9662 |
The keys can be: |
| 9663 |
.INDENT 7.0 |
| 9664 |
.IP \(bu 2 |
| 9665 |
. |
| 9666 |
\fBrev\fP for the revision number, |
| 9667 |
.IP \(bu 2 |
| 9668 |
. |
| 9669 |
\fBbranch\fP for the branch name, |
| 9670 |
.IP \(bu 2 |
| 9671 |
. |
| 9672 |
\fBdesc\fP for the commit message (description), |
| 9673 |
.IP \(bu 2 |
| 9674 |
. |
| 9675 |
\fBuser\fP for user name (\fBauthor\fP can be used as an alias), |
| 9676 |
.IP \(bu 2 |
| 9677 |
. |
| 9678 |
\fBdate\fP for the commit date |
| 9679 |
.IP \(bu 2 |
| 9680 |
. |
| 9681 |
\fBtopo\fP for a reverse topographical sort |
| 9682 |
.IP \(bu 2 |
| 9683 |
. |
| 9684 |
\fBnode\fP the nodeid of the revision |
| 9685 |
.IP \(bu 2 |
| 9686 |
. |
| 9687 |
\fBrandom\fP randomly shuffle revisions |
| 9688 |
.UNINDENT |
| 9689 |
.sp |
| 9690 |
The \fBtopo\fP sort order cannot be combined with other sort keys. This sort |
| 9691 |
takes one optional argument, \fBtopo.firstbranch\fP, which takes a revset that |
| 9692 |
specifies what topographical branches to prioritize in the sort. |
| 9693 |
.sp |
| 9694 |
The \fBrandom\fP sort takes one optional \fBrandom.seed\fP argument to control |
| 9695 |
the pseudo\-randomness of the result. |
| 9696 |
.TP |
| 9697 |
.B \fBsubrepo([pattern])\fP |
| 9698 |
.sp |
| 9699 |
Changesets that add, modify or remove the given subrepo. If no subrepo |
| 9700 |
pattern is named, any subrepo changes are returned. |
| 9701 |
.TP |
| 9702 |
.B \fBtag([name])\fP |
| 9703 |
.sp |
| 9704 |
The specified tag by name, or all tagged revisions if no name is given. |
| 9705 |
.sp |
| 9706 |
Pattern matching is supported for \fIname\fP. See |
| 9707 |
\%\fBhg help revisions.patterns\fP\:. |
| 9708 |
.TP |
| 9709 |
.B \fBuser(string)\fP |
| 9710 |
.sp |
| 9711 |
User name contains string. The match is case\-insensitive. |
| 9712 |
.sp |
| 9713 |
Pattern matching is supported for \fIstring\fP. See |
| 9714 |
\%\fBhg help revisions.patterns\fP\:. |
| 9715 |
.UNINDENT |
| 9716 |
.SS Aliases |
| 9717 |
.sp |
| 9718 |
New predicates (known as "aliases") can be defined, using any combination of |
| 9719 |
existing predicates or other aliases. An alias definition looks like: |
| 9720 |
.sp |
| 9721 |
.nf |
| 9722 |
.ft C |
| 9723 |
<alias> = <definition> |
| 9724 |
.ft P |
| 9725 |
.fi |
| 9726 |
.sp |
| 9727 |
in the \fBrevsetalias\fP section of a Mercurial configuration file. Arguments |
| 9728 |
of the form \fIa1\fP, \fIa2\fP, etc. are substituted from the alias into the |
| 9729 |
definition. |
| 9730 |
.sp |
| 9731 |
For example, |
| 9732 |
.sp |
| 9733 |
.nf |
| 9734 |
.ft C |
| 9735 |
[revsetalias] |
| 9736 |
h = heads() |
| 9737 |
d(s) = sort(s, date) |
| 9738 |
rs(s, k) = reverse(sort(s, k)) |
| 9739 |
.ft P |
| 9740 |
.fi |
| 9741 |
.sp |
| 9742 |
defines three aliases, \fBh\fP, \fBd\fP, and \fBrs\fP. \fBrs(0:tip, author)\fP is |
| 9743 |
exactly equivalent to \fBreverse(sort(0:tip, author))\fP. |
| 9744 |
.SS Equivalents |
| 9745 |
.sp |
| 9746 |
Command line equivalents for \%\fBhg log\fP\:: |
| 9747 |
.sp |
| 9748 |
.nf |
| 9749 |
.ft C |
| 9750 |
\-f \-> ::. |
| 9751 |
\-d x \-> date(x) |
| 9752 |
\-k x \-> keyword(x) |
| 9753 |
\-m \-> merge() |
| 9754 |
\-u x \-> user(x) |
| 9755 |
\-b x \-> branch(x) |
| 9756 |
\-P x \-> !::x |
| 9757 |
\-l x \-> limit(expr, x) |
| 9758 |
.ft P |
| 9759 |
.fi |
| 9760 |
.SS Examples |
| 9761 |
.sp |
| 9762 |
Some sample queries: |
| 9763 |
.INDENT 0.0 |
| 9764 |
.IP \(bu 2 |
| 9765 |
. |
| 9766 |
Changesets on the default branch: |
| 9767 |
.sp |
| 9768 |
.nf |
| 9769 |
.ft C |
| 9770 |
hg log \-r "branch(default)" |
| 9771 |
.ft P |
| 9772 |
.fi |
| 9773 |
.IP \(bu 2 |
| 9774 |
. |
| 9775 |
Changesets on the default branch since tag 1.5 (excluding merges): |
| 9776 |
.sp |
| 9777 |
.nf |
| 9778 |
.ft C |
| 9779 |
hg log \-r "branch(default) and 1.5:: and not merge()" |
| 9780 |
.ft P |
| 9781 |
.fi |
| 9782 |
.IP \(bu 2 |
| 9783 |
. |
| 9784 |
Open branch heads: |
| 9785 |
.sp |
| 9786 |
.nf |
| 9787 |
.ft C |
| 9788 |
hg log \-r "head() and not closed()" |
| 9789 |
.ft P |
| 9790 |
.fi |
| 9791 |
.IP \(bu 2 |
| 9792 |
. |
| 9793 |
Changesets between tags 1.3 and 1.5 mentioning "bug" that affect |
| 9794 |
\fBhgext/*\fP: |
| 9795 |
.sp |
| 9796 |
.nf |
| 9797 |
.ft C |
| 9798 |
hg log \-r "1.3::1.5 and keyword(bug) and file(\(aqhgext/*\(aq)" |
| 9799 |
.ft P |
| 9800 |
.fi |
| 9801 |
.IP \(bu 2 |
| 9802 |
. |
| 9803 |
Changesets committed in May 2008, sorted by user: |
| 9804 |
.sp |
| 9805 |
.nf |
| 9806 |
.ft C |
| 9807 |
hg log \-r "sort(date(\(aqMay 2008\(aq), user)" |
| 9808 |
.ft P |
| 9809 |
.fi |
| 9810 |
.IP \(bu 2 |
| 9811 |
. |
| 9812 |
Changesets mentioning "bug" or "issue" that are not in a tagged |
| 9813 |
release: |
| 9814 |
.sp |
| 9815 |
.nf |
| 9816 |
.ft C |
| 9817 |
hg log \-r "(keyword(bug) or keyword(issue)) and not ancestors(tag())" |
| 9818 |
.ft P |
| 9819 |
.fi |
| 9820 |
.IP \(bu 2 |
| 9821 |
. |
| 9822 |
Update to the commit that bookmark @ is pointing to, without activating the |
| 9823 |
bookmark (this works because the last revision of the revset is used): |
| 9824 |
.sp |
| 9825 |
.nf |
| 9826 |
.ft C |
| 9827 |
hg update :@ |
| 9828 |
.ft P |
| 9829 |
.fi |
| 9830 |
.IP \(bu 2 |
| 9831 |
. |
| 9832 |
Show diff between tags 1.3 and 1.5 (this works because the first and the |
| 9833 |
last revisions of the revset are used): |
| 9834 |
.sp |
| 9835 |
.nf |
| 9836 |
.ft C |
| 9837 |
hg diff \-r 1.3::1.5 |
| 9838 |
.ft P |
| 9839 |
.fi |
| 9840 |
.UNINDENT |
| 9841 |
.SH RUST IN MERCURIAL |
| 9842 |
.sp |
| 9843 |
Mercurial can be augmented with Rust extensions for speeding up certain |
| 9844 |
operations. |
| 9845 |
.SS Word of Caution |
| 9846 |
.sp |
| 9847 |
Using the Rust extension might result in the use of various repository formats |
| 9848 |
that are not supported by non\-Rust mercurial. When using a Mercurial |
| 9849 |
without Rust support on the same repositories, you might need to downgrade your |
| 9850 |
repository formats and/or activate cripplingly slow paths for compatibility. |
| 9851 |
For details, see: |
| 9852 |
.INDENT 0.0 |
| 9853 |
.INDENT 3.5 |
| 9854 |
.INDENT 0.0 |
| 9855 |
.IP \(bu 2 |
| 9856 |
. |
| 9857 |
\%\fBhg help config.format.use\-persistent\-nodemap\fP\: |
| 9858 |
.IP \(bu 2 |
| 9859 |
. |
| 9860 |
\%\fBhg help config.format.use\-dirstate\-v2\fP\: |
| 9861 |
.UNINDENT |
| 9862 |
.UNINDENT |
| 9863 |
.UNINDENT |
| 9864 |
.sp |
| 9865 |
In addition, while the tests are run with the Rust code, there might be |
| 9866 |
subtle undetected divergences from the historical non\-Rust code. So keep |
| 9867 |
your eyes open and report any oddity. Rust is not considered a first class |
| 9868 |
citizen to the project yet. |
| 9869 |
.SS Compatibility |
| 9870 |
.sp |
| 9871 |
Though the Rust extensions are only tested by the project under Linux, users of |
| 9872 |
MacOS, FreeBSD and other UNIX\-likes have been using the Rust extensions. Your |
| 9873 |
mileage may vary, but by all means do give us feedback or signal your interest |
| 9874 |
for better support. |
| 9875 |
.sp |
| 9876 |
For compatibility with non\-Rust version of Mercurial check the previous "Word of |
| 9877 |
Caution" section. |
| 9878 |
.sp |
| 9879 |
No Rust extensions are available for Windows at this time. |
| 9880 |
.SS Features |
| 9881 |
.sp |
| 9882 |
The following operations are sped up when using Rust: |
| 9883 |
.INDENT 0.0 |
| 9884 |
.INDENT 3.5 |
| 9885 |
.INDENT 0.0 |
| 9886 |
.IP \(bu 2 |
| 9887 |
. |
| 9888 |
discovery of differences between repositories (pull/push) |
| 9889 |
.IP \(bu 2 |
| 9890 |
. |
| 9891 |
nodemap (see \%\fBhg help config.format.use\-persistent\-nodemap\fP\:) |
| 9892 |
.IP \(bu 2 |
| 9893 |
. |
| 9894 |
all commands using the dirstate (status, commit, diff, add, update, etc.) |
| 9895 |
.IP \(bu 2 |
| 9896 |
. |
| 9897 |
dirstate\-v2 (see \%\fBhg help config.format.use\-dirstate\-v2\fP\:) |
| 9898 |
.IP \(bu 2 |
| 9899 |
. |
| 9900 |
iteration over ancestors in a graph |
| 9901 |
.UNINDENT |
| 9902 |
.UNINDENT |
| 9903 |
.UNINDENT |
| 9904 |
.sp |
| 9905 |
More features are in the works, and improvements on the above listed are still |
| 9906 |
in progress. For more experimental work see the "rhg" section. |
| 9907 |
.SS Checking for Rust |
| 9908 |
.sp |
| 9909 |
You may already have the Rust extensions depending on how you install |
| 9910 |
Mercurial: |
| 9911 |
.sp |
| 9912 |
.nf |
| 9913 |
.ft C |
| 9914 |
$ hg debuginstall | grep \-i rust |
| 9915 |
checking Rust extensions (installed) |
| 9916 |
checking module policy (rust+c\-allow) |
| 9917 |
.ft P |
| 9918 |
.fi |
| 9919 |
.sp |
| 9920 |
If those lines don\(aqt even exist, you\(aqre using an old version of \fIhg\fP which does |
| 9921 |
not have any Rust extensions yet. |
| 9922 |
.SS Installing |
| 9923 |
.sp |
| 9924 |
You will need \fIcargo\fP to be in your \fI$PATH\fP. See the "MSRV" section for which |
| 9925 |
version to use. |
| 9926 |
.SS Using pip |
| 9927 |
.sp |
| 9928 |
Users of \fIpip\fP can install the Rust extensions with the following commands: |
| 9929 |
.sp |
| 9930 |
.nf |
| 9931 |
.ft C |
| 9932 |
$ pip cache remove mercurial |
| 9933 |
$ pip install mercurial \-v \e |
| 9934 |
\-\-config\-settings \-\-global\-option=\-\-rust \e |
| 9935 |
\-\-no\-binary mercurial \-\-force |
| 9936 |
.ft P |
| 9937 |
.fi |
| 9938 |
.sp |
| 9939 |
\fIpip cache remove\fP and \fI\-\-no\-binary\fP are there to tell pip to not use the |
| 9940 |
pre\-compiled wheels that are missing rust support. This might take a couple |
| 9941 |
of minutes because you\(aqre compiling everything. |
| 9942 |
.sp |
| 9943 |
See the "Checking for Rust" section to see if the install succeeded. |
| 9944 |
.SS Using pipx |
| 9945 |
.sp |
| 9946 |
Using pipx is an efficient way to get an isolated installation of mercurial |
| 9947 |
available for a user or globally. |
| 9948 |
.INDENT 0.0 |
| 9949 |
.INDENT 3.5 |
| 9950 |
.INDENT 0.0 |
| 9951 |
.TP |
| 9952 |
.B $ pipx install mercurial |
| 9953 |
. |
| 9954 |
\-\-pip\-args \(aq\-\-no\-cache\-dir \-\-config\-settings \-\-global\-option=\-\-rust \-\-no\-binary=mercurial\(aq |
| 9955 |
.UNINDENT |
| 9956 |
.UNINDENT |
| 9957 |
.UNINDENT |
| 9958 |
.sp |
| 9959 |
You can then add extensions to that install using |
| 9960 |
.INDENT 0.0 |
| 9961 |
.INDENT 3.5 |
| 9962 |
.sp |
| 9963 |
$ pipx inject mercurial hg\-foo |
| 9964 |
.UNINDENT |
| 9965 |
.UNINDENT |
| 9966 |
.SS Using uv tool |
| 9967 |
.sp |
| 9968 |
Using \fIuv tool\fP is another efficient way to get an isolated installation of |
| 9969 |
mercurial available for a user or globally. |
| 9970 |
.INDENT 0.0 |
| 9971 |
.INDENT 3.5 |
| 9972 |
.INDENT 0.0 |
| 9973 |
.TP |
| 9974 |
.B $ uv tool install mercurial |
| 9975 |
. |
| 9976 |
\-\-no\-binary=mercurial \-\-no\-cache \-\-config\-setting=\-\-build\-option=\-\-rust |
| 9977 |
.UNINDENT |
| 9978 |
.UNINDENT |
| 9979 |
.UNINDENT |
| 9980 |
.sp |
| 9981 |
You can bring extensions along using the \fI\-\-with\fP flag. For example |
| 9982 |
.INDENT 0.0 |
| 9983 |
.INDENT 3.5 |
| 9984 |
.sp |
| 9985 |
$ uv tool install mercurial \-\-with hg\-evolve [...] |
| 9986 |
.UNINDENT |
| 9987 |
.UNINDENT |
| 9988 |
.SS From your distribution |
| 9989 |
.sp |
| 9990 |
Some distributions are shipping Mercurial with Rust extensions enabled and |
| 9991 |
pre\-compiled (meaning you won\(aqt have to install \fIcargo\fP), or allow you to |
| 9992 |
specify an install flag. Check with your specific distribution for how to do |
| 9993 |
that, or ask their team to add support for hg+Rust! |
| 9994 |
.SS From source |
| 9995 |
.sp |
| 9996 |
Please refer to the \fIrust/README.md\fP file in the Mercurial repository for |
| 9997 |
instructions on how to install from source. |
| 9998 |
.SS MSRV |
| 9999 |
.sp |
| 10000 |
The minimum supported Rust version is defined in \fIrust/clippy.toml\fP. |
| 10001 |
The project\(aqs policy is to keep it at or below the version from Debian testing, |
| 10002 |
to make the distributions\(aq job easier. |
| 10003 |
.SS rhg |
| 10004 |
.sp |
| 10005 |
There exists an experimental pure\-Rust version of Mercurial called \fIrhg\fP with a |
| 10006 |
fallback mechanism for unsupported invocations. It allows for much faster |
| 10007 |
execution of certain commands while adding no discernable overhead for the rest. |
| 10008 |
.sp |
| 10009 |
The only way of trying it out is by building it from source. Please refer to |
| 10010 |
\fIrust/README.md\fP in the Mercurial repository. |
| 10011 |
.sp |
| 10012 |
See \fIhg help config.rhg\fP for configuration options. |
| 10013 |
.SS Contributing |
| 10014 |
.sp |
| 10015 |
If you would like to help the Rust endeavor, please refer to \fIrust/README.md\fP |
| 10016 |
in the Mercurial repository. |
| 10017 |
.SH USING MERCURIAL FROM SCRIPTS AND AUTOMATION |
| 10018 |
.sp |
| 10019 |
It is common for machines (as opposed to humans) to consume Mercurial. |
| 10020 |
This help topic describes some of the considerations for interfacing |
| 10021 |
machines with Mercurial. |
| 10022 |
.SS Choosing an Interface |
| 10023 |
.sp |
| 10024 |
Machines have a choice of several methods to interface with Mercurial. |
| 10025 |
These include: |
| 10026 |
.INDENT 0.0 |
| 10027 |
.IP \(bu 2 |
| 10028 |
. |
| 10029 |
Executing the \fBhg\fP process |
| 10030 |
.IP \(bu 2 |
| 10031 |
. |
| 10032 |
Querying a HTTP server |
| 10033 |
.IP \(bu 2 |
| 10034 |
. |
| 10035 |
Calling out to a command server |
| 10036 |
.UNINDENT |
| 10037 |
.sp |
| 10038 |
Executing \fBhg\fP processes is very similar to how humans interact with |
| 10039 |
Mercurial in the shell. It should already be familiar to you. |
| 10040 |
.sp |
| 10041 |
\%\fBhg serve\fP\: can be used to start a server. By default, this will start |
| 10042 |
a "hgweb" HTTP server. This HTTP server has support for machine\-readable |
| 10043 |
output, such as JSON. For more, see \%\fBhg help hgweb\fP\:. |
| 10044 |
.sp |
| 10045 |
\%\fBhg serve\fP\: can also start a "command server." Clients can connect |
| 10046 |
to this server and issue Mercurial commands over a special protocol. |
| 10047 |
For more details on the command server, including links to client |
| 10048 |
libraries, see \%https://www.mercurial\-scm.org/wiki/CommandServer\:. |
| 10049 |
.sp |
| 10050 |
\%\fBhg serve\fP\: based interfaces (the hgweb and command servers) have the |
| 10051 |
advantage over simple \fBhg\fP process invocations in that they are |
| 10052 |
likely more efficient. This is because there is significant overhead |
| 10053 |
to spawn new Python processes. |
| 10054 |
.IP Tip |
| 10055 |
. |
| 10056 |
If you need to invoke several \fBhg\fP processes in short order and/or |
| 10057 |
performance is important to you, use of a server\-based interface |
| 10058 |
is highly recommended. |
| 10059 |
.RE |
| 10060 |
.SS Environment Variables |
| 10061 |
.sp |
| 10062 |
As documented in \%\fBhg help environment\fP\:, various environment variables |
| 10063 |
influence the operation of Mercurial. The following are particularly |
| 10064 |
relevant for machines consuming Mercurial: |
| 10065 |
.INDENT 0.0 |
| 10066 |
.TP |
| 10067 |
.B HGPLAIN |
| 10068 |
. |
| 10069 |
If not set, Mercurial\(aqs output could be influenced by configuration |
| 10070 |
settings that impact its encoding, verbose mode, localization, etc. |
| 10071 |
.sp |
| 10072 |
It is highly recommended for machines to set this variable when |
| 10073 |
invoking \fBhg\fP processes. |
| 10074 |
.TP |
| 10075 |
.B HGENCODING |
| 10076 |
. |
| 10077 |
If not set, the locale used by Mercurial will be detected from the |
| 10078 |
environment. If the determined locale does not support display of |
| 10079 |
certain characters, Mercurial may render these character sequences |
| 10080 |
incorrectly (often by using "?" as a placeholder for invalid |
| 10081 |
characters in the current locale). |
| 10082 |
.sp |
| 10083 |
Explicitly setting this environment variable is a good practice to |
| 10084 |
guarantee consistent results. "utf\-8" is a good choice on UNIX\-like |
| 10085 |
environments. |
| 10086 |
.TP |
| 10087 |
.B HGRCPATH |
| 10088 |
. |
| 10089 |
If not set, Mercurial will inherit config options from config files |
| 10090 |
using the process described in \%\fBhg help config\fP\:. This includes |
| 10091 |
inheriting user or system\-wide config files. |
| 10092 |
.sp |
| 10093 |
When utmost control over the Mercurial configuration is desired, the |
| 10094 |
value of \fBHGRCPATH\fP can be set to an explicit file with known good |
| 10095 |
configs. In rare cases, the value can be set to an empty file or the |
| 10096 |
null device (often \fB/dev/null\fP) to bypass loading of any user or |
| 10097 |
system config files. Note that these approaches can have unintended |
| 10098 |
consequences, as the user and system config files often define things |
| 10099 |
like the username and extensions that may be required to interface |
| 10100 |
with a repository. |
| 10101 |
.TP |
| 10102 |
.B HGRCSKIPREPO |
| 10103 |
. |
| 10104 |
When set, the .hg/hgrc from repositories are not read. |
| 10105 |
.sp |
| 10106 |
Note that not reading the repository\(aqs configuration can have |
| 10107 |
unintended consequences, as the repository config files can define |
| 10108 |
things like extensions that are required for access to the |
| 10109 |
repository. |
| 10110 |
.UNINDENT |
| 10111 |
.SS Command\-line Flags |
| 10112 |
.sp |
| 10113 |
Mercurial\(aqs default command\-line parser is designed for humans, and is not |
| 10114 |
robust against malicious input. For instance, you can start a debugger by |
| 10115 |
passing \fB\-\-debugger\fP as an option value: |
| 10116 |
.sp |
| 10117 |
.nf |
| 10118 |
.ft C |
| 10119 |
$ REV=\-\-debugger sh \-c \(aqhg log \-r "$REV"\(aq |
| 10120 |
.ft P |
| 10121 |
.fi |
| 10122 |
.sp |
| 10123 |
This happens because several command\-line flags need to be scanned without |
| 10124 |
using a concrete command table, which may be modified while loading repository |
| 10125 |
settings and extensions. |
| 10126 |
.sp |
| 10127 |
Since Mercurial 4.4.2, the parsing of such flags may be restricted by setting |
| 10128 |
\fBHGPLAIN=+strictflags\fP. When this feature is enabled, all early options |
| 10129 |
(e.g. \fB\-R/\-\-repository\fP, \fB\-\-cwd\fP, \fB\-\-config\fP) must be specified first |
| 10130 |
amongst the other global options, and cannot be injected to an arbitrary |
| 10131 |
location: |
| 10132 |
.sp |
| 10133 |
.nf |
| 10134 |
.ft C |
| 10135 |
$ HGPLAIN=+strictflags hg \-R "$REPO" log \-r "$REV" |
| 10136 |
.ft P |
| 10137 |
.fi |
| 10138 |
.sp |
| 10139 |
In earlier Mercurial versions where \fB+strictflags\fP isn\(aqt available, you |
| 10140 |
can mitigate the issue by concatenating an option value with its flag: |
| 10141 |
.sp |
| 10142 |
.nf |
| 10143 |
.ft C |
| 10144 |
$ hg log \-r"$REV" \-\-keyword="$KEYWORD" |
| 10145 |
.ft P |
| 10146 |
.fi |
| 10147 |
.SS Consuming Command Output |
| 10148 |
.sp |
| 10149 |
It is common for machines to need to parse the output of Mercurial |
| 10150 |
commands for relevant data. This section describes the various |
| 10151 |
techniques for doing so. |
| 10152 |
.SS Parsing Raw Command Output |
| 10153 |
.sp |
| 10154 |
Likely the simplest and most effective solution for consuming command |
| 10155 |
output is to simply invoke \fBhg\fP commands as you would as a user and |
| 10156 |
parse their output. |
| 10157 |
.sp |
| 10158 |
The output of many commands can easily be parsed with tools like |
| 10159 |
\fBgrep\fP, \fBsed\fP, and \fBawk\fP. |
| 10160 |
.sp |
| 10161 |
A potential downside with parsing command output is that the output |
| 10162 |
of commands can change when Mercurial is upgraded. While Mercurial |
| 10163 |
does generally strive for strong backwards compatibility, command |
| 10164 |
output does occasionally change. Having tests for your automated |
| 10165 |
interactions with \fBhg\fP commands is generally recommended, but is |
| 10166 |
even more important when raw command output parsing is involved. |
| 10167 |
.SS Using Templates to Control Output |
| 10168 |
.sp |
| 10169 |
Many \fBhg\fP commands support templatized output via the |
| 10170 |
\fB\-T/\-\-template\fP argument. For more, see \%\fBhg help templates\fP\:. |
| 10171 |
.sp |
| 10172 |
Templates are useful for explicitly controlling output so that |
| 10173 |
you get exactly the data you want formatted how you want it. For |
| 10174 |
example, \fBlog \-T {node}\en\fP can be used to print a newline |
| 10175 |
delimited list of changeset nodes instead of a human\-tailored |
| 10176 |
output containing authors, dates, descriptions, etc. |
| 10177 |
.IP Tip |
| 10178 |
. |
| 10179 |
If parsing raw command output is too complicated, consider |
| 10180 |
using templates to make your life easier. |
| 10181 |
.RE |
| 10182 |
.sp |
| 10183 |
The \fB\-T/\-\-template\fP argument allows specifying pre\-defined styles. |
| 10184 |
Mercurial ships with the machine\-readable styles \fBcbor\fP, \fBjson\fP, |
| 10185 |
and \fBxml\fP, which provide CBOR, JSON, and XML output, respectively. |
| 10186 |
These are useful for producing output that is machine readable as\-is. |
| 10187 |
.sp |
| 10188 |
(Mercurial 5.0 is required for CBOR style.) |
| 10189 |
.IP Important |
| 10190 |
. |
| 10191 |
The \fBjson\fP and \fBxml\fP styles are considered experimental. While |
| 10192 |
they may be attractive to use for easily obtaining machine\-readable |
| 10193 |
output, their behavior may change in subsequent versions. |
| 10194 |
.sp |
| 10195 |
These styles may also exhibit unexpected results when dealing with |
| 10196 |
certain encodings. Mercurial treats things like filenames as a |
| 10197 |
series of bytes and normalizing certain byte sequences to JSON |
| 10198 |
or XML with certain encoding settings can lead to surprises. |
| 10199 |
.RE |
| 10200 |
.SS Command Server Output |
| 10201 |
.sp |
| 10202 |
If using the command server to interact with Mercurial, you are likely |
| 10203 |
using an existing library/API that abstracts implementation details of |
| 10204 |
the command server. If so, this interface layer may perform parsing for |
| 10205 |
you, saving you the work of implementing it yourself. |
| 10206 |
.SS Output Verbosity |
| 10207 |
.sp |
| 10208 |
Commands often have varying output verbosity, even when machine |
| 10209 |
readable styles are being used (e.g. \fB\-T json\fP). Adding |
| 10210 |
\fB\-v/\-\-verbose\fP and \fB\-\-debug\fP to the command\(aqs arguments can |
| 10211 |
increase the amount of data exposed by Mercurial. |
| 10212 |
.sp |
| 10213 |
An alternate way to get the data you need is by explicitly specifying |
| 10214 |
a template. |
| 10215 |
.SS Other Topics |
| 10216 |
.INDENT 0.0 |
| 10217 |
.TP |
| 10218 |
.B revsets |
| 10219 |
. |
| 10220 |
Revisions sets is a functional query language for selecting a set |
| 10221 |
of revisions. Think of it as SQL for Mercurial repositories. Revsets |
| 10222 |
are useful for querying repositories for specific data. |
| 10223 |
.sp |
| 10224 |
See \%\fBhg help revsets\fP\: for more. |
| 10225 |
.TP |
| 10226 |
.B share extension |
| 10227 |
. |
| 10228 |
The \fBshare\fP extension provides functionality for sharing |
| 10229 |
repository data across several working copies. It can even |
| 10230 |
automatically "pool" storage for logically related repositories when |
| 10231 |
cloning. |
| 10232 |
.sp |
| 10233 |
Configuring the \fBshare\fP extension can lead to significant resource |
| 10234 |
utilization reduction, particularly around disk space and the |
| 10235 |
network. This is especially true for continuous integration (CI) |
| 10236 |
environments. |
| 10237 |
.sp |
| 10238 |
See \%\fBhg help \-e share\fP\: for more. |
| 10239 |
.UNINDENT |
| 10240 |
.SH SUBREPOSITORIES |
| 10241 |
.sp |
| 10242 |
Subrepositories let you nest external repositories or projects into a |
| 10243 |
parent Mercurial repository, and make commands operate on them as a |
| 10244 |
group. |
| 10245 |
.sp |
| 10246 |
Mercurial currently supports Mercurial, Git, and Subversion |
| 10247 |
subrepositories. |
| 10248 |
.sp |
| 10249 |
Subrepositories are made of three components: |
| 10250 |
.INDENT 0.0 |
| 10251 |
.IP 1. 3 |
| 10252 |
. |
| 10253 |
Nested repository checkouts. They can appear anywhere in the |
| 10254 |
parent working directory. |
| 10255 |
.IP 2. 3 |
| 10256 |
. |
| 10257 |
Nested repository references. They are defined in \fB.hgsub\fP, which |
| 10258 |
should be placed in the root of working directory, and |
| 10259 |
tell where the subrepository checkouts come from. Mercurial |
| 10260 |
subrepositories are referenced like: |
| 10261 |
.sp |
| 10262 |
.nf |
| 10263 |
.ft C |
| 10264 |
path/to/nested = https://example.com/nested/repo/path |
| 10265 |
.ft P |
| 10266 |
.fi |
| 10267 |
.sp |
| 10268 |
Git and Subversion subrepos are also supported: |
| 10269 |
.sp |
| 10270 |
.nf |
| 10271 |
.ft C |
| 10272 |
path/to/nested = [git]git://example.com/nested/repo/path |
| 10273 |
path/to/nested = [svn]https://example.com/nested/trunk/path |
| 10274 |
.ft P |
| 10275 |
.fi |
| 10276 |
.sp |
| 10277 |
where \fBpath/to/nested\fP is the checkout location relatively to the |
| 10278 |
parent Mercurial root, and \fBhttps://example.com/nested/repo/path\fP |
| 10279 |
is the source repository path. The source can also reference a |
| 10280 |
filesystem path. |
| 10281 |
.sp |
| 10282 |
Note that \fB.hgsub\fP does not exist by default in Mercurial |
| 10283 |
repositories, you have to create and add it to the parent |
| 10284 |
repository before using subrepositories. |
| 10285 |
.IP 3. 3 |
| 10286 |
. |
| 10287 |
Nested repository states. They are defined in \fB.hgsubstate\fP, which |
| 10288 |
is placed in the root of working directory, and |
| 10289 |
capture whatever information is required to restore the |
| 10290 |
subrepositories to the state they were committed in a parent |
| 10291 |
repository changeset. Mercurial automatically record the nested |
| 10292 |
repositories states when committing in the parent repository. |
| 10293 |
.IP Note |
| 10294 |
. |
| 10295 |
The \fB.hgsubstate\fP file should not be edited manually. |
| 10296 |
.RE |
| 10297 |
.UNINDENT |
| 10298 |
.SS Adding a Subrepository |
| 10299 |
.sp |
| 10300 |
If \fB.hgsub\fP does not exist, create it and add it to the parent |
| 10301 |
repository. Clone or checkout the external projects where you want it |
| 10302 |
to live in the parent repository. Edit \fB.hgsub\fP and add the |
| 10303 |
subrepository entry as described above. At this point, the |
| 10304 |
subrepository is tracked and the next commit will record its state in |
| 10305 |
\fB.hgsubstate\fP and bind it to the committed changeset. |
| 10306 |
.SS Synchronizing a Subrepository |
| 10307 |
.sp |
| 10308 |
Subrepos do not automatically track the latest changeset of their |
| 10309 |
sources. Instead, they are updated to the changeset that corresponds |
| 10310 |
with the changeset checked out in the top\-level changeset. This is so |
| 10311 |
developers always get a consistent set of compatible code and |
| 10312 |
libraries when they update. |
| 10313 |
.sp |
| 10314 |
Thus, updating subrepos is a manual process. Simply check out target |
| 10315 |
subrepo at the desired revision, test in the top\-level repo, then |
| 10316 |
commit in the parent repository to record the new combination. |
| 10317 |
.SS Deleting a Subrepository |
| 10318 |
.sp |
| 10319 |
To remove a subrepository from the parent repository, delete its |
| 10320 |
reference from \fB.hgsub\fP, then remove its files. |
| 10321 |
.SS Interaction with Mercurial Commands |
| 10322 |
.INDENT 0.0 |
| 10323 |
.TP |
| 10324 |
.B add |
| 10325 |
. |
| 10326 |
add does not recurse in subrepos unless \-S/\-\-subrepos is |
| 10327 |
specified. However, if you specify the full path of a file in a |
| 10328 |
subrepo, it will be added even without \-S/\-\-subrepos specified. |
| 10329 |
Subversion subrepositories are currently silently |
| 10330 |
ignored. |
| 10331 |
.TP |
| 10332 |
.B addremove |
| 10333 |
. |
| 10334 |
addremove does not recurse into subrepos unless |
| 10335 |
\-S/\-\-subrepos is specified. However, if you specify the full |
| 10336 |
path of a directory in a subrepo, addremove will be performed on |
| 10337 |
it even without \-S/\-\-subrepos being specified. Git and |
| 10338 |
Subversion subrepositories will print a warning and continue. |
| 10339 |
.TP |
| 10340 |
.B archive |
| 10341 |
. |
| 10342 |
archive does not recurse in subrepositories unless |
| 10343 |
\-S/\-\-subrepos is specified. |
| 10344 |
.TP |
| 10345 |
.B cat |
| 10346 |
. |
| 10347 |
Git subrepositories only support exact file matches. |
| 10348 |
Subversion subrepositories are currently ignored. |
| 10349 |
.TP |
| 10350 |
.B commit |
| 10351 |
. |
| 10352 |
commit creates a consistent snapshot of the state of the |
| 10353 |
entire project and its subrepositories. If any subrepositories |
| 10354 |
have been modified, Mercurial will abort. Mercurial can be made |
| 10355 |
to instead commit all modified subrepositories by specifying |
| 10356 |
\-S/\-\-subrepos, or setting "ui.commitsubrepos=True" in a |
| 10357 |
configuration file (see \%\fBhg help config\fP\:). After there are no |
| 10358 |
longer any modified subrepositories, it records their state and |
| 10359 |
finally commits it in the parent repository. The \-\-addremove |
| 10360 |
option also honors the \-S/\-\-subrepos option. However, Git and |
| 10361 |
Subversion subrepositories will print a warning and abort. |
| 10362 |
.TP |
| 10363 |
.B diff |
| 10364 |
. |
| 10365 |
diff does not recurse in subrepos unless \-S/\-\-subrepos is |
| 10366 |
specified. However, if you specify the full path of a file or |
| 10367 |
directory in a subrepo, it will be diffed even without |
| 10368 |
\-S/\-\-subrepos being specified. Subversion subrepositories are |
| 10369 |
currently silently ignored. |
| 10370 |
.TP |
| 10371 |
.B files |
| 10372 |
. |
| 10373 |
files does not recurse into subrepos unless \-S/\-\-subrepos is |
| 10374 |
specified. However, if you specify the full path of a file or |
| 10375 |
directory in a subrepo, it will be displayed even without |
| 10376 |
\-S/\-\-subrepos being specified. Git and Subversion subrepositories |
| 10377 |
are currently silently ignored. |
| 10378 |
.TP |
| 10379 |
.B forget |
| 10380 |
. |
| 10381 |
forget currently only handles exact file matches in subrepos. |
| 10382 |
Git and Subversion subrepositories are currently silently ignored. |
| 10383 |
.TP |
| 10384 |
.B incoming |
| 10385 |
. |
| 10386 |
incoming does not recurse in subrepos unless \-S/\-\-subrepos |
| 10387 |
is specified. Git and Subversion subrepositories are currently |
| 10388 |
silently ignored. |
| 10389 |
.TP |
| 10390 |
.B outgoing |
| 10391 |
. |
| 10392 |
outgoing does not recurse in subrepos unless \-S/\-\-subrepos |
| 10393 |
is specified. Git and Subversion subrepositories are currently |
| 10394 |
silently ignored. |
| 10395 |
.TP |
| 10396 |
.B pull |
| 10397 |
. |
| 10398 |
pull is not recursive since it is not clear what to pull prior |
| 10399 |
to running \%\fBhg update\fP\:. Listing and retrieving all |
| 10400 |
subrepositories changes referenced by the parent repository pulled |
| 10401 |
changesets is expensive at best, impossible in the Subversion |
| 10402 |
case. |
| 10403 |
.TP |
| 10404 |
.B push |
| 10405 |
. |
| 10406 |
Mercurial will automatically push all subrepositories first |
| 10407 |
when the parent repository is being pushed. This ensures new |
| 10408 |
subrepository changes are available when referenced by top\-level |
| 10409 |
repositories. Push is a no\-op for Subversion subrepositories. |
| 10410 |
.TP |
| 10411 |
.B serve |
| 10412 |
. |
| 10413 |
serve does not recurse into subrepositories unless |
| 10414 |
\-S/\-\-subrepos is specified. Git and Subversion subrepositories |
| 10415 |
are currently silently ignored. |
| 10416 |
.TP |
| 10417 |
.B status |
| 10418 |
. |
| 10419 |
status does not recurse into subrepositories unless |
| 10420 |
\-S/\-\-subrepos is specified. Subrepository changes are displayed as |
| 10421 |
regular Mercurial changes on the subrepository |
| 10422 |
elements. Subversion subrepositories are currently silently |
| 10423 |
ignored. |
| 10424 |
.TP |
| 10425 |
.B remove |
| 10426 |
. |
| 10427 |
remove does not recurse into subrepositories unless |
| 10428 |
\-S/\-\-subrepos is specified. However, if you specify a file or |
| 10429 |
directory path in a subrepo, it will be removed even without |
| 10430 |
\-S/\-\-subrepos. Git and Subversion subrepositories are currently |
| 10431 |
silently ignored. |
| 10432 |
.TP |
| 10433 |
.B update |
| 10434 |
. |
| 10435 |
update restores the subrepos in the state they were |
| 10436 |
originally committed in target changeset. If the recorded |
| 10437 |
changeset is not available in the current subrepository, Mercurial |
| 10438 |
will pull it in first before updating. This means that updating |
| 10439 |
can require network access when using subrepositories. |
| 10440 |
.UNINDENT |
| 10441 |
.SS Remapping Subrepositories Sources |
| 10442 |
.sp |
| 10443 |
A subrepository source location may change during a project life, |
| 10444 |
invalidating references stored in the parent repository history. To |
| 10445 |
fix this, rewriting rules can be defined in parent repository \fBhgrc\fP |
| 10446 |
file or in Mercurial configuration. See the \fB[subpaths]\fP section in |
| 10447 |
hgrc(5) for more details. |
| 10448 |
.SH TEMPLATE USAGE |
| 10449 |
.sp |
| 10450 |
Mercurial allows you to customize output of commands through |
| 10451 |
templates. You can either pass in a template or select an existing |
| 10452 |
template\-style from the command line, via the \-\-template option. |
| 10453 |
.sp |
| 10454 |
You can customize output for any "log\-like" command: log, |
| 10455 |
outgoing, incoming, tip, parents, and heads. |
| 10456 |
.sp |
| 10457 |
Some built\-in styles are packaged with Mercurial. These can be listed |
| 10458 |
with \%\fBhg log \-\-template list\fP\:. Example usage: |
| 10459 |
.sp |
| 10460 |
.nf |
| 10461 |
.ft C |
| 10462 |
$ hg log \-r1.0::1.1 \-\-template changelog |
| 10463 |
.ft P |
| 10464 |
.fi |
| 10465 |
.sp |
| 10466 |
A template is a piece of text, with markup to invoke variable |
| 10467 |
expansion: |
| 10468 |
.sp |
| 10469 |
.nf |
| 10470 |
.ft C |
| 10471 |
$ hg log \-r1 \-\-template "{node}\en" |
| 10472 |
b56ce7b07c52de7d5fd79fb89701ea538af65746 |
| 10473 |
.ft P |
| 10474 |
.fi |
| 10475 |
.SS Keywords |
| 10476 |
.sp |
| 10477 |
Strings in curly braces are called keywords. The availability of |
| 10478 |
keywords depends on the exact context of the templater. These |
| 10479 |
keywords are usually available for templating a log\-like command: |
| 10480 |
.INDENT 0.0 |
| 10481 |
.TP |
| 10482 |
.B _fast_rank |
| 10483 |
. |
| 10484 |
the rank of a changeset if cached |
| 10485 |
.sp |
| 10486 |
The rank of a revision is the size of the sub\-graph it defines as a head. |
| 10487 |
Equivalently, the rank of a revision \fIr\fP is the size of the set |
| 10488 |
\fIancestors(r)\fP, \fIr\fP included. |
| 10489 |
.TP |
| 10490 |
.B activebookmark |
| 10491 |
. |
| 10492 |
String. The active bookmark, if it is associated with the changeset. |
| 10493 |
.TP |
| 10494 |
.B author |
| 10495 |
. |
| 10496 |
Alias for \fB{user}\fP |
| 10497 |
.TP |
| 10498 |
.B bisect |
| 10499 |
. |
| 10500 |
String. The changeset bisection status. |
| 10501 |
.TP |
| 10502 |
.B bookmarks |
| 10503 |
. |
| 10504 |
List of strings. Any bookmarks associated with the |
| 10505 |
changeset. Also sets \(aqactive\(aq, the name of the active bookmark. |
| 10506 |
.TP |
| 10507 |
.B branch |
| 10508 |
. |
| 10509 |
String. The name of the branch on which the changeset was |
| 10510 |
committed. |
| 10511 |
.TP |
| 10512 |
.B changessincelatesttag |
| 10513 |
. |
| 10514 |
Integer. All ancestors not in the latest tag. |
| 10515 |
.TP |
| 10516 |
.B children |
| 10517 |
. |
| 10518 |
List of strings. The children of the changeset. |
| 10519 |
.TP |
| 10520 |
.B closesbranch |
| 10521 |
. |
| 10522 |
"yes" if this changeset is branch\-closing, "no" otherwise |
| 10523 |
.TP |
| 10524 |
.B date |
| 10525 |
. |
| 10526 |
Date information. The date when the changeset was committed. |
| 10527 |
.TP |
| 10528 |
.B desc |
| 10529 |
. |
| 10530 |
String. The text of the changeset description. |
| 10531 |
.TP |
| 10532 |
.B diffstat |
| 10533 |
. |
| 10534 |
String. Statistics of changes with the following format: |
| 10535 |
"modified files: +added/\-removed lines" |
| 10536 |
.TP |
| 10537 |
.B extras |
| 10538 |
. |
| 10539 |
List of dicts with key, value entries of the \(aqextras\(aq |
| 10540 |
field of this changeset. |
| 10541 |
.TP |
| 10542 |
.B file_adds |
| 10543 |
. |
| 10544 |
List of strings. Files added by this changeset. |
| 10545 |
.TP |
| 10546 |
.B file_copies |
| 10547 |
. |
| 10548 |
List of strings. Files copied in this changeset with |
| 10549 |
their sources. |
| 10550 |
.TP |
| 10551 |
.B file_copies_switch |
| 10552 |
. |
| 10553 |
List of strings. Like "file_copies" but displayed |
| 10554 |
only if the \-\-copied switch is set. |
| 10555 |
.TP |
| 10556 |
.B file_dels |
| 10557 |
. |
| 10558 |
List of strings. Files removed by this changeset. |
| 10559 |
.TP |
| 10560 |
.B file_mods |
| 10561 |
. |
| 10562 |
List of strings. Files modified by this changeset. |
| 10563 |
.TP |
| 10564 |
.B files |
| 10565 |
. |
| 10566 |
List of strings. All files modified, added, or removed by this |
| 10567 |
changeset. |
| 10568 |
.TP |
| 10569 |
.B graphnode |
| 10570 |
. |
| 10571 |
String. The character representing the changeset node in an ASCII |
| 10572 |
revision graph. |
| 10573 |
.TP |
| 10574 |
.B graphwidth |
| 10575 |
. |
| 10576 |
Integer. The width of the graph drawn by \(aqlog \-\-graph\(aq or zero. |
| 10577 |
.TP |
| 10578 |
.B index |
| 10579 |
. |
| 10580 |
Integer. The current iteration of the loop. (0 indexed) |
| 10581 |
.TP |
| 10582 |
.B latesttag |
| 10583 |
. |
| 10584 |
List of strings. The global tags on the most recent globally |
| 10585 |
tagged ancestor of this changeset. If no such tags exist, the list |
| 10586 |
consists of the single string "null". |
| 10587 |
.TP |
| 10588 |
.B latesttagdistance |
| 10589 |
. |
| 10590 |
Integer. Longest path to the latest tag. |
| 10591 |
.TP |
| 10592 |
.B namespaces |
| 10593 |
. |
| 10594 |
Dict of lists. Names attached to this changeset per |
| 10595 |
namespace. |
| 10596 |
.TP |
| 10597 |
.B negrev |
| 10598 |
. |
| 10599 |
Integer. The repository\-local changeset negative revision number, |
| 10600 |
which counts in the opposite direction. |
| 10601 |
.TP |
| 10602 |
.B node |
| 10603 |
. |
| 10604 |
String. The changeset identification hash, as a 40 hexadecimal |
| 10605 |
digit string. |
| 10606 |
.TP |
| 10607 |
.B onelinesummary |
| 10608 |
. |
| 10609 |
String. A one\-line summary for the ctx (not including trailing newline). |
| 10610 |
The default template be overridden in command\-templates.oneline\-summary. |
| 10611 |
.TP |
| 10612 |
.B p1 |
| 10613 |
. |
| 10614 |
Changeset. The changeset\(aqs first parent. \fB{p1.rev}\fP for the revision |
| 10615 |
number, and \fB{p1.node}\fP for the identification hash. |
| 10616 |
.TP |
| 10617 |
.B p2 |
| 10618 |
. |
| 10619 |
Changeset. The changeset\(aqs second parent. \fB{p2.rev}\fP for the revision |
| 10620 |
number, and \fB{p2.node}\fP for the identification hash. |
| 10621 |
.TP |
| 10622 |
.B parents |
| 10623 |
. |
| 10624 |
List of strings. The parents of the changeset in "rev:node" |
| 10625 |
format. If the changeset has only one "natural" parent (the predecessor |
| 10626 |
revision) nothing is shown. |
| 10627 |
.TP |
| 10628 |
.B peerurls |
| 10629 |
. |
| 10630 |
A dictionary of repository locations defined in the [paths] section |
| 10631 |
of your configuration file. |
| 10632 |
.TP |
| 10633 |
.B phase |
| 10634 |
. |
| 10635 |
String. The changeset phase name. |
| 10636 |
.TP |
| 10637 |
.B reporoot |
| 10638 |
. |
| 10639 |
String. The root directory of the current repository. |
| 10640 |
.TP |
| 10641 |
.B rev |
| 10642 |
. |
| 10643 |
Integer. The repository\-local changeset revision number. |
| 10644 |
.TP |
| 10645 |
.B subrepos |
| 10646 |
. |
| 10647 |
List of strings. Updated subrepositories in the changeset. |
| 10648 |
.TP |
| 10649 |
.B tags |
| 10650 |
. |
| 10651 |
List of strings. Any tags associated with the changeset. |
| 10652 |
.TP |
| 10653 |
.B termwidth |
| 10654 |
. |
| 10655 |
Integer. The width of the current terminal. |
| 10656 |
.TP |
| 10657 |
.B user |
| 10658 |
. |
| 10659 |
String. The unmodified author of the changeset. |
| 10660 |
.TP |
| 10661 |
.B verbosity |
| 10662 |
. |
| 10663 |
String. The current output verbosity in \(aqdebug\(aq, \(aqquiet\(aq, \(aqverbose\(aq, |
| 10664 |
or \(aq\(aq. |
| 10665 |
.UNINDENT |
| 10666 |
.sp |
| 10667 |
The "date" keyword does not produce human\-readable output. If you |
| 10668 |
want to use a date in your output, you can use a filter to process |
| 10669 |
it. Filters are functions which return a string based on the input |
| 10670 |
variable. Be sure to use the stringify filter first when you\(aqre |
| 10671 |
applying a string\-input filter to a list\-like input variable. |
| 10672 |
You can also use a chain of filters to get the desired output: |
| 10673 |
.sp |
| 10674 |
.nf |
| 10675 |
.ft C |
| 10676 |
$ hg tip \-\-template "{date|isodate}\en" |
| 10677 |
2008\-08\-21 18:22 +0000 |
| 10678 |
.ft P |
| 10679 |
.fi |
| 10680 |
.SS Filters |
| 10681 |
.sp |
| 10682 |
List of filters: |
| 10683 |
.INDENT 0.0 |
| 10684 |
.TP |
| 10685 |
.B addbreaks |
| 10686 |
. |
| 10687 |
Any text. Add an XHTML "<br />" tag before the end of |
| 10688 |
every line except the last. |
| 10689 |
.TP |
| 10690 |
.B age |
| 10691 |
. |
| 10692 |
Date. Returns a human\-readable date/time difference between the |
| 10693 |
given date/time and the current date/time. |
| 10694 |
.TP |
| 10695 |
.B basename |
| 10696 |
. |
| 10697 |
Any text. Treats the text as a path, and returns the last |
| 10698 |
component of the path after splitting by the path separator. |
| 10699 |
For example, "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "". |
| 10700 |
.TP |
| 10701 |
.B cbor |
| 10702 |
. |
| 10703 |
Any object. Serializes the object to CBOR bytes. |
| 10704 |
.TP |
| 10705 |
.B commondir |
| 10706 |
. |
| 10707 |
List of text. Treats each list item as file name with / |
| 10708 |
as path separator and returns the longest common directory |
| 10709 |
prefix shared by all list items. |
| 10710 |
Returns the empty string if no common prefix exists. |
| 10711 |
.sp |
| 10712 |
The list items are not normalized, i.e. "foo/../bar" is handled as |
| 10713 |
file "bar" in the directory "foo/..". Leading slashes are ignored. |
| 10714 |
.sp |
| 10715 |
For example, ["foo/bar/baz", "foo/baz/bar"] becomes "foo" and |
| 10716 |
["foo/bar", "baz"] becomes "". |
| 10717 |
.TP |
| 10718 |
.B count |
| 10719 |
. |
| 10720 |
List or text. Returns the length as an integer. |
| 10721 |
.TP |
| 10722 |
.B dirname |
| 10723 |
. |
| 10724 |
Any text. Treats the text as a path, and strips the last |
| 10725 |
component of the path after splitting by the path separator. |
| 10726 |
.TP |
| 10727 |
.B domain |
| 10728 |
. |
| 10729 |
Any text. Finds the first string that looks like an email |
| 10730 |
address, and extracts just the domain component. Example: \fBUser |
| 10731 |
<[email protected]>\fP becomes \fBexample.com\fP. |
| 10732 |
.TP |
| 10733 |
.B email |
| 10734 |
. |
| 10735 |
Any text. Extracts the first string that looks like an email |
| 10736 |
address. Example: \fBUser <[email protected]>\fP becomes |
| 10737 |
\[email protected]\fP. |
| 10738 |
.TP |
| 10739 |
.B emailuser |
| 10740 |
. |
| 10741 |
Any text. Returns the user portion of an email address. |
| 10742 |
.TP |
| 10743 |
.B escape |
| 10744 |
. |
| 10745 |
Any text. Replaces the special XML/XHTML characters "&", "<" |
| 10746 |
and ">" with XML entities, and filters out NUL characters. |
| 10747 |
.TP |
| 10748 |
.B fill68 |
| 10749 |
. |
| 10750 |
Any text. Wraps the text to fit in 68 columns. |
| 10751 |
.TP |
| 10752 |
.B fill76 |
| 10753 |
. |
| 10754 |
Any text. Wraps the text to fit in 76 columns. |
| 10755 |
.TP |
| 10756 |
.B firstline |
| 10757 |
. |
| 10758 |
Any text. Returns the first line of text. |
| 10759 |
.TP |
| 10760 |
.B hex |
| 10761 |
. |
| 10762 |
Any text. Convert a binary Mercurial node identifier into |
| 10763 |
its long hexadecimal representation. |
| 10764 |
.TP |
| 10765 |
.B hgdate |
| 10766 |
. |
| 10767 |
Date. Returns the date as a pair of numbers: "1157407993 |
| 10768 |
25200" (Unix timestamp, timezone offset). |
| 10769 |
.TP |
| 10770 |
.B isodate |
| 10771 |
. |
| 10772 |
Date. Returns the date in ISO 8601 format: "2009\-08\-18 13:00 |
| 10773 |
+0200". |
| 10774 |
.TP |
| 10775 |
.B isodatesec |
| 10776 |
. |
| 10777 |
Date. Returns the date in ISO 8601 format, including |
| 10778 |
seconds: "2009\-08\-18 13:00:13 +0200". See also the rfc3339date |
| 10779 |
filter. |
| 10780 |
.TP |
| 10781 |
.B json |
| 10782 |
. |
| 10783 |
Any object. Serializes the object to a JSON formatted text. |
| 10784 |
.TP |
| 10785 |
.B lower |
| 10786 |
. |
| 10787 |
Any text. Converts the text to lowercase. |
| 10788 |
.TP |
| 10789 |
.B nonempty |
| 10790 |
. |
| 10791 |
Any text. Returns \(aq(none)\(aq if the string is empty. |
| 10792 |
.TP |
| 10793 |
.B obfuscate |
| 10794 |
. |
| 10795 |
Any text. Returns the input text rendered as a sequence of |
| 10796 |
XML entities. |
| 10797 |
.TP |
| 10798 |
.B person |
| 10799 |
. |
| 10800 |
Any text. Returns the name before an email address, |
| 10801 |
interpreting it as per RFC 5322. |
| 10802 |
.TP |
| 10803 |
.B reverse |
| 10804 |
. |
| 10805 |
List. Reverses the order of list items. |
| 10806 |
.TP |
| 10807 |
.B revescape |
| 10808 |
. |
| 10809 |
Any text. Escapes all "special" characters, except @. |
| 10810 |
Forward slashes are escaped twice to prevent web servers from prematurely |
| 10811 |
unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz". |
| 10812 |
.TP |
| 10813 |
.B rfc3339date |
| 10814 |
. |
| 10815 |
Date. Returns a date using the Internet date format |
| 10816 |
specified in RFC 3339: "2009\-08\-18T13:00:13+02:00". |
| 10817 |
.TP |
| 10818 |
.B rfc822date |
| 10819 |
. |
| 10820 |
Date. Returns a date using the same format used in email |
| 10821 |
headers: "Tue, 18 Aug 2009 13:00:13 +0200". |
| 10822 |
.TP |
| 10823 |
.B short |
| 10824 |
. |
| 10825 |
Changeset hash. Returns the short form of a changeset hash, |
| 10826 |
i.e. a 12 hexadecimal digit string. |
| 10827 |
.TP |
| 10828 |
.B shortbisect |
| 10829 |
. |
| 10830 |
Any text. Treats \fIlabel\fP as a bisection status, and |
| 10831 |
returns a single\-character representing the status (G: good, B: bad, |
| 10832 |
S: skipped, U: untested, I: ignored). Returns single space if \fItext\fP |
| 10833 |
is not a valid bisection status. |
| 10834 |
.TP |
| 10835 |
.B shortdate |
| 10836 |
. |
| 10837 |
Date. Returns a date like "2006\-09\-18". |
| 10838 |
.TP |
| 10839 |
.B slashpath |
| 10840 |
. |
| 10841 |
Any text. Replaces the native path separator with slash. |
| 10842 |
.TP |
| 10843 |
.B splitlines |
| 10844 |
. |
| 10845 |
Any text. Split text into a list of lines. |
| 10846 |
.TP |
| 10847 |
.B stringify |
| 10848 |
. |
| 10849 |
Any type. Turns the value into text by converting values into |
| 10850 |
text and concatenating them. |
| 10851 |
.TP |
| 10852 |
.B stripdir |
| 10853 |
. |
| 10854 |
Treat the text as path and strip a directory level, if |
| 10855 |
possible. For example, "foo" and "foo/bar" becomes "foo". |
| 10856 |
.TP |
| 10857 |
.B tabindent |
| 10858 |
. |
| 10859 |
Any text. Returns the text, with every non\-empty line |
| 10860 |
except the first starting with a tab character. |
| 10861 |
.TP |
| 10862 |
.B upper |
| 10863 |
. |
| 10864 |
Any text. Converts the text to uppercase. |
| 10865 |
.TP |
| 10866 |
.B urlescape |
| 10867 |
. |
| 10868 |
Any text. Escapes all "special" characters. For example, |
| 10869 |
"foo bar" becomes "foo%20bar". |
| 10870 |
.TP |
| 10871 |
.B user |
| 10872 |
. |
| 10873 |
Any text. Returns a short representation of a user name or email |
| 10874 |
address. |
| 10875 |
.TP |
| 10876 |
.B utf8 |
| 10877 |
. |
| 10878 |
Any text. Converts from the local character encoding to UTF\-8. |
| 10879 |
.UNINDENT |
| 10880 |
.sp |
| 10881 |
Note that a filter is nothing more than a function call, i.e. |
| 10882 |
\fBexpr|filter\fP is equivalent to \fBfilter(expr)\fP. |
| 10883 |
.SS Functions |
| 10884 |
.sp |
| 10885 |
In addition to filters, there are some basic built\-in functions: |
| 10886 |
.INDENT 0.0 |
| 10887 |
.TP |
| 10888 |
.B config(section, name[, default]) |
| 10889 |
. |
| 10890 |
Returns the requested hgrc config option as a string. |
| 10891 |
.TP |
| 10892 |
.B configbool(section, name[, default]) |
| 10893 |
. |
| 10894 |
Returns the requested hgrc config option as a boolean. |
| 10895 |
.TP |
| 10896 |
.B configint(section, name[, default]) |
| 10897 |
. |
| 10898 |
Returns the requested hgrc config option as an integer. |
| 10899 |
.TP |
| 10900 |
.B date(date[, fmt]) |
| 10901 |
. |
| 10902 |
Format a date. The format string uses the Python strftime format. |
| 10903 |
The default is a Unix date format, including the timezone: |
| 10904 |
"Mon Sep 04 15:13:13 2006 0700". |
| 10905 |
.TP |
| 10906 |
.B dict([[key=]value...]) |
| 10907 |
. |
| 10908 |
Construct a dict from key\-value pairs. A key may be omitted if |
| 10909 |
a value expression can provide an unambiguous name. |
| 10910 |
.TP |
| 10911 |
.B diff([includepattern [, excludepattern]]) |
| 10912 |
. |
| 10913 |
Show a diff, optionally |
| 10914 |
specifying files to include or exclude. |
| 10915 |
.TP |
| 10916 |
.B files(pattern) |
| 10917 |
. |
| 10918 |
All files of the current changeset matching the pattern. See |
| 10919 |
\%\fBhg help patterns\fP\:. |
| 10920 |
.TP |
| 10921 |
.B fill(text[, width[, initialident[, hangindent]]]) |
| 10922 |
. |
| 10923 |
Fill many |
| 10924 |
paragraphs with optional indentation. See the "fill" filter. |
| 10925 |
.TP |
| 10926 |
.B filter(iterable[, expr]) |
| 10927 |
. |
| 10928 |
Remove empty elements from a list or a dict. If expr specified, it\(aqs |
| 10929 |
applied to each element to test emptiness. |
| 10930 |
.TP |
| 10931 |
.B get(dict, key) |
| 10932 |
. |
| 10933 |
Get an attribute/key from an object. Some keywords |
| 10934 |
are complex types. This function allows you to obtain the value of an |
| 10935 |
attribute on these types. |
| 10936 |
.TP |
| 10937 |
.B if(expr, then[, else]) |
| 10938 |
. |
| 10939 |
Conditionally execute based on the result of |
| 10940 |
an expression. |
| 10941 |
.TP |
| 10942 |
.B ifcontains(needle, haystack, then[, else]) |
| 10943 |
. |
| 10944 |
Conditionally execute based |
| 10945 |
on whether the item "needle" is in "haystack". |
| 10946 |
.TP |
| 10947 |
.B ifeq(expr1, expr2, then[, else]) |
| 10948 |
. |
| 10949 |
Conditionally execute based on |
| 10950 |
whether 2 items are equivalent. |
| 10951 |
.TP |
| 10952 |
.B indent(text, indentchars[, firstline]) |
| 10953 |
. |
| 10954 |
Indents all non\-empty lines |
| 10955 |
with the characters given in the indentchars string. An optional |
| 10956 |
third parameter will override the indent for the first line only |
| 10957 |
if present. |
| 10958 |
.TP |
| 10959 |
.B join(list, sep) |
| 10960 |
. |
| 10961 |
Join items in a list with a delimiter. |
| 10962 |
.TP |
| 10963 |
.B label(label, expr) |
| 10964 |
. |
| 10965 |
Apply a label to generated content. Content with a label |
| 10966 |
applied can result in additional post\-processing, such as |
| 10967 |
automatic colorization. In order to receive effects, labels must |
| 10968 |
have a dot, such as \fIlog.secret\fP or \fIbranch.active\fP. |
| 10969 |
.TP |
| 10970 |
.B latesttag([pattern]) |
| 10971 |
. |
| 10972 |
The global tags matching the given pattern on the |
| 10973 |
most recent globally tagged ancestor of this changeset. |
| 10974 |
If no such tags exist, the "{tag}" template resolves to |
| 10975 |
the string "null". See \%\fBhg help revisions.patterns\fP\: for the pattern |
| 10976 |
syntax. |
| 10977 |
.TP |
| 10978 |
.B localdate(date[, tz]) |
| 10979 |
. |
| 10980 |
Converts a date to the specified timezone. |
| 10981 |
The default is local date. |
| 10982 |
.TP |
| 10983 |
.B mailmap(author) |
| 10984 |
. |
| 10985 |
Return the author, updated according to the value |
| 10986 |
set in the .mailmap file |
| 10987 |
.TP |
| 10988 |
.B max(iterable) |
| 10989 |
. |
| 10990 |
Return the max of an iterable |
| 10991 |
.TP |
| 10992 |
.B min(iterable) |
| 10993 |
. |
| 10994 |
Return the min of an iterable |
| 10995 |
.TP |
| 10996 |
.B mod(a, b) |
| 10997 |
. |
| 10998 |
Calculate a mod b such that a / b + a mod b == a |
| 10999 |
.TP |
| 11000 |
.B pad(text, width[, fillchar=\(aq \(aq[, left=False[, truncate=False]]]) |
| 11001 |
. |
| 11002 |
Pad text with a |
| 11003 |
fill character. |
| 11004 |
.TP |
| 11005 |
.B relpath(path) |
| 11006 |
. |
| 11007 |
Convert a repository\-absolute path into a filesystem path relative to |
| 11008 |
the current working directory. |
| 11009 |
.TP |
| 11010 |
.B revset(query[, formatargs...]) |
| 11011 |
. |
| 11012 |
Execute a revision set query. See |
| 11013 |
\%\fBhg help revset\fP\:. |
| 11014 |
.TP |
| 11015 |
.B rstdoc(text, style) |
| 11016 |
. |
| 11017 |
Format reStructuredText. |
| 11018 |
.TP |
| 11019 |
.B search(pattern, text) |
| 11020 |
. |
| 11021 |
Look for the first text matching the regular expression pattern. |
| 11022 |
Groups are accessible as \fB{1}\fP, \fB{2}\fP, ... in %\-mapped template. |
| 11023 |
.TP |
| 11024 |
.B separate(sep, args...) |
| 11025 |
. |
| 11026 |
Add a separator between non\-empty arguments. |
| 11027 |
.TP |
| 11028 |
.B shortest(node, minlength=4) |
| 11029 |
. |
| 11030 |
Obtain the shortest representation of |
| 11031 |
a node. |
| 11032 |
.TP |
| 11033 |
.B startswith(pattern, text) |
| 11034 |
. |
| 11035 |
Returns the value from the "text" argument |
| 11036 |
if it begins with the content from the "pattern" argument. |
| 11037 |
.TP |
| 11038 |
.B strip(text[, chars]) |
| 11039 |
. |
| 11040 |
Strip characters from a string. By default, |
| 11041 |
strips all leading and trailing whitespace. |
| 11042 |
.TP |
| 11043 |
.B sub(pattern, replacement, expression) |
| 11044 |
. |
| 11045 |
Perform text substitution |
| 11046 |
using regular expressions. |
| 11047 |
.TP |
| 11048 |
.B subsetparents(rev, revset) |
| 11049 |
. |
| 11050 |
Look up parents of the rev in the sub graph given by the revset. |
| 11051 |
.TP |
| 11052 |
.B word(number, text[, separator]) |
| 11053 |
. |
| 11054 |
Return the nth word from a string. |
| 11055 |
.UNINDENT |
| 11056 |
.SS Operators |
| 11057 |
.sp |
| 11058 |
We provide a limited set of infix arithmetic operations on integers: |
| 11059 |
.sp |
| 11060 |
.nf |
| 11061 |
.ft C |
| 11062 |
+ for addition |
| 11063 |
\- for subtraction |
| 11064 |
* for multiplication |
| 11065 |
/ for floor division (division rounded to integer nearest \-infinity) |
| 11066 |
.ft P |
| 11067 |
.fi |
| 11068 |
.sp |
| 11069 |
Division fulfills the law x = x / y + mod(x, y). |
| 11070 |
.sp |
| 11071 |
Also, for any expression that returns a list, there is a list operator: |
| 11072 |
.sp |
| 11073 |
.nf |
| 11074 |
.ft C |
| 11075 |
expr % "{template}" |
| 11076 |
.ft P |
| 11077 |
.fi |
| 11078 |
.sp |
| 11079 |
As seen in the above example, \fB{template}\fP is interpreted as a template. |
| 11080 |
To prevent it from being interpreted, you can use an escape character \fB\e{\fP |
| 11081 |
or a raw string prefix, \fBr\(aq...\(aq\fP. |
| 11082 |
.sp |
| 11083 |
The dot operator can be used as a shorthand for accessing a sub item: |
| 11084 |
.INDENT 0.0 |
| 11085 |
.IP \(bu 2 |
| 11086 |
. |
| 11087 |
\fBexpr.member\fP is roughly equivalent to \fBexpr % \(aq{member}\(aq\fP if \fBexpr\fP |
| 11088 |
returns a non\-list/dict. The returned value is not stringified. |
| 11089 |
.IP \(bu 2 |
| 11090 |
. |
| 11091 |
\fBdict.key\fP is identical to \fBget(dict, \(aqkey\(aq)\fP. |
| 11092 |
.UNINDENT |
| 11093 |
.SS Aliases |
| 11094 |
.sp |
| 11095 |
New keywords and functions can be defined in the \fBtemplatealias\fP section of |
| 11096 |
a Mercurial configuration file: |
| 11097 |
.sp |
| 11098 |
.nf |
| 11099 |
.ft C |
| 11100 |
<alias> = <definition> |
| 11101 |
.ft P |
| 11102 |
.fi |
| 11103 |
.sp |
| 11104 |
Arguments of the form \fIa1\fP, \fIa2\fP, etc. are substituted from the alias into |
| 11105 |
the definition. |
| 11106 |
.sp |
| 11107 |
For example, |
| 11108 |
.sp |
| 11109 |
.nf |
| 11110 |
.ft C |
| 11111 |
[templatealias] |
| 11112 |
r = rev |
| 11113 |
rn = "{r}:{node|short}" |
| 11114 |
leftpad(s, w) = pad(s, w, \(aq \(aq, True) |
| 11115 |
.ft P |
| 11116 |
.fi |
| 11117 |
.sp |
| 11118 |
defines two symbol aliases, \fBr\fP and \fBrn\fP, and a function alias |
| 11119 |
\fBleftpad()\fP. |
| 11120 |
.sp |
| 11121 |
It\(aqs also possible to specify complete template strings, using the |
| 11122 |
\fBtemplates\fP section. The syntax used is the general template string syntax. |
| 11123 |
.sp |
| 11124 |
For example, |
| 11125 |
.sp |
| 11126 |
.nf |
| 11127 |
.ft C |
| 11128 |
[templates] |
| 11129 |
nodedate = "{node|short}: {date(date, "%Y\-%m\-%d")}\en" |
| 11130 |
.ft P |
| 11131 |
.fi |
| 11132 |
.sp |
| 11133 |
defines a template, \fBnodedate\fP, which can be called like: |
| 11134 |
.sp |
| 11135 |
.nf |
| 11136 |
.ft C |
| 11137 |
$ hg log \-r . \-Tnodedate |
| 11138 |
.ft P |
| 11139 |
.fi |
| 11140 |
.sp |
| 11141 |
A template defined in \fBtemplates\fP section can also be referenced from |
| 11142 |
another template: |
| 11143 |
.sp |
| 11144 |
.nf |
| 11145 |
.ft C |
| 11146 |
$ hg log \-r . \-T "{rev} {nodedate}" |
| 11147 |
.ft P |
| 11148 |
.fi |
| 11149 |
.sp |
| 11150 |
but be aware that the keywords cannot be overridden by templates. For example, |
| 11151 |
a template defined as \fBtemplates.rev\fP cannot be referenced as \fB{rev}\fP. |
| 11152 |
.sp |
| 11153 |
A template defined in \fBtemplates\fP section may have sub templates which |
| 11154 |
are inserted before/after/between items: |
| 11155 |
.sp |
| 11156 |
.nf |
| 11157 |
.ft C |
| 11158 |
[templates] |
| 11159 |
myjson = \(aq {dict(rev, node|short)|json}\(aq |
| 11160 |
myjson:docheader = \(aq\e{\en\(aq |
| 11161 |
myjson:docfooter = \(aq\en}\en\(aq |
| 11162 |
myjson:separator = \(aq,\en\(aq |
| 11163 |
.ft P |
| 11164 |
.fi |
| 11165 |
.SS Examples |
| 11166 |
.sp |
| 11167 |
Some sample command line templates: |
| 11168 |
.INDENT 0.0 |
| 11169 |
.IP \(bu 2 |
| 11170 |
. |
| 11171 |
Format lists, e.g. files: |
| 11172 |
.sp |
| 11173 |
.nf |
| 11174 |
.ft C |
| 11175 |
$ hg log \-r 0 \-\-template "files:\en{files % \(aq {file}\en\(aq}" |
| 11176 |
.ft P |
| 11177 |
.fi |
| 11178 |
.IP \(bu 2 |
| 11179 |
. |
| 11180 |
Join the list of files with a ", ": |
| 11181 |
.sp |
| 11182 |
.nf |
| 11183 |
.ft C |
| 11184 |
$ hg log \-r 0 \-\-template "files: {join(files, \(aq, \(aq)}\en" |
| 11185 |
.ft P |
| 11186 |
.fi |
| 11187 |
.IP \(bu 2 |
| 11188 |
. |
| 11189 |
Join the list of files ending with ".py" with a ", ": |
| 11190 |
.sp |
| 11191 |
.nf |
| 11192 |
.ft C |
| 11193 |
$ hg log \-r 0 \-\-template "pythonfiles: {join(files(\(aq**.py\(aq), \(aq, \(aq)}\en" |
| 11194 |
.ft P |
| 11195 |
.fi |
| 11196 |
.IP \(bu 2 |
| 11197 |
. |
| 11198 |
Separate non\-empty arguments by a " ": |
| 11199 |
.sp |
| 11200 |
.nf |
| 11201 |
.ft C |
| 11202 |
$ hg log \-r 0 \-\-template "{separate(\(aq \(aq, node, bookmarks, tags}\en" |
| 11203 |
.ft P |
| 11204 |
.fi |
| 11205 |
.IP \(bu 2 |
| 11206 |
. |
| 11207 |
Modify each line of a commit description: |
| 11208 |
.sp |
| 11209 |
.nf |
| 11210 |
.ft C |
| 11211 |
$ hg log \-\-template "{splitlines(desc) % \(aq**** {line}\en\(aq}" |
| 11212 |
.ft P |
| 11213 |
.fi |
| 11214 |
.IP \(bu 2 |
| 11215 |
. |
| 11216 |
Format date: |
| 11217 |
.sp |
| 11218 |
.nf |
| 11219 |
.ft C |
| 11220 |
$ hg log \-r 0 \-\-template "{date(date, \(aq%Y\(aq)}\en" |
| 11221 |
.ft P |
| 11222 |
.fi |
| 11223 |
.IP \(bu 2 |
| 11224 |
. |
| 11225 |
Display date in UTC: |
| 11226 |
.sp |
| 11227 |
.nf |
| 11228 |
.ft C |
| 11229 |
$ hg log \-r 0 \-\-template "{localdate(date, \(aqUTC\(aq)|date}\en" |
| 11230 |
.ft P |
| 11231 |
.fi |
| 11232 |
.IP \(bu 2 |
| 11233 |
. |
| 11234 |
Output the description set to a fill\-width of 30: |
| 11235 |
.sp |
| 11236 |
.nf |
| 11237 |
.ft C |
| 11238 |
$ hg log \-r 0 \-\-template "{fill(desc, 30)}" |
| 11239 |
.ft P |
| 11240 |
.fi |
| 11241 |
.IP \(bu 2 |
| 11242 |
. |
| 11243 |
Use a conditional to test for the default branch: |
| 11244 |
.sp |
| 11245 |
.nf |
| 11246 |
.ft C |
| 11247 |
$ hg log \-r 0 \-\-template "{ifeq(branch, \(aqdefault\(aq, \(aqon the main branch\(aq, |
| 11248 |
\(aqon branch {branch}\(aq)}\en" |
| 11249 |
.ft P |
| 11250 |
.fi |
| 11251 |
.IP \(bu 2 |
| 11252 |
. |
| 11253 |
Append a newline if not empty: |
| 11254 |
.sp |
| 11255 |
.nf |
| 11256 |
.ft C |
| 11257 |
$ hg tip \-\-template "{if(author, \(aq{author}\en\(aq)}" |
| 11258 |
.ft P |
| 11259 |
.fi |
| 11260 |
.IP \(bu 2 |
| 11261 |
. |
| 11262 |
Label the output for use with the color extension: |
| 11263 |
.sp |
| 11264 |
.nf |
| 11265 |
.ft C |
| 11266 |
$ hg log \-r 0 \-\-template "{label(\(aqchangeset.{phase}\(aq, node|short)}\en" |
| 11267 |
.ft P |
| 11268 |
.fi |
| 11269 |
.IP \(bu 2 |
| 11270 |
. |
| 11271 |
Invert the firstline filter, i.e. everything but the first line: |
| 11272 |
.sp |
| 11273 |
.nf |
| 11274 |
.ft C |
| 11275 |
$ hg log \-r 0 \-\-template "{sub(r\(aq^.*\en?\en?\(aq, \(aq\(aq, desc)}\en" |
| 11276 |
.ft P |
| 11277 |
.fi |
| 11278 |
.IP \(bu 2 |
| 11279 |
. |
| 11280 |
Display the contents of the \(aqextra\(aq field, one per line: |
| 11281 |
.sp |
| 11282 |
.nf |
| 11283 |
.ft C |
| 11284 |
$ hg log \-r 0 \-\-template "{join(extras, \(aq\en\(aq)}\en" |
| 11285 |
.ft P |
| 11286 |
.fi |
| 11287 |
.IP \(bu 2 |
| 11288 |
. |
| 11289 |
Mark the active bookmark with \(aq*\(aq: |
| 11290 |
.sp |
| 11291 |
.nf |
| 11292 |
.ft C |
| 11293 |
$ hg log \-\-template "{bookmarks % \(aq{bookmark}{ifeq(bookmark, active, \(aq*\(aq)} \(aq}\en" |
| 11294 |
.ft P |
| 11295 |
.fi |
| 11296 |
.IP \(bu 2 |
| 11297 |
. |
| 11298 |
Find the previous release candidate tag, the distance and changes since the tag: |
| 11299 |
.sp |
| 11300 |
.nf |
| 11301 |
.ft C |
| 11302 |
$ hg log \-r . \-\-template "{latesttag(\(aqre:^.*\-rc$\(aq) % \(aq{tag}, {changes}, {distance}\(aq}\en" |
| 11303 |
.ft P |
| 11304 |
.fi |
| 11305 |
.IP \(bu 2 |
| 11306 |
. |
| 11307 |
Mark the working copy parent with \(aq@\(aq: |
| 11308 |
.sp |
| 11309 |
.nf |
| 11310 |
.ft C |
| 11311 |
$ hg log \-\-template "{ifcontains(rev, revset(\(aq.\(aq), \(aq@\(aq)}\en" |
| 11312 |
.ft P |
| 11313 |
.fi |
| 11314 |
.IP \(bu 2 |
| 11315 |
. |
| 11316 |
Show details of parent revisions: |
| 11317 |
.sp |
| 11318 |
.nf |
| 11319 |
.ft C |
| 11320 |
$ hg log \-\-template "{revset(\(aqparents(%d)\(aq, rev) % \(aq{desc|firstline}\en\(aq}" |
| 11321 |
.ft P |
| 11322 |
.fi |
| 11323 |
.IP \(bu 2 |
| 11324 |
. |
| 11325 |
Show only commit descriptions that start with "template": |
| 11326 |
.sp |
| 11327 |
.nf |
| 11328 |
.ft C |
| 11329 |
$ hg log \-\-template "{startswith(\(aqtemplate\(aq, firstline(desc))}\en" |
| 11330 |
.ft P |
| 11331 |
.fi |
| 11332 |
.IP \(bu 2 |
| 11333 |
. |
| 11334 |
Print the first word of each line of a commit message: |
| 11335 |
.sp |
| 11336 |
.nf |
| 11337 |
.ft C |
| 11338 |
$ hg log \-\-template "{word(0, desc)}\en" |
| 11339 |
.ft P |
| 11340 |
.fi |
| 11341 |
.UNINDENT |
| 11342 |
.SH URL PATHS |
| 11343 |
.sp |
| 11344 |
Valid URLs are of the form: |
| 11345 |
.sp |
| 11346 |
.nf |
| 11347 |
.ft C |
| 11348 |
local/filesystem/path[#revision] |
| 11349 |
file://local/filesystem/path[#revision] |
| 11350 |
http://[user[:pass]@]host[:port]/[path][#revision] |
| 11351 |
https://[user[:pass]@]host[:port]/[path][#revision] |
| 11352 |
ssh://[user@]host[:port]/[path][#revision] |
| 11353 |
path://pathname |
| 11354 |
.ft P |
| 11355 |
.fi |
| 11356 |
.sp |
| 11357 |
Paths in the local filesystem can either point to Mercurial |
| 11358 |
repositories or to bundle files (as created by \%\fBhg bundle\fP\: or |
| 11359 |
\%\fBhg incoming \-\-bundle\fP\:). See also \%\fBhg help paths\fP\:. |
| 11360 |
.sp |
| 11361 |
An optional identifier after # indicates a particular branch, tag, or |
| 11362 |
changeset to use from the remote repository. See also \%\fBhg help |
| 11363 |
revisions\fP\:. |
| 11364 |
.sp |
| 11365 |
Some features, such as pushing to \%http://\: and \%https://\: URLs are only |
| 11366 |
possible if the feature is explicitly enabled on the remote Mercurial |
| 11367 |
server. |
| 11368 |
.sp |
| 11369 |
Note that the security of HTTPS URLs depends on proper configuration of |
| 11370 |
web.cacerts. |
| 11371 |
.sp |
| 11372 |
Some notes about using SSH with Mercurial: |
| 11373 |
.INDENT 0.0 |
| 11374 |
.IP \(bu 2 |
| 11375 |
. |
| 11376 |
SSH requires an accessible shell account on the destination machine |
| 11377 |
and a copy of hg in the remote path or specified with remotecmd. |
| 11378 |
.IP \(bu 2 |
| 11379 |
. |
| 11380 |
path is relative to the remote user\(aqs home directory by default. Use |
| 11381 |
an extra slash at the start of a path to specify an absolute path: |
| 11382 |
.sp |
| 11383 |
.nf |
| 11384 |
.ft C |
| 11385 |
ssh://example.com//tmp/repository |
| 11386 |
.ft P |
| 11387 |
.fi |
| 11388 |
.IP \(bu 2 |
| 11389 |
. |
| 11390 |
Mercurial doesn\(aqt use its own compression via SSH; the right thing |
| 11391 |
to do is to configure it in your ~/.ssh/config, e.g.: |
| 11392 |
.sp |
| 11393 |
.nf |
| 11394 |
.ft C |
| 11395 |
Host *.mylocalnetwork.example.com |
| 11396 |
Compression no |
| 11397 |
Host * |
| 11398 |
Compression yes |
| 11399 |
.ft P |
| 11400 |
.fi |
| 11401 |
.sp |
| 11402 |
Alternatively specify "ssh \-C" as your ssh command in your |
| 11403 |
configuration file or with the \-\-ssh command line option. |
| 11404 |
.UNINDENT |
| 11405 |
.sp |
| 11406 |
These URLs can all be stored in your configuration file with path |
| 11407 |
aliases under the [paths] section like so: |
| 11408 |
.sp |
| 11409 |
.nf |
| 11410 |
.ft C |
| 11411 |
[paths] |
| 11412 |
alias1 = URL1 |
| 11413 |
alias2 = URL2 |
| 11414 |
\&... |
| 11415 |
.ft P |
| 11416 |
.fi |
| 11417 |
.sp |
| 11418 |
You can then use the alias for any command that uses a URL (for |
| 11419 |
example \%\fBhg pull alias1\fP\: will be treated as \%\fBhg pull URL1\fP\:). |
| 11420 |
.sp |
| 11421 |
Two path aliases are special because they are used as defaults when |
| 11422 |
you do not provide the URL to a command: |
| 11423 |
.INDENT 0.0 |
| 11424 |
.TP |
| 11425 |
.B default: |
| 11426 |
. |
| 11427 |
When you create a repository with hg clone, the clone command saves |
| 11428 |
the location of the source repository as the new repository\(aqs |
| 11429 |
\(aqdefault\(aq path. This is then used when you omit path from push\- and |
| 11430 |
pull\-like commands (including incoming and outgoing). |
| 11431 |
.TP |
| 11432 |
.B default\-push: |
| 11433 |
. |
| 11434 |
The push command will look for a path named \(aqdefault\-push\(aq, and |
| 11435 |
prefer it over \(aqdefault\(aq if both are defined. |
| 11436 |
.UNINDENT |
| 11437 |
.sp |
| 11438 |
These alias can also be use in the \fIpath://\fP scheme: |
| 11439 |
.sp |
| 11440 |
.nf |
| 11441 |
.ft C |
| 11442 |
[paths] |
| 11443 |
alias1 = URL1 |
| 11444 |
alias2 = path://alias1 |
| 11445 |
\&... |
| 11446 |
.ft P |
| 11447 |
.fi |
| 11448 |
.sp |
| 11449 |
check \%\fBhg help config.paths\fP\: for details about the behavior of such "sub\-path". |
| 11450 |
.SH EXTENSIONS |
| 11451 |
.sp |
| 11452 |
This section contains help for extensions that are distributed together with Mercurial. Help for other extensions is available in the help system. |
| 11453 |
.SS absorb |
| 11454 |
.sp |
| 11455 |
apply working directory changes to changesets (EXPERIMENTAL) |
| 11456 |
.sp |
| 11457 |
The absorb extension provides a command to use annotate information to |
| 11458 |
amend modified chunks into the corresponding non\-public changesets. |
| 11459 |
.sp |
| 11460 |
.nf |
| 11461 |
.ft C |
| 11462 |
[absorb] |
| 11463 |
# only check 50 recent non\-public changesets at most |
| 11464 |
max\-stack\-size = 50 |
| 11465 |
# whether to add noise to new commits to avoid obsolescence cycle |
| 11466 |
add\-noise = 1 |
| 11467 |
# make \(gaamend \-\-correlated\(ga a shortcut to the main command |
| 11468 |
amend\-flag = correlated |
| 11469 |
|
| 11470 |
[color] |
| 11471 |
absorb.description = yellow |
| 11472 |
absorb.node = blue bold |
| 11473 |
absorb.path = bold |
| 11474 |
.ft P |
| 11475 |
.fi |
| 11476 |
.SS Commands |
| 11477 |
.SS Change creation |
| 11478 |
.SS absorb |
| 11479 |
.sp |
| 11480 |
incorporate corrections into the stack of draft changesets: |
| 11481 |
.sp |
| 11482 |
.nf |
| 11483 |
.ft C |
| 11484 |
hg absorb [OPTION] [FILE]... |
| 11485 |
.ft P |
| 11486 |
.fi |
| 11487 |
.sp |
| 11488 |
absorb analyzes each change in your working directory and attempts to |
| 11489 |
amend the changed lines into the changesets in your stack that first |
| 11490 |
introduced those lines. |
| 11491 |
.sp |
| 11492 |
If absorb cannot find an unambiguous changeset to amend for a change, |
| 11493 |
that change will be left in the working directory, untouched. They can be |
| 11494 |
observed by \%\fBhg status\fP\: or \%\fBhg diff\fP\: afterwards. In other words, |
| 11495 |
absorb does not write to the working directory. |
| 11496 |
.sp |
| 11497 |
Changesets outside the revset \fI::. and not public() and not merge()\fP will |
| 11498 |
not be changed. |
| 11499 |
.sp |
| 11500 |
Changesets that become empty after applying the changes will be deleted. |
| 11501 |
.sp |
| 11502 |
By default, absorb will show what it plans to do and prompt for |
| 11503 |
confirmation. If you are confident that the changes will be absorbed |
| 11504 |
to the correct place, run \%\fBhg absorb \-a\fP\: to apply the changes |
| 11505 |
immediately. |
| 11506 |
.sp |
| 11507 |
Returns 0 on success, 1 if all chunks were ignored and nothing amended. |
| 11508 |
.sp |
| 11509 |
Options: |
| 11510 |
.INDENT 0.0 |
| 11511 |
.TP |
| 11512 |
.B \-a, \-\-apply\-changes |
| 11513 |
. |
| 11514 |
apply changes without prompting for confirmation |
| 11515 |
.TP |
| 11516 |
.B \-p, \-\-print\-changes |
| 11517 |
. |
| 11518 |
always print which changesets are modified by which changes |
| 11519 |
.TP |
| 11520 |
.B \-i, \-\-interactive |
| 11521 |
. |
| 11522 |
interactively select which chunks to apply |
| 11523 |
.TP |
| 11524 |
.B \-e, \-\-edit\-lines |
| 11525 |
. |
| 11526 |
edit what lines belong to which changesets before commit (EXPERIMENTAL) |
| 11527 |
.TP |
| 11528 |
.B \-n, \-\-dry\-run |
| 11529 |
. |
| 11530 |
do not perform actions, just print output |
| 11531 |
.TP |
| 11532 |
.BI \-\-style \ <STYLE> |
| 11533 |
. |
| 11534 |
display using template map file (DEPRECATED) |
| 11535 |
.TP |
| 11536 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 11537 |
. |
| 11538 |
display with template |
| 11539 |
.TP |
| 11540 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 11541 |
. |
| 11542 |
include names matching the given patterns |
| 11543 |
.TP |
| 11544 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 11545 |
. |
| 11546 |
exclude names matching the given patterns |
| 11547 |
.UNINDENT |
| 11548 |
.sp |
| 11549 |
[+] marked option can be specified multiple times |
| 11550 |
.SS acl |
| 11551 |
.sp |
| 11552 |
hooks for controlling repository access |
| 11553 |
.sp |
| 11554 |
This hook makes it possible to allow or deny write access to given |
| 11555 |
branches and paths of a repository when receiving incoming changesets |
| 11556 |
via pretxnchangegroup and pretxncommit. |
| 11557 |
.sp |
| 11558 |
The authorization is matched based on the local user name on the |
| 11559 |
system where the hook runs, and not the committer of the original |
| 11560 |
changeset (since the latter is merely informative). |
| 11561 |
.sp |
| 11562 |
The acl hook is best used along with a restricted shell like hgsh, |
| 11563 |
preventing authenticating users from doing anything other than pushing |
| 11564 |
or pulling. The hook is not safe to use if users have interactive |
| 11565 |
shell access, as they can then disable the hook. Nor is it safe if |
| 11566 |
remote users share an account, because then there is no way to |
| 11567 |
distinguish them. |
| 11568 |
.sp |
| 11569 |
The order in which access checks are performed is: |
| 11570 |
.INDENT 0.0 |
| 11571 |
.IP 1. 3 |
| 11572 |
. |
| 11573 |
Deny list for branches (section \fBacl.deny.branches\fP) |
| 11574 |
.IP 2. 3 |
| 11575 |
. |
| 11576 |
Allow list for branches (section \fBacl.allow.branches\fP) |
| 11577 |
.IP 3. 3 |
| 11578 |
. |
| 11579 |
Deny list for paths (section \fBacl.deny\fP) |
| 11580 |
.IP 4. 3 |
| 11581 |
. |
| 11582 |
Allow list for paths (section \fBacl.allow\fP) |
| 11583 |
.UNINDENT |
| 11584 |
.sp |
| 11585 |
The allow and deny sections take key\-value pairs. |
| 11586 |
.SS Branch\-based Access Control |
| 11587 |
.sp |
| 11588 |
Use the \fBacl.deny.branches\fP and \fBacl.allow.branches\fP sections to |
| 11589 |
have branch\-based access control. Keys in these sections can be |
| 11590 |
either: |
| 11591 |
.INDENT 0.0 |
| 11592 |
.IP \(bu 2 |
| 11593 |
. |
| 11594 |
a branch name, or |
| 11595 |
.IP \(bu 2 |
| 11596 |
. |
| 11597 |
an asterisk, to match any branch; |
| 11598 |
.UNINDENT |
| 11599 |
.sp |
| 11600 |
The corresponding values can be either: |
| 11601 |
.INDENT 0.0 |
| 11602 |
.IP \(bu 2 |
| 11603 |
. |
| 11604 |
a comma\-separated list containing users and groups, or |
| 11605 |
.IP \(bu 2 |
| 11606 |
. |
| 11607 |
an asterisk, to match anyone; |
| 11608 |
.UNINDENT |
| 11609 |
.sp |
| 11610 |
You can add the "!" prefix to a user or group name to invert the sense |
| 11611 |
of the match. |
| 11612 |
.SS Path\-based Access Control |
| 11613 |
.sp |
| 11614 |
Use the \fBacl.deny\fP and \fBacl.allow\fP sections to have path\-based |
| 11615 |
access control. Keys in these sections accept a subtree pattern (with |
| 11616 |
a glob syntax by default). The corresponding values follow the same |
| 11617 |
syntax as the other sections above. |
| 11618 |
.SS Bookmark\-based Access Control |
| 11619 |
.sp |
| 11620 |
Use the \fBacl.deny.bookmarks\fP and \fBacl.allow.bookmarks\fP sections to |
| 11621 |
have bookmark\-based access control. Keys in these sections can be |
| 11622 |
either: |
| 11623 |
.INDENT 0.0 |
| 11624 |
.IP \(bu 2 |
| 11625 |
. |
| 11626 |
a bookmark name, or |
| 11627 |
.IP \(bu 2 |
| 11628 |
. |
| 11629 |
an asterisk, to match any bookmark; |
| 11630 |
.UNINDENT |
| 11631 |
.sp |
| 11632 |
The corresponding values can be either: |
| 11633 |
.INDENT 0.0 |
| 11634 |
.IP \(bu 2 |
| 11635 |
. |
| 11636 |
a comma\-separated list containing users and groups, or |
| 11637 |
.IP \(bu 2 |
| 11638 |
. |
| 11639 |
an asterisk, to match anyone; |
| 11640 |
.UNINDENT |
| 11641 |
.sp |
| 11642 |
You can add the "!" prefix to a user or group name to invert the sense |
| 11643 |
of the match. |
| 11644 |
.sp |
| 11645 |
Note: for interactions between clients and servers using Mercurial 3.6+ |
| 11646 |
a rejection will generally reject the entire push, for interactions |
| 11647 |
involving older clients, the commit transactions will already be accepted, |
| 11648 |
and only the bookmark movement will be rejected. |
| 11649 |
.SS Groups |
| 11650 |
.sp |
| 11651 |
Group names must be prefixed with an \fB@\fP symbol. Specifying a group |
| 11652 |
name has the same effect as specifying all the users in that group. |
| 11653 |
.sp |
| 11654 |
You can define group members in the \fBacl.groups\fP section. |
| 11655 |
If a group name is not defined there, and Mercurial is running under |
| 11656 |
a Unix\-like system, the list of users will be taken from the OS. |
| 11657 |
Otherwise, an exception will be raised. |
| 11658 |
.SS Example Configuration |
| 11659 |
.sp |
| 11660 |
.nf |
| 11661 |
.ft C |
| 11662 |
[hooks] |
| 11663 |
|
| 11664 |
# Use this if you want to check access restrictions at commit time |
| 11665 |
pretxncommit.acl = python:hgext.acl.hook |
| 11666 |
|
| 11667 |
# Use this if you want to check access restrictions for pull, push, |
| 11668 |
# bundle and serve. |
| 11669 |
pretxnchangegroup.acl = python:hgext.acl.hook |
| 11670 |
|
| 11671 |
[acl] |
| 11672 |
# Allow or deny access for incoming changes only if their source is |
| 11673 |
# listed here, let them pass otherwise. Source is "serve" for all |
| 11674 |
# remote access (http or ssh), "push", "pull" or "bundle" when the |
| 11675 |
# related commands are run locally. |
| 11676 |
# Default: serve |
| 11677 |
sources = serve |
| 11678 |
|
| 11679 |
[acl.deny.branches] |
| 11680 |
|
| 11681 |
# Everyone is denied to the frozen branch: |
| 11682 |
frozen\-branch = * |
| 11683 |
|
| 11684 |
# A bad user is denied on all branches: |
| 11685 |
* = bad\-user |
| 11686 |
|
| 11687 |
[acl.allow.branches] |
| 11688 |
|
| 11689 |
# A few users are allowed on branch\-a: |
| 11690 |
branch\-a = user\-1, user\-2, user\-3 |
| 11691 |
|
| 11692 |
# Only one user is allowed on branch\-b: |
| 11693 |
branch\-b = user\-1 |
| 11694 |
|
| 11695 |
# The super user is allowed on any branch: |
| 11696 |
* = super\-user |
| 11697 |
|
| 11698 |
# Everyone is allowed on branch\-for\-tests: |
| 11699 |
branch\-for\-tests = * |
| 11700 |
|
| 11701 |
[acl.deny] |
| 11702 |
# This list is checked first. If a match is found, acl.allow is not |
| 11703 |
# checked. All users are granted access if acl.deny is not present. |
| 11704 |
# Format for both lists: glob pattern = user, ..., @group, ... |
| 11705 |
|
| 11706 |
# To match everyone, use an asterisk for the user: |
| 11707 |
# my/glob/pattern = * |
| 11708 |
|
| 11709 |
# user6 will not have write access to any file: |
| 11710 |
** = user6 |
| 11711 |
|
| 11712 |
# Group "hg\-denied" will not have write access to any file: |
| 11713 |
** = @hg\-denied |
| 11714 |
|
| 11715 |
# Nobody will be able to change "DONT\-TOUCH\-THIS.txt", despite |
| 11716 |
# everyone being able to change all other files. See below. |
| 11717 |
src/main/resources/DONT\-TOUCH\-THIS.txt = * |
| 11718 |
|
| 11719 |
[acl.allow] |
| 11720 |
# if acl.allow is not present, all users are allowed by default |
| 11721 |
# empty acl.allow = no users allowed |
| 11722 |
|
| 11723 |
# User "doc_writer" has write access to any file under the "docs" |
| 11724 |
# folder: |
| 11725 |
docs/** = doc_writer |
| 11726 |
|
| 11727 |
# User "jack" and group "designers" have write access to any file |
| 11728 |
# under the "images" folder: |
| 11729 |
images/** = jack, @designers |
| 11730 |
|
| 11731 |
# Everyone (except for "user6" and "@hg\-denied" \- see acl.deny above) |
| 11732 |
# will have write access to any file under the "resources" folder |
| 11733 |
# (except for 1 file. See acl.deny): |
| 11734 |
src/main/resources/** = * |
| 11735 |
|
| 11736 |
\&.hgtags = release_engineer |
| 11737 |
.ft P |
| 11738 |
.fi |
| 11739 |
.SS Examples using the "!" prefix |
| 11740 |
.sp |
| 11741 |
Suppose there\(aqs a branch that only a given user (or group) should be able to |
| 11742 |
push to, and you don\(aqt want to restrict access to any other branch that may |
| 11743 |
be created. |
| 11744 |
.sp |
| 11745 |
The "!" prefix allows you to prevent anyone except a given user or group to |
| 11746 |
push changesets in a given branch or path. |
| 11747 |
.sp |
| 11748 |
In the examples below, we will: |
| 11749 |
1) Deny access to branch "ring" to anyone but user "gollum" |
| 11750 |
2) Deny access to branch "lake" to anyone but members of the group "hobbit" |
| 11751 |
3) Deny access to a file to anyone but user "gollum" |
| 11752 |
.sp |
| 11753 |
.nf |
| 11754 |
.ft C |
| 11755 |
[acl.allow.branches] |
| 11756 |
# Empty |
| 11757 |
|
| 11758 |
[acl.deny.branches] |
| 11759 |
|
| 11760 |
# 1) only \(aqgollum\(aq can commit to branch \(aqring\(aq; |
| 11761 |
# \(aqgollum\(aq and anyone else can still commit to any other branch. |
| 11762 |
ring = !gollum |
| 11763 |
|
| 11764 |
# 2) only members of the group \(aqhobbit\(aq can commit to branch \(aqlake\(aq; |
| 11765 |
# \(aqhobbit\(aq members and anyone else can still commit to any other branch. |
| 11766 |
lake = !@hobbit |
| 11767 |
|
| 11768 |
# You can also deny access based on file paths: |
| 11769 |
|
| 11770 |
[acl.allow] |
| 11771 |
# Empty |
| 11772 |
|
| 11773 |
[acl.deny] |
| 11774 |
# 3) only \(aqgollum\(aq can change the file below; |
| 11775 |
# \(aqgollum\(aq and anyone else can still change any other file. |
| 11776 |
/misty/mountains/cave/ring = !gollum |
| 11777 |
.ft P |
| 11778 |
.fi |
| 11779 |
.SS amend |
| 11780 |
.sp |
| 11781 |
provide the amend command (EXPERIMENTAL) |
| 11782 |
.sp |
| 11783 |
This extension provides an \fBamend\fP command that is similar to |
| 11784 |
\fBcommit \-\-amend\fP but does not prompt an editor. |
| 11785 |
.SS Commands |
| 11786 |
.SS Change creation |
| 11787 |
.SS amend |
| 11788 |
.sp |
| 11789 |
amend the working copy parent with all or specified outstanding changes: |
| 11790 |
.sp |
| 11791 |
.nf |
| 11792 |
.ft C |
| 11793 |
hg amend [OPTION]... [FILE]... |
| 11794 |
.ft P |
| 11795 |
.fi |
| 11796 |
.sp |
| 11797 |
Similar to \%\fBhg commit \-\-amend\fP\:, but reuse the commit message without |
| 11798 |
invoking editor, unless \fB\-\-edit\fP was set. |
| 11799 |
.sp |
| 11800 |
See \%\fBhg help commit\fP\: for more details. |
| 11801 |
.sp |
| 11802 |
Options: |
| 11803 |
.INDENT 0.0 |
| 11804 |
.TP |
| 11805 |
.B \-A, \-\-addremove |
| 11806 |
. |
| 11807 |
mark new/missing files as added/removed before committing |
| 11808 |
.TP |
| 11809 |
.B \-e, \-\-edit |
| 11810 |
. |
| 11811 |
invoke editor on commit messages |
| 11812 |
.TP |
| 11813 |
.B \-i, \-\-interactive |
| 11814 |
. |
| 11815 |
use interactive mode |
| 11816 |
.TP |
| 11817 |
.B \-\-close\-branch |
| 11818 |
. |
| 11819 |
mark a branch as closed, hiding it from the branch list |
| 11820 |
.TP |
| 11821 |
.B \-s, \-\-secret |
| 11822 |
. |
| 11823 |
use the secret phase for committing |
| 11824 |
.TP |
| 11825 |
.B \-\-draft |
| 11826 |
. |
| 11827 |
use the draft phase for committing |
| 11828 |
.TP |
| 11829 |
.BI \-n, \-\-note \ <VALUE> |
| 11830 |
. |
| 11831 |
store a note on the amend |
| 11832 |
.TP |
| 11833 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 11834 |
. |
| 11835 |
include names matching the given patterns |
| 11836 |
.TP |
| 11837 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 11838 |
. |
| 11839 |
exclude names matching the given patterns |
| 11840 |
.TP |
| 11841 |
.BI \-m, \-\-message \ <TEXT> |
| 11842 |
. |
| 11843 |
use text as commit message |
| 11844 |
.TP |
| 11845 |
.BI \-l, \-\-logfile \ <FILE> |
| 11846 |
. |
| 11847 |
read commit message from file |
| 11848 |
.TP |
| 11849 |
.BI \-d, \-\-date \ <DATE> |
| 11850 |
. |
| 11851 |
record the specified date as commit date |
| 11852 |
.TP |
| 11853 |
.BI \-u, \-\-user \ <USER> |
| 11854 |
. |
| 11855 |
record the specified user as committer |
| 11856 |
.TP |
| 11857 |
.B \-D, \-\-currentdate |
| 11858 |
. |
| 11859 |
record the current date as commit date |
| 11860 |
.TP |
| 11861 |
.B \-U, \-\-currentuser |
| 11862 |
. |
| 11863 |
record the current user as committer |
| 11864 |
.UNINDENT |
| 11865 |
.sp |
| 11866 |
[+] marked option can be specified multiple times |
| 11867 |
.SS automv |
| 11868 |
.sp |
| 11869 |
check for unrecorded moves at commit time (EXPERIMENTAL) |
| 11870 |
.sp |
| 11871 |
This extension checks at commit/amend time if any of the committed files |
| 11872 |
comes from an unrecorded mv. |
| 11873 |
.sp |
| 11874 |
The threshold at which a file is considered a move can be set with the |
| 11875 |
\fBautomv.similarity\fP config option. This option takes a percentage between 0 |
| 11876 |
(disabled) and 100 (files must be identical), the default is 95. |
| 11877 |
.SS beautifygraph |
| 11878 |
.sp |
| 11879 |
beautify log \-G output by using Unicode characters (EXPERIMENTAL) |
| 11880 |
.sp |
| 11881 |
A terminal with UTF\-8 support and monospace narrow text are required. |
| 11882 |
.SS blackbox |
| 11883 |
.sp |
| 11884 |
log repository events to a blackbox for debugging |
| 11885 |
.sp |
| 11886 |
Logs event information to .hg/blackbox.log to help debug and diagnose problems. |
| 11887 |
The events that get logged can be configured via the blackbox.track and |
| 11888 |
blackbox.ignore config keys. |
| 11889 |
.sp |
| 11890 |
Examples: |
| 11891 |
.sp |
| 11892 |
.nf |
| 11893 |
.ft C |
| 11894 |
[blackbox] |
| 11895 |
track = * |
| 11896 |
ignore = pythonhook |
| 11897 |
# dirty is *EXPENSIVE* (slow); |
| 11898 |
# each log entry indicates \(ga+\(ga if the repository is dirty, like :hg:\(gaid\(ga. |
| 11899 |
dirty = True |
| 11900 |
# record the source of log messages |
| 11901 |
logsource = True |
| 11902 |
|
| 11903 |
[blackbox] |
| 11904 |
track = command, commandfinish, commandexception, exthook, pythonhook |
| 11905 |
|
| 11906 |
[blackbox] |
| 11907 |
track = incoming |
| 11908 |
|
| 11909 |
[blackbox] |
| 11910 |
# limit the size of a log file |
| 11911 |
maxsize = 1.5 MB |
| 11912 |
# rotate up to N log files when the current one gets too big |
| 11913 |
maxfiles = 3 |
| 11914 |
|
| 11915 |
[blackbox] |
| 11916 |
# Include microseconds in log entries with %f (see Python function |
| 11917 |
# datetime.datetime.strftime) |
| 11918 |
date\-format = %Y\-%m\-%d @ %H:%M:%S.%f |
| 11919 |
.ft P |
| 11920 |
.fi |
| 11921 |
.SS Commands |
| 11922 |
.SS Repository maintenance |
| 11923 |
.SS blackbox |
| 11924 |
.sp |
| 11925 |
view the recent repository events: |
| 11926 |
.sp |
| 11927 |
.nf |
| 11928 |
.ft C |
| 11929 |
hg blackbox [OPTION]... |
| 11930 |
.ft P |
| 11931 |
.fi |
| 11932 |
.sp |
| 11933 |
view the recent repository events |
| 11934 |
.sp |
| 11935 |
Options: |
| 11936 |
.INDENT 0.0 |
| 11937 |
.TP |
| 11938 |
.BI \-l, \-\-limit \ <VALUE> |
| 11939 |
. |
| 11940 |
the number of events to show (default: 10) |
| 11941 |
.UNINDENT |
| 11942 |
.SS bookflow |
| 11943 |
.sp |
| 11944 |
implements bookmark\-based branching (EXPERIMENTAL) |
| 11945 |
.INDENT 0.0 |
| 11946 |
.IP \(bu 2 |
| 11947 |
. |
| 11948 |
Disables creation of new branches (config: enable_branches=False). |
| 11949 |
.IP \(bu 2 |
| 11950 |
. |
| 11951 |
Requires an active bookmark on commit (config: require_bookmark=True). |
| 11952 |
.IP \(bu 2 |
| 11953 |
. |
| 11954 |
Doesn\(aqt move the active bookmark on update, only on commit. |
| 11955 |
.IP \(bu 2 |
| 11956 |
. |
| 11957 |
Requires \(aq\-\-rev\(aq for moving an existing bookmark. |
| 11958 |
.IP \(bu 2 |
| 11959 |
. |
| 11960 |
Protects special bookmarks (config: protect=@). |
| 11961 |
.UNINDENT |
| 11962 |
.sp |
| 11963 |
flow related commands |
| 11964 |
.INDENT 0.0 |
| 11965 |
.INDENT 3.5 |
| 11966 |
.INDENT 0.0 |
| 11967 |
.TP |
| 11968 |
.B hg book NAME |
| 11969 |
. |
| 11970 |
create a new bookmark |
| 11971 |
.TP |
| 11972 |
.B hg book NAME \-r REV |
| 11973 |
. |
| 11974 |
move bookmark to revision (fast\-forward) |
| 11975 |
.TP |
| 11976 |
.B hg up|co NAME |
| 11977 |
. |
| 11978 |
switch to bookmark |
| 11979 |
.TP |
| 11980 |
.B hg push \-B . |
| 11981 |
. |
| 11982 |
push active bookmark |
| 11983 |
.UNINDENT |
| 11984 |
.UNINDENT |
| 11985 |
.UNINDENT |
| 11986 |
.SS bugzilla |
| 11987 |
.sp |
| 11988 |
hooks for integrating with the Bugzilla bug tracker |
| 11989 |
.sp |
| 11990 |
This hook extension adds comments on bugs in Bugzilla when changesets |
| 11991 |
that refer to bugs by Bugzilla ID are seen. The comment is formatted using |
| 11992 |
the Mercurial template mechanism. |
| 11993 |
.sp |
| 11994 |
The bug references can optionally include an update for Bugzilla of the |
| 11995 |
hours spent working on the bug. Bugs can also be marked fixed. |
| 11996 |
.sp |
| 11997 |
Four basic modes of access to Bugzilla are provided: |
| 11998 |
.INDENT 0.0 |
| 11999 |
.IP 1. 3 |
| 12000 |
. |
| 12001 |
Access via the Bugzilla REST\-API. Requires bugzilla 5.0 or later. |
| 12002 |
.IP 2. 3 |
| 12003 |
. |
| 12004 |
Access via the Bugzilla XMLRPC interface. Requires Bugzilla 3.4 or later. |
| 12005 |
.IP 3. 3 |
| 12006 |
. |
| 12007 |
Check data via the Bugzilla XMLRPC interface and submit bug change |
| 12008 |
via email to Bugzilla email interface. Requires Bugzilla 3.4 or later. |
| 12009 |
.IP 4. 3 |
| 12010 |
. |
| 12011 |
Writing directly to the Bugzilla database. Only Bugzilla installations |
| 12012 |
using MySQL are supported. Requires Python MySQLdb. |
| 12013 |
.UNINDENT |
| 12014 |
.sp |
| 12015 |
Writing directly to the database is susceptible to schema changes, and |
| 12016 |
relies on a Bugzilla contrib script to send out bug change |
| 12017 |
notification emails. This script runs as the user running Mercurial, |
| 12018 |
must be run on the host with the Bugzilla install, and requires |
| 12019 |
permission to read Bugzilla configuration details and the necessary |
| 12020 |
MySQL user and password to have full access rights to the Bugzilla |
| 12021 |
database. For these reasons this access mode is now considered |
| 12022 |
deprecated, and will not be updated for new Bugzilla versions going |
| 12023 |
forward. Only adding comments is supported in this access mode. |
| 12024 |
.sp |
| 12025 |
Access via XMLRPC needs a Bugzilla username and password to be specified |
| 12026 |
in the configuration. Comments are added under that username. Since the |
| 12027 |
configuration must be readable by all Mercurial users, it is recommended |
| 12028 |
that the rights of that user are restricted in Bugzilla to the minimum |
| 12029 |
necessary to add comments. Marking bugs fixed requires Bugzilla 4.0 and later. |
| 12030 |
.sp |
| 12031 |
Access via XMLRPC/email uses XMLRPC to query Bugzilla, but sends |
| 12032 |
email to the Bugzilla email interface to submit comments to bugs. |
| 12033 |
The From: address in the email is set to the email address of the Mercurial |
| 12034 |
user, so the comment appears to come from the Mercurial user. In the event |
| 12035 |
that the Mercurial user email is not recognized by Bugzilla as a Bugzilla |
| 12036 |
user, the email associated with the Bugzilla username used to log into |
| 12037 |
Bugzilla is used instead as the source of the comment. Marking bugs fixed |
| 12038 |
works on all supported Bugzilla versions. |
| 12039 |
.sp |
| 12040 |
Access via the REST\-API needs either a Bugzilla username and password |
| 12041 |
or an apikey specified in the configuration. Comments are made under |
| 12042 |
the given username or the user associated with the apikey in Bugzilla. |
| 12043 |
.sp |
| 12044 |
Configuration items common to all access modes: |
| 12045 |
.INDENT 0.0 |
| 12046 |
.TP |
| 12047 |
.B bugzilla.version |
| 12048 |
. |
| 12049 |
The access type to use. Values recognized are: |
| 12050 |
.INDENT 7.0 |
| 12051 |
.TP |
| 12052 |
.B \fBrestapi\fP |
| 12053 |
.sp |
| 12054 |
Bugzilla REST\-API, Bugzilla 5.0 and later. |
| 12055 |
.TP |
| 12056 |
.B \fBxmlrpc\fP |
| 12057 |
.sp |
| 12058 |
Bugzilla XMLRPC interface. |
| 12059 |
.TP |
| 12060 |
.B \fBxmlrpc+email\fP |
| 12061 |
.sp |
| 12062 |
Bugzilla XMLRPC and email interfaces. |
| 12063 |
.TP |
| 12064 |
.B \fB3.0\fP |
| 12065 |
.sp |
| 12066 |
MySQL access, Bugzilla 3.0 and later. |
| 12067 |
.TP |
| 12068 |
.B \fB2.18\fP |
| 12069 |
.sp |
| 12070 |
MySQL access, Bugzilla 2.18 and up to but not |
| 12071 |
including 3.0. |
| 12072 |
.TP |
| 12073 |
.B \fB2.16\fP |
| 12074 |
.sp |
| 12075 |
MySQL access, Bugzilla 2.16 and up to but not |
| 12076 |
including 2.18. |
| 12077 |
.UNINDENT |
| 12078 |
.TP |
| 12079 |
.B bugzilla.regexp |
| 12080 |
. |
| 12081 |
Regular expression to match bug IDs for update in changeset commit message. |
| 12082 |
It must contain one "()" named group \fB<ids>\fP containing the bug |
| 12083 |
IDs separated by non\-digit characters. It may also contain |
| 12084 |
a named group \fB<hours>\fP with a floating\-point number giving the |
| 12085 |
hours worked on the bug. If no named groups are present, the first |
| 12086 |
"()" group is assumed to contain the bug IDs, and work time is not |
| 12087 |
updated. The default expression matches \fBBug 1234\fP, \fBBug no. 1234\fP, |
| 12088 |
\fBBug number 1234\fP, \fBBugs 1234,5678\fP, \fBBug 1234 and 5678\fP and |
| 12089 |
variations thereof, followed by an hours number prefixed by \fBh\fP or |
| 12090 |
\fBhours\fP, e.g. \fBhours 1.5\fP. Matching is case insensitive. |
| 12091 |
.TP |
| 12092 |
.B bugzilla.fixregexp |
| 12093 |
. |
| 12094 |
Regular expression to match bug IDs for marking fixed in changeset |
| 12095 |
commit message. This must contain a "()" named group \fB<ids>\(ga containing |
| 12096 |
the bug IDs separated by non\-digit characters. It may also contain |
| 12097 |
a named group \(ga\(ga<hours>\fP with a floating\-point number giving the |
| 12098 |
hours worked on the bug. If no named groups are present, the first |
| 12099 |
"()" group is assumed to contain the bug IDs, and work time is not |
| 12100 |
updated. The default expression matches \fBFixes 1234\fP, \fBFixes bug 1234\fP, |
| 12101 |
\fBFixes bugs 1234,5678\fP, \fBFixes 1234 and 5678\fP and |
| 12102 |
variations thereof, followed by an hours number prefixed by \fBh\fP or |
| 12103 |
\fBhours\fP, e.g. \fBhours 1.5\fP. Matching is case insensitive. |
| 12104 |
.TP |
| 12105 |
.B bugzilla.fixstatus |
| 12106 |
. |
| 12107 |
The status to set a bug to when marking fixed. Default \fBRESOLVED\fP. |
| 12108 |
.TP |
| 12109 |
.B bugzilla.fixresolution |
| 12110 |
. |
| 12111 |
The resolution to set a bug to when marking fixed. Default \fBFIXED\fP. |
| 12112 |
.TP |
| 12113 |
.B bugzilla.style |
| 12114 |
. |
| 12115 |
The style file to use when formatting comments. |
| 12116 |
.TP |
| 12117 |
.B bugzilla.template |
| 12118 |
. |
| 12119 |
Template to use when formatting comments. Overrides style if |
| 12120 |
specified. In addition to the usual Mercurial keywords, the |
| 12121 |
extension specifies: |
| 12122 |
.INDENT 7.0 |
| 12123 |
.TP |
| 12124 |
.B \fB{bug}\fP |
| 12125 |
.sp |
| 12126 |
The Bugzilla bug ID. |
| 12127 |
.TP |
| 12128 |
.B \fB{root}\fP |
| 12129 |
.sp |
| 12130 |
The full pathname of the Mercurial repository. |
| 12131 |
.TP |
| 12132 |
.B \fB{webroot}\fP |
| 12133 |
.sp |
| 12134 |
Stripped pathname of the Mercurial repository. |
| 12135 |
.TP |
| 12136 |
.B \fB{hgweb}\fP |
| 12137 |
.sp |
| 12138 |
Base URL for browsing Mercurial repositories. |
| 12139 |
.UNINDENT |
| 12140 |
.sp |
| 12141 |
Default \fBchangeset {node|short} in repo {root} refers to bug |
| 12142 |
{bug}.\endetails:\en\et{desc|tabindent}\fP |
| 12143 |
.TP |
| 12144 |
.B bugzilla.strip |
| 12145 |
. |
| 12146 |
The number of path separator characters to strip from the front of |
| 12147 |
the Mercurial repository path (\fB{root}\fP in templates) to produce |
| 12148 |
\fB{webroot}\fP. For example, a repository with \fB{root}\fP |
| 12149 |
\fB/var/local/my\-project\fP with a strip of 2 gives a value for |
| 12150 |
\fB{webroot}\fP of \fBmy\-project\fP. Default 0. |
| 12151 |
.TP |
| 12152 |
.B web.baseurl |
| 12153 |
. |
| 12154 |
Base URL for browsing Mercurial repositories. Referenced from |
| 12155 |
templates as \fB{hgweb}\fP. |
| 12156 |
.UNINDENT |
| 12157 |
.sp |
| 12158 |
Configuration items common to XMLRPC+email and MySQL access modes: |
| 12159 |
.INDENT 0.0 |
| 12160 |
.TP |
| 12161 |
.B bugzilla.usermap |
| 12162 |
. |
| 12163 |
Path of file containing Mercurial committer email to Bugzilla user email |
| 12164 |
mappings. If specified, the file should contain one mapping per |
| 12165 |
line: |
| 12166 |
.sp |
| 12167 |
.nf |
| 12168 |
.ft C |
| 12169 |
committer = Bugzilla user |
| 12170 |
.ft P |
| 12171 |
.fi |
| 12172 |
.sp |
| 12173 |
See also the \fB[usermap]\fP section. |
| 12174 |
.UNINDENT |
| 12175 |
.sp |
| 12176 |
The \fB[usermap]\fP section is used to specify mappings of Mercurial |
| 12177 |
committer email to Bugzilla user email. See also \fBbugzilla.usermap\fP. |
| 12178 |
Contains entries of the form \fBcommitter = Bugzilla user\fP. |
| 12179 |
.sp |
| 12180 |
XMLRPC and REST\-API access mode configuration: |
| 12181 |
.INDENT 0.0 |
| 12182 |
.TP |
| 12183 |
.B bugzilla.bzurl |
| 12184 |
. |
| 12185 |
The base URL for the Bugzilla installation. |
| 12186 |
Default \fBhttp://localhost/bugzilla\fP. |
| 12187 |
.TP |
| 12188 |
.B bugzilla.user |
| 12189 |
. |
| 12190 |
The username to use to log into Bugzilla via XMLRPC. Default |
| 12191 |
\fBbugs\fP. |
| 12192 |
.TP |
| 12193 |
.B bugzilla.password |
| 12194 |
. |
| 12195 |
The password for Bugzilla login. |
| 12196 |
.UNINDENT |
| 12197 |
.sp |
| 12198 |
REST\-API access mode uses the options listed above as well as: |
| 12199 |
.INDENT 0.0 |
| 12200 |
.TP |
| 12201 |
.B bugzilla.apikey |
| 12202 |
. |
| 12203 |
An apikey generated on the Bugzilla instance for api access. |
| 12204 |
Using an apikey removes the need to store the user and password |
| 12205 |
options. |
| 12206 |
.UNINDENT |
| 12207 |
.sp |
| 12208 |
XMLRPC+email access mode uses the XMLRPC access mode configuration items, |
| 12209 |
and also: |
| 12210 |
.INDENT 0.0 |
| 12211 |
.TP |
| 12212 |
.B bugzilla.bzemail |
| 12213 |
. |
| 12214 |
The Bugzilla email address. |
| 12215 |
.UNINDENT |
| 12216 |
.sp |
| 12217 |
In addition, the Mercurial email settings must be configured. See the |
| 12218 |
documentation in hgrc(5), sections \fB[email]\fP and \fB[smtp]\fP. |
| 12219 |
.sp |
| 12220 |
MySQL access mode configuration: |
| 12221 |
.INDENT 0.0 |
| 12222 |
.TP |
| 12223 |
.B bugzilla.host |
| 12224 |
. |
| 12225 |
Hostname of the MySQL server holding the Bugzilla database. |
| 12226 |
Default \fBlocalhost\fP. |
| 12227 |
.TP |
| 12228 |
.B bugzilla.db |
| 12229 |
. |
| 12230 |
Name of the Bugzilla database in MySQL. Default \fBbugs\fP. |
| 12231 |
.TP |
| 12232 |
.B bugzilla.user |
| 12233 |
. |
| 12234 |
Username to use to access MySQL server. Default \fBbugs\fP. |
| 12235 |
.TP |
| 12236 |
.B bugzilla.password |
| 12237 |
. |
| 12238 |
Password to use to access MySQL server. |
| 12239 |
.TP |
| 12240 |
.B bugzilla.timeout |
| 12241 |
. |
| 12242 |
Database connection timeout (seconds). Default 5. |
| 12243 |
.TP |
| 12244 |
.B bugzilla.bzuser |
| 12245 |
. |
| 12246 |
Fallback Bugzilla user name to record comments with, if changeset |
| 12247 |
committer cannot be found as a Bugzilla user. |
| 12248 |
.TP |
| 12249 |
.B bugzilla.bzdir |
| 12250 |
. |
| 12251 |
Bugzilla install directory. Used by default notify. Default |
| 12252 |
\fB/var/www/html/bugzilla\fP. |
| 12253 |
.TP |
| 12254 |
.B bugzilla.notify |
| 12255 |
. |
| 12256 |
The command to run to get Bugzilla to send bug change notification |
| 12257 |
emails. Substitutes from a map with 3 keys, \fBbzdir\fP, \fBid\fP (bug |
| 12258 |
id) and \fBuser\fP (committer bugzilla email). Default depends on |
| 12259 |
version; from 2.18 it is "cd %(bzdir)s && perl \-T |
| 12260 |
contrib/sendbugmail.pl %(id)s %(user)s". |
| 12261 |
.UNINDENT |
| 12262 |
.sp |
| 12263 |
Activating the extension: |
| 12264 |
.sp |
| 12265 |
.nf |
| 12266 |
.ft C |
| 12267 |
[extensions] |
| 12268 |
bugzilla = |
| 12269 |
|
| 12270 |
[hooks] |
| 12271 |
# run bugzilla hook on every change pulled or pushed in here |
| 12272 |
incoming.bugzilla = python:hgext.bugzilla.hook |
| 12273 |
.ft P |
| 12274 |
.fi |
| 12275 |
.sp |
| 12276 |
Example configurations: |
| 12277 |
.sp |
| 12278 |
XMLRPC example configuration. This uses the Bugzilla at |
| 12279 |
\fBhttp://my\-project.org/bugzilla\fP, logging in as user |
| 12280 |
\fBbugmail@my\-project.org\fP with password \fBplugh\fP. It is used with a |
| 12281 |
collection of Mercurial repositories in \fB/var/local/hg/repos/\fP, |
| 12282 |
with a web interface at \fBhttp://my\-project.org/hg\fP. |
| 12283 |
.sp |
| 12284 |
.nf |
| 12285 |
.ft C |
| 12286 |
[bugzilla] |
| 12287 |
bzurl=http://my\-project.org/bugzilla |
| 12288 |
user=bugmail@my\-project.org |
| 12289 |
password=plugh |
| 12290 |
version=xmlrpc |
| 12291 |
template=Changeset {node|short} in {root|basename}. |
| 12292 |
{hgweb}/{webroot}/rev/{node|short}\en |
| 12293 |
{desc}\en |
| 12294 |
strip=5 |
| 12295 |
|
| 12296 |
[web] |
| 12297 |
baseurl=http://my\-project.org/hg |
| 12298 |
.ft P |
| 12299 |
.fi |
| 12300 |
.sp |
| 12301 |
XMLRPC+email example configuration. This uses the Bugzilla at |
| 12302 |
\fBhttp://my\-project.org/bugzilla\fP, logging in as user |
| 12303 |
\fBbugmail@my\-project.org\fP with password \fBplugh\fP. It is used with a |
| 12304 |
collection of Mercurial repositories in \fB/var/local/hg/repos/\fP, |
| 12305 |
with a web interface at \fBhttp://my\-project.org/hg\fP. Bug comments |
| 12306 |
are sent to the Bugzilla email address |
| 12307 |
\fBbugzilla@my\-project.org\fP. |
| 12308 |
.sp |
| 12309 |
.nf |
| 12310 |
.ft C |
| 12311 |
[bugzilla] |
| 12312 |
bzurl=http://my\-project.org/bugzilla |
| 12313 |
user=bugmail@my\-project.org |
| 12314 |
password=plugh |
| 12315 |
version=xmlrpc+email |
| 12316 |
bzemail=bugzilla@my\-project.org |
| 12317 |
template=Changeset {node|short} in {root|basename}. |
| 12318 |
{hgweb}/{webroot}/rev/{node|short}\en |
| 12319 |
{desc}\en |
| 12320 |
strip=5 |
| 12321 |
|
| 12322 |
[web] |
| 12323 |
baseurl=http://my\-project.org/hg |
| 12324 |
|
| 12325 |
[usermap] |
| 12326 |
[email protected][email protected] |
| 12327 |
.ft P |
| 12328 |
.fi |
| 12329 |
.sp |
| 12330 |
MySQL example configuration. This has a local Bugzilla 3.2 installation |
| 12331 |
in \fB/opt/bugzilla\-3.2\fP. The MySQL database is on \fBlocalhost\fP, |
| 12332 |
the Bugzilla database name is \fBbugs\fP and MySQL is |
| 12333 |
accessed with MySQL username \fBbugs\fP password \fBXYZZY\fP. It is used |
| 12334 |
with a collection of Mercurial repositories in \fB/var/local/hg/repos/\fP, |
| 12335 |
with a web interface at \fBhttp://my\-project.org/hg\fP. |
| 12336 |
.sp |
| 12337 |
.nf |
| 12338 |
.ft C |
| 12339 |
[bugzilla] |
| 12340 |
host=localhost |
| 12341 |
password=XYZZY |
| 12342 |
version=3.0 |
| 12343 |
[email protected] |
| 12344 |
bzdir=/opt/bugzilla\-3.2 |
| 12345 |
template=Changeset {node|short} in {root|basename}. |
| 12346 |
{hgweb}/{webroot}/rev/{node|short}\en |
| 12347 |
{desc}\en |
| 12348 |
strip=5 |
| 12349 |
|
| 12350 |
[web] |
| 12351 |
baseurl=http://my\-project.org/hg |
| 12352 |
|
| 12353 |
[usermap] |
| 12354 |
[email protected][email protected] |
| 12355 |
.ft P |
| 12356 |
.fi |
| 12357 |
.sp |
| 12358 |
All the above add a comment to the Bugzilla bug record of the form: |
| 12359 |
.sp |
| 12360 |
.nf |
| 12361 |
.ft C |
| 12362 |
Changeset 3b16791d6642 in repository\-name. |
| 12363 |
http://my\-project.org/hg/repository\-name/rev/3b16791d6642 |
| 12364 |
|
| 12365 |
Changeset commit comment. Bug 1234. |
| 12366 |
.ft P |
| 12367 |
.fi |
| 12368 |
.SS censor |
| 12369 |
.sp |
| 12370 |
erase file content at a given revision |
| 12371 |
.sp |
| 12372 |
The censor command instructs Mercurial to erase all content of a file at a given |
| 12373 |
revision \fIwithout updating the changeset hash.\fP This allows existing history to |
| 12374 |
remain valid while preventing future clones/pulls from receiving the erased |
| 12375 |
data. |
| 12376 |
.sp |
| 12377 |
Typical uses for censor are due to security or legal requirements, including: |
| 12378 |
.sp |
| 12379 |
.nf |
| 12380 |
.ft C |
| 12381 |
* Passwords, private keys, cryptographic material |
| 12382 |
* Licensed data/code/libraries for which the license has expired |
| 12383 |
* Personally Identifiable Information or other private data |
| 12384 |
.ft P |
| 12385 |
.fi |
| 12386 |
.sp |
| 12387 |
Censored nodes can interrupt mercurial\(aqs typical operation whenever the excised |
| 12388 |
data needs to be materialized. Some commands, like \fBhg cat\fP/\fBhg revert\fP, |
| 12389 |
simply fail when asked to produce censored data. Others, like \fBhg verify\fP and |
| 12390 |
\fBhg update\fP, must be capable of tolerating censored data to continue to |
| 12391 |
function in a meaningful way. Such commands only tolerate censored file |
| 12392 |
As having a censored version in a checkout is impractical. The current head |
| 12393 |
revisions of the repository are checked. If the revision to be censored is in |
| 12394 |
any of them the command will abort. You can configure this behavior using the |
| 12395 |
following option: |
| 12396 |
.INDENT 0.0 |
| 12397 |
.INDENT 3.5 |
| 12398 |
.INDENT 0.0 |
| 12399 |
.TP |
| 12400 |
.B \fIcensor.policy\fP |
| 12401 |
.sp |
| 12402 |
Control how to react when accessing censored content. |
| 12403 |
Accepted value: "abort", "ignore". Defaults to abort. |
| 12404 |
.sp |
| 12405 |
A few informative commands such as \fBhg grep\fP will unconditionally ignore |
| 12406 |
censored data and merely report that it was encountered. |
| 12407 |
.UNINDENT |
| 12408 |
.UNINDENT |
| 12409 |
.UNINDENT |
| 12410 |
.SS Commands |
| 12411 |
.SS Repository maintenance |
| 12412 |
.SS censor |
| 12413 |
.sp |
| 12414 |
.nf |
| 12415 |
.ft C |
| 12416 |
hg censor \-r REV [\-t TEXT] [FILE] |
| 12417 |
.ft P |
| 12418 |
.fi |
| 12419 |
.sp |
| 12420 |
Options: |
| 12421 |
.INDENT 0.0 |
| 12422 |
.TP |
| 12423 |
.BI \-r, \-\-rev \ <REV[+]> |
| 12424 |
. |
| 12425 |
censor file from specified revision |
| 12426 |
.TP |
| 12427 |
.B \-\-check\-heads |
| 12428 |
. |
| 12429 |
check that repository heads are not affected (default: True) |
| 12430 |
.TP |
| 12431 |
.BI \-t, \-\-tombstone \ <TEXT> |
| 12432 |
. |
| 12433 |
replacement tombstone data |
| 12434 |
.UNINDENT |
| 12435 |
.sp |
| 12436 |
[+] marked option can be specified multiple times |
| 12437 |
.SS children |
| 12438 |
.sp |
| 12439 |
command to display child changesets (DEPRECATED) |
| 12440 |
.sp |
| 12441 |
This extension is deprecated. You should use \%\fBhg log \-r |
| 12442 |
"children(REV)"\fP\: instead. |
| 12443 |
.SS Commands |
| 12444 |
.SS Change navigation |
| 12445 |
.SS children |
| 12446 |
.sp |
| 12447 |
show the children of the given or working directory revision: |
| 12448 |
.sp |
| 12449 |
.nf |
| 12450 |
.ft C |
| 12451 |
hg children [\-r REV] [FILE] |
| 12452 |
.ft P |
| 12453 |
.fi |
| 12454 |
.sp |
| 12455 |
Print the children of the working directory\(aqs revisions. If a |
| 12456 |
revision is given via \-r/\-\-rev, the children of that revision will |
| 12457 |
be printed. If a file argument is given, revision in which the |
| 12458 |
file was last changed (after the working directory revision or the |
| 12459 |
argument to \-\-rev if given) is printed. |
| 12460 |
.sp |
| 12461 |
Please use \%\fBhg log\fP\: instead: |
| 12462 |
.sp |
| 12463 |
.nf |
| 12464 |
.ft C |
| 12465 |
hg children => hg log \-r "children(.)" |
| 12466 |
hg children \-r REV => hg log \-r "children(REV)" |
| 12467 |
.ft P |
| 12468 |
.fi |
| 12469 |
.sp |
| 12470 |
See \%\fBhg help log\fP\: and \%\fBhg help revsets.children\fP\:. |
| 12471 |
.sp |
| 12472 |
Options: |
| 12473 |
.INDENT 0.0 |
| 12474 |
.TP |
| 12475 |
.BI \-r, \-\-rev \ <REV> |
| 12476 |
. |
| 12477 |
show children of the specified revision (default: .) |
| 12478 |
.TP |
| 12479 |
.BI \-\-style \ <STYLE> |
| 12480 |
. |
| 12481 |
display using template map file (DEPRECATED) |
| 12482 |
.TP |
| 12483 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 12484 |
. |
| 12485 |
display with template |
| 12486 |
.UNINDENT |
| 12487 |
.SS churn |
| 12488 |
.sp |
| 12489 |
command to display statistics about repository history |
| 12490 |
.SS Commands |
| 12491 |
.SS Repository maintenance |
| 12492 |
.SS churn |
| 12493 |
.sp |
| 12494 |
histogram of changes to the repository: |
| 12495 |
.sp |
| 12496 |
.nf |
| 12497 |
.ft C |
| 12498 |
hg churn [\-d DATE] [\-r REV] [\-\-aliases FILE] [FILE] |
| 12499 |
.ft P |
| 12500 |
.fi |
| 12501 |
.sp |
| 12502 |
This command will display a histogram representing the number |
| 12503 |
of changed lines or revisions, grouped according to the given |
| 12504 |
template. The default template will group changes by author. |
| 12505 |
The \-\-dateformat option may be used to group the results by |
| 12506 |
date instead. |
| 12507 |
.sp |
| 12508 |
Statistics are based on the number of changed lines, or |
| 12509 |
alternatively the number of matching revisions if the |
| 12510 |
\-\-changesets option is specified. |
| 12511 |
.sp |
| 12512 |
Examples: |
| 12513 |
.sp |
| 12514 |
.nf |
| 12515 |
.ft C |
| 12516 |
# display count of changed lines for every committer |
| 12517 |
hg churn \-T "{author|email}" |
| 12518 |
|
| 12519 |
# display daily activity graph |
| 12520 |
hg churn \-f "%H" \-s \-c |
| 12521 |
|
| 12522 |
# display activity of developers by month |
| 12523 |
hg churn \-f "%Y\-%m" \-s \-c |
| 12524 |
|
| 12525 |
# display count of lines changed in every year |
| 12526 |
hg churn \-f "%Y" \-s |
| 12527 |
|
| 12528 |
# display count of lines changed in a time range |
| 12529 |
hg churn \-d "2020\-04 to 2020\-09" |
| 12530 |
.ft P |
| 12531 |
.fi |
| 12532 |
.sp |
| 12533 |
It is possible to map alternate email addresses to a main address |
| 12534 |
by providing a file using the following format: |
| 12535 |
.sp |
| 12536 |
.nf |
| 12537 |
.ft C |
| 12538 |
<alias email> = <actual email> |
| 12539 |
.ft P |
| 12540 |
.fi |
| 12541 |
.sp |
| 12542 |
Such a file may be specified with the \-\-aliases option, otherwise |
| 12543 |
a .hgchurn file will be looked for in the working directory root. |
| 12544 |
Aliases will be split from the rightmost "=". |
| 12545 |
.sp |
| 12546 |
Options: |
| 12547 |
.INDENT 0.0 |
| 12548 |
.TP |
| 12549 |
.BI \-r, \-\-rev \ <REV[+]> |
| 12550 |
. |
| 12551 |
count rate for the specified revision or revset |
| 12552 |
.TP |
| 12553 |
.BI \-d, \-\-date \ <DATE> |
| 12554 |
. |
| 12555 |
count rate for revisions matching date spec |
| 12556 |
.TP |
| 12557 |
.BI \-t, \-\-oldtemplate \ <TEMPLATE> |
| 12558 |
. |
| 12559 |
template to group changesets (DEPRECATED) |
| 12560 |
.TP |
| 12561 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 12562 |
. |
| 12563 |
template to group changesets (default: {author|email}) |
| 12564 |
.TP |
| 12565 |
.BI \-f, \-\-dateformat \ <FORMAT> |
| 12566 |
. |
| 12567 |
strftime\-compatible format for grouping by date |
| 12568 |
.TP |
| 12569 |
.B \-c, \-\-changesets |
| 12570 |
. |
| 12571 |
count rate by number of changesets |
| 12572 |
.TP |
| 12573 |
.B \-s, \-\-sort |
| 12574 |
. |
| 12575 |
sort by key (default: sort by count) |
| 12576 |
.TP |
| 12577 |
.B \-\-diffstat |
| 12578 |
. |
| 12579 |
display added/removed lines separately |
| 12580 |
.TP |
| 12581 |
.BI \-\-aliases \ <FILE> |
| 12582 |
. |
| 12583 |
file with email aliases |
| 12584 |
.TP |
| 12585 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 12586 |
. |
| 12587 |
include names matching the given patterns |
| 12588 |
.TP |
| 12589 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 12590 |
. |
| 12591 |
exclude names matching the given patterns |
| 12592 |
.UNINDENT |
| 12593 |
.sp |
| 12594 |
[+] marked option can be specified multiple times |
| 12595 |
.SS clonebundles |
| 12596 |
.sp |
| 12597 |
advertise pre\-generated bundles to seed clones |
| 12598 |
.sp |
| 12599 |
"clonebundles" is a server\-side extension used to advertise the existence |
| 12600 |
of pre\-generated, externally hosted bundle files to clients that are |
| 12601 |
cloning so that cloning can be faster, more reliable, and require less |
| 12602 |
resources on the server. "pullbundles" is a related feature for sending |
| 12603 |
pre\-generated bundle files to clients as part of pull operations. |
| 12604 |
.sp |
| 12605 |
Cloning can be a CPU and I/O intensive operation on servers. Traditionally, |
| 12606 |
the server, in response to a client\(aqs request to clone, dynamically generates |
| 12607 |
a bundle containing the entire repository content and sends it to the client. |
| 12608 |
There is no caching on the server and the server will have to redundantly |
| 12609 |
generate the same outgoing bundle in response to each clone request. For |
| 12610 |
servers with large repositories or with high clone volume, the load from |
| 12611 |
clones can make scaling the server challenging and costly. |
| 12612 |
.sp |
| 12613 |
This extension provides server operators the ability to offload |
| 12614 |
potentially expensive clone load to an external service. Pre\-generated |
| 12615 |
bundles also allow using more CPU intensive compression, reducing the |
| 12616 |
effective bandwidth requirements. |
| 12617 |
.sp |
| 12618 |
Here\(aqs how clone bundles work: |
| 12619 |
.INDENT 0.0 |
| 12620 |
.IP 1. 3 |
| 12621 |
. |
| 12622 |
A server operator establishes a mechanism for making bundle files available |
| 12623 |
on a hosting service where Mercurial clients can fetch them. |
| 12624 |
.IP 2. 3 |
| 12625 |
. |
| 12626 |
A manifest file listing available bundle URLs and some optional metadata |
| 12627 |
is added to the Mercurial repository on the server. |
| 12628 |
.IP 3. 3 |
| 12629 |
. |
| 12630 |
A client initiates a clone against a clone bundles aware server. |
| 12631 |
.IP 4. 3 |
| 12632 |
. |
| 12633 |
The client sees the server is advertising clone bundles and fetches the |
| 12634 |
manifest listing available bundles. |
| 12635 |
.IP 5. 3 |
| 12636 |
. |
| 12637 |
The client filters and sorts the available bundles based on what it |
| 12638 |
supports and prefers. |
| 12639 |
.IP 6. 3 |
| 12640 |
. |
| 12641 |
The client downloads and applies an available bundle from the |
| 12642 |
server\-specified URL. |
| 12643 |
.IP 7. 3 |
| 12644 |
. |
| 12645 |
The client reconnects to the original server and performs the equivalent |
| 12646 |
of \%\fBhg pull\fP\: to retrieve all repository data not in the bundle. (The |
| 12647 |
repository could have been updated between when the bundle was created |
| 12648 |
and when the client started the clone.) This may use "pullbundles". |
| 12649 |
.UNINDENT |
| 12650 |
.sp |
| 12651 |
Instead of the server generating full repository bundles for every clone |
| 12652 |
request, it generates full bundles once and they are subsequently reused to |
| 12653 |
bootstrap new clones. The server may still transfer data at clone time. |
| 12654 |
However, this is only data that has been added/changed since the bundle was |
| 12655 |
created. For large, established repositories, this can reduce server load for |
| 12656 |
clones to less than 1% of original. |
| 12657 |
.sp |
| 12658 |
Here\(aqs how pullbundles work: |
| 12659 |
.INDENT 0.0 |
| 12660 |
.IP 1. 3 |
| 12661 |
. |
| 12662 |
A manifest file listing available bundles and describing the revisions |
| 12663 |
is added to the Mercurial repository on the server. |
| 12664 |
.IP 2. 3 |
| 12665 |
. |
| 12666 |
A new\-enough client informs the server that it supports partial pulls |
| 12667 |
and initiates a pull. |
| 12668 |
.IP 3. 3 |
| 12669 |
. |
| 12670 |
If the server has pull bundles enabled and sees the client advertising |
| 12671 |
partial pulls, it checks for a matching pull bundle in the manifest. |
| 12672 |
A bundle matches if the format is supported by the client, the client |
| 12673 |
has the required revisions already and needs something from the bundle. |
| 12674 |
.IP 4. 3 |
| 12675 |
. |
| 12676 |
If there is at least one matching bundle, the server sends it to the client. |
| 12677 |
.IP 5. 3 |
| 12678 |
. |
| 12679 |
The client applies the bundle and notices that the server reply was |
| 12680 |
incomplete. It initiates another pull. |
| 12681 |
.UNINDENT |
| 12682 |
.sp |
| 12683 |
To work, this extension requires the following of server operators: |
| 12684 |
.INDENT 0.0 |
| 12685 |
.IP \(bu 2 |
| 12686 |
. |
| 12687 |
Generating bundle files of repository content (typically periodically, |
| 12688 |
such as once per day). |
| 12689 |
.IP \(bu 2 |
| 12690 |
. |
| 12691 |
Clone bundles: A file server that clients have network access to and that |
| 12692 |
Python knows how to talk to through its normal URL handling facility |
| 12693 |
(typically an HTTP/HTTPS server). |
| 12694 |
.IP \(bu 2 |
| 12695 |
. |
| 12696 |
A process for keeping the bundles manifest in sync with available bundle |
| 12697 |
files. |
| 12698 |
.UNINDENT |
| 12699 |
.sp |
| 12700 |
Strictly speaking, using a static file hosting server isn\(aqt required: a server |
| 12701 |
operator could use a dynamic service for retrieving bundle data. However, |
| 12702 |
static file hosting services are simple and scalable and should be sufficient |
| 12703 |
for most needs. |
| 12704 |
.sp |
| 12705 |
Bundle files can be generated with the \%\fBhg bundle\fP\: command. Typically |
| 12706 |
\%\fBhg bundle \-\-all\fP\: is used to produce a bundle of the entire repository. |
| 12707 |
.sp |
| 12708 |
The bundlespec option \fIstream\fP (see \%\fBhg help bundlespec\fP\:) |
| 12709 |
can be used to produce a special \fIstreaming clonebundle\fP, typically using |
| 12710 |
\%\fBhg bundle \-\-all \-\-type="none\-streamv2"\fP\:. |
| 12711 |
These are bundle files that are extremely efficient |
| 12712 |
to produce and consume (read: fast). However, they are larger than |
| 12713 |
traditional bundle formats and require that clients support the exact set |
| 12714 |
of repository data store formats in use by the repository that created them. |
| 12715 |
Typically, a newer server can serve data that is compatible with older clients. |
| 12716 |
However, \fIstreaming clone bundles\fP don\(aqt have this guarantee. \fBServer |
| 12717 |
operators need to be aware that newer versions of Mercurial may produce |
| 12718 |
streaming clone bundles incompatible with older Mercurial versions.\fP |
| 12719 |
.sp |
| 12720 |
A server operator is responsible for creating a \fB.hg/clonebundles.manifest\fP |
| 12721 |
file containing the list of available bundle files suitable for seeding |
| 12722 |
clones. If this file does not exist, the repository will not advertise the |
| 12723 |
existence of clone bundles when clients connect. For pull bundles, |
| 12724 |
\fB.hg/pullbundles.manifest\fP is used. |
| 12725 |
.sp |
| 12726 |
The manifest file contains a newline (n) delimited list of entries. |
| 12727 |
.sp |
| 12728 |
Each line in this file defines an available bundle. Lines have the format: |
| 12729 |
.INDENT 0.0 |
| 12730 |
.INDENT 3.5 |
| 12731 |
.sp |
| 12732 |
<URL> [<key>=<value>[ <key>=<value>]] |
| 12733 |
.UNINDENT |
| 12734 |
.UNINDENT |
| 12735 |
.sp |
| 12736 |
That is, a URL followed by an optional, space\-delimited list of key=value |
| 12737 |
pairs describing additional properties of this bundle. Both keys and values |
| 12738 |
are URI encoded. |
| 12739 |
.sp |
| 12740 |
For pull bundles, the URL is a path under the \fB.hg\fP directory of the |
| 12741 |
repository. |
| 12742 |
.sp |
| 12743 |
Keys in UPPERCASE are reserved for use by Mercurial and are defined below. |
| 12744 |
All non\-uppercase keys can be used by site installations. An example use |
| 12745 |
for custom properties is to use the \fIdatacenter\fP attribute to define which |
| 12746 |
data center a file is hosted in. Clients could then prefer a server in the |
| 12747 |
data center closest to them. |
| 12748 |
.sp |
| 12749 |
The following reserved keys are currently defined: |
| 12750 |
.INDENT 0.0 |
| 12751 |
.TP |
| 12752 |
.B BUNDLESPEC |
| 12753 |
. |
| 12754 |
A "bundle specification" string that describes the type of the bundle. |
| 12755 |
.sp |
| 12756 |
These are string values that are accepted by the "\-\-type" argument of |
| 12757 |
\%\fBhg bundle\fP\:. |
| 12758 |
.sp |
| 12759 |
The values are parsed in strict mode, which means they must be of the |
| 12760 |
"<compression>\-<type>" form. See |
| 12761 |
mercurial.exchange.parsebundlespec() for more details. |
| 12762 |
.sp |
| 12763 |
\%\fBhg debugbundle \-\-spec\fP\: can be used to print the bundle specification |
| 12764 |
string for a bundle file. The output of this command can be used verbatim |
| 12765 |
for the value of \fBBUNDLESPEC\fP (it is already escaped). |
| 12766 |
.sp |
| 12767 |
Clients will automatically filter out specifications that are unknown or |
| 12768 |
unsupported so they won\(aqt attempt to download something that likely won\(aqt |
| 12769 |
apply. |
| 12770 |
.sp |
| 12771 |
The actual value doesn\(aqt impact client behavior beyond filtering: |
| 12772 |
clients will still sniff the bundle type from the header of downloaded |
| 12773 |
files. |
| 12774 |
.sp |
| 12775 |
\fBUse of this key is highly recommended\fP, as it allows clients to |
| 12776 |
easily skip unsupported bundles. If this key is not defined, an old |
| 12777 |
client may attempt to apply a bundle that it is incapable of reading. |
| 12778 |
.TP |
| 12779 |
.B REQUIRESNI |
| 12780 |
. |
| 12781 |
Whether Server Name Indication (SNI) is required to connect to the URL. |
| 12782 |
SNI allows servers to use multiple certificates on the same IP. It is |
| 12783 |
somewhat common in CDNs and other hosting providers. Older Python |
| 12784 |
versions do not support SNI. Defining this attribute enables clients |
| 12785 |
with older Python versions to filter this entry without experiencing |
| 12786 |
an opaque SSL failure at connection time. |
| 12787 |
.sp |
| 12788 |
If this is defined, it is important to advertise a non\-SNI fallback |
| 12789 |
URL or clients running old Python releases may not be able to clone |
| 12790 |
with the clonebundles facility. |
| 12791 |
.sp |
| 12792 |
Value should be "true". |
| 12793 |
.TP |
| 12794 |
.B REQUIREDRAM |
| 12795 |
. |
| 12796 |
Value specifies expected memory requirements to decode the payload. |
| 12797 |
Values can have suffixes for common bytes sizes. e.g. "64MB". |
| 12798 |
.sp |
| 12799 |
This key is often used with zstd\-compressed bundles using a high |
| 12800 |
compression level / window size, which can require 100+ MB of memory |
| 12801 |
to decode. |
| 12802 |
.TP |
| 12803 |
.B heads |
| 12804 |
. |
| 12805 |
Used for pull bundles. This contains the \fB;\fP separated changeset |
| 12806 |
hashes of the heads of the bundle content. |
| 12807 |
.TP |
| 12808 |
.B bases |
| 12809 |
. |
| 12810 |
Used for pull bundles. This contains the \fB;\fP separated changeset |
| 12811 |
hashes of the roots of the bundle content. This can be skipped if |
| 12812 |
the bundle was created without \fB\-\-base\fP. |
| 12813 |
.UNINDENT |
| 12814 |
.sp |
| 12815 |
Manifests can contain multiple entries. Assuming metadata is defined, clients |
| 12816 |
will filter entries from the manifest that they don\(aqt support. The remaining |
| 12817 |
entries are optionally sorted by client preferences |
| 12818 |
(\fBui.clonebundleprefers\fP config option). The client then attempts |
| 12819 |
to fetch the bundle at the first URL in the remaining list. |
| 12820 |
.sp |
| 12821 |
\fBErrors when downloading a bundle will fail the entire clone operation: |
| 12822 |
clients do not automatically fall back to a traditional clone.\fP The reason |
| 12823 |
for this is that if a server is using clone bundles, it is probably doing so |
| 12824 |
because the feature is necessary to help it scale. In other words, there |
| 12825 |
is an assumption that clone load will be offloaded to another service and |
| 12826 |
that the Mercurial server isn\(aqt responsible for serving this clone load. |
| 12827 |
If that other service experiences issues and clients start mass falling back to |
| 12828 |
the original Mercurial server, the added clone load could overwhelm the server |
| 12829 |
due to unexpected load and effectively take it offline. Not having clients |
| 12830 |
automatically fall back to cloning from the original server mitigates this |
| 12831 |
scenario. |
| 12832 |
.sp |
| 12833 |
Because there is no automatic Mercurial server fallback on failure of the |
| 12834 |
bundle hosting service, it is important for server operators to view the bundle |
| 12835 |
hosting service as an extension of the Mercurial server in terms of |
| 12836 |
availability and service level agreements: if the bundle hosting service goes |
| 12837 |
down, so does the ability for clients to clone. Note: clients will see a |
| 12838 |
message informing them how to bypass the clone bundles facility when a failure |
| 12839 |
occurs. So server operators should prepare for some people to follow these |
| 12840 |
instructions when a failure occurs, thus driving more load to the original |
| 12841 |
Mercurial server when the bundle hosting service fails. |
| 12842 |
.SS inline clonebundles |
| 12843 |
.sp |
| 12844 |
It is possible to transmit clonebundles inline in case repositories are |
| 12845 |
accessed over SSH. This avoids having to setup an external HTTPS server |
| 12846 |
and results in the same access control as already present for the SSH setup. |
| 12847 |
.sp |
| 12848 |
Inline clonebundles should be placed into the \fI.hg/bundle\-cache\fP directory. |
| 12849 |
A clonebundle at \fI.hg/bundle\-cache/mybundle.bundle\fP is referred to |
| 12850 |
in the \fIclonebundles.manifest\fP file as \fIpeer\-bundle\-cache://mybundle.bundle\fP. |
| 12851 |
.SS auto\-generation of clone bundles |
| 12852 |
.sp |
| 12853 |
It is possible to set Mercurial to automatically re\-generate clone bundles when |
| 12854 |
enough new content is available. |
| 12855 |
.sp |
| 12856 |
Mercurial will take care of the process asynchronously. The defined list of |
| 12857 |
bundle\-type will be generated, uploaded, and advertised. Older bundles will get |
| 12858 |
decommissioned as newer ones replace them. |
| 12859 |
.SS Bundles Generation: |
| 12860 |
.sp |
| 12861 |
The extension can generate multiple variants of the clone bundle. Each |
| 12862 |
different variant will be defined by the "bundle\-spec" they use: |
| 12863 |
.sp |
| 12864 |
.nf |
| 12865 |
.ft C |
| 12866 |
[clone\-bundles] |
| 12867 |
auto\-generate.formats= zstd\-v2, gzip\-v2 |
| 12868 |
.ft P |
| 12869 |
.fi |
| 12870 |
.sp |
| 12871 |
See \fIhg help bundlespec\fP for details about available options. |
| 12872 |
.sp |
| 12873 |
By default, new bundles are generated when 5% of the repository contents or at |
| 12874 |
least 1000 revisions are not contained in the cached bundles. This option can |
| 12875 |
be controlled by the \fIclone\-bundles.trigger.below\-bundled\-ratio\fP option |
| 12876 |
(default 0.95) and the \fIclone\-bundles.trigger.revs\fP option (default 1000): |
| 12877 |
.sp |
| 12878 |
.nf |
| 12879 |
.ft C |
| 12880 |
[clone\-bundles] |
| 12881 |
trigger.below\-bundled\-ratio=0.95 |
| 12882 |
trigger.revs=1000 |
| 12883 |
.ft P |
| 12884 |
.fi |
| 12885 |
.sp |
| 12886 |
This logic can be manually triggered using the \fIadmin::clone\-bundles\-refresh\fP |
| 12887 |
command, or automatically on each repository change if |
| 12888 |
\fIclone\-bundles.auto\-generate.on\-change\fP is set to \fIyes\fP: |
| 12889 |
.sp |
| 12890 |
.nf |
| 12891 |
.ft C |
| 12892 |
[clone\-bundles] |
| 12893 |
auto\-generate.on\-change=yes |
| 12894 |
auto\-generate.formats= zstd\-v2, gzip\-v2 |
| 12895 |
.ft P |
| 12896 |
.fi |
| 12897 |
.SS Automatic Inline serving |
| 12898 |
.sp |
| 12899 |
The simplest way to serve the generated bundle is through the Mercurial |
| 12900 |
protocol. However it is not the most efficient as request will still be served |
| 12901 |
by that main server. It is useful in case where authentication is complexe or |
| 12902 |
when an efficient mirror system is already in use anyway. See the \fIinline |
| 12903 |
clonebundles\fP section above for details about inline clonebundles |
| 12904 |
.sp |
| 12905 |
To automatically serve generated bundle through inline clonebundle, simply set |
| 12906 |
the following option: |
| 12907 |
.sp |
| 12908 |
.nf |
| 12909 |
.ft C |
| 12910 |
auto\-generate.serve\-inline=yes |
| 12911 |
.ft P |
| 12912 |
.fi |
| 12913 |
.sp |
| 12914 |
Enabling this option disable the managed upload and serving explained below. |
| 12915 |
.SS Bundles Upload and Serving: |
| 12916 |
.sp |
| 12917 |
This is the most efficient way to serve automatically generated clone bundles, |
| 12918 |
but requires some setup. |
| 12919 |
.sp |
| 12920 |
The generated bundles need to be made available to users through a "public" URL. |
| 12921 |
This should be donne through \fIclone\-bundles.upload\-command\fP configuration. The |
| 12922 |
value of this command should be a shell command. It will have access to the |
| 12923 |
bundle file path through the \fI$HGCB_BUNDLE_PATH\fP variable. And the expected |
| 12924 |
basename in the "public" URL is accessible at: |
| 12925 |
.sp |
| 12926 |
.nf |
| 12927 |
.ft C |
| 12928 |
[clone\-bundles] |
| 12929 |
upload\-command=sftp put $HGCB_BUNDLE_PATH sftp://bundles.host/clone\-bundles/$HGCB_BUNDLE_BASENAME |
| 12930 |
.ft P |
| 12931 |
.fi |
| 12932 |
.sp |
| 12933 |
If the file was already uploaded, the command must still succeed. |
| 12934 |
.sp |
| 12935 |
After upload, the file should be available at an url defined by |
| 12936 |
\fIclone\-bundles.url\-template\fP. |
| 12937 |
.INDENT 0.0 |
| 12938 |
.INDENT 3.5 |
| 12939 |
.sp |
| 12940 |
[clone\-bundles] |
| 12941 |
url\-template=https://bundles.host/cache/clone\-bundles/{basename} |
| 12942 |
.UNINDENT |
| 12943 |
.UNINDENT |
| 12944 |
.SS Old bundles cleanup: |
| 12945 |
.sp |
| 12946 |
When new bundles are generated, the older ones are no longer necessary and can |
| 12947 |
be removed from storage. This is done through the \fIclone\-bundles.delete\-command\fP |
| 12948 |
configuration. The command is given the url of the artifact to delete through |
| 12949 |
the \fI$HGCB_BUNDLE_URL\fP environment variable. |
| 12950 |
.INDENT 0.0 |
| 12951 |
.INDENT 3.5 |
| 12952 |
.sp |
| 12953 |
[clone\-bundles] |
| 12954 |
delete\-command=sftp rm sftp://bundles.host/clone\-bundles/$HGCB_BUNDLE_BASENAME |
| 12955 |
.UNINDENT |
| 12956 |
.UNINDENT |
| 12957 |
.sp |
| 12958 |
If the file was already deleted, the command must still succeed. |
| 12959 |
.SS Commands |
| 12960 |
.SS Uncategorized commands |
| 12961 |
.SS admin::clone\-bundles\-clear |
| 12962 |
.sp |
| 12963 |
remove existing clone bundle caches: |
| 12964 |
.sp |
| 12965 |
.nf |
| 12966 |
.ft C |
| 12967 |
hg admin::clone\-bundles\-clear |
| 12968 |
.ft P |
| 12969 |
.fi |
| 12970 |
.sp |
| 12971 |
See \fIhg help admin::clone\-bundles\-refresh\fP for details on how to regenerate |
| 12972 |
them. |
| 12973 |
.sp |
| 12974 |
This command will only affect bundles currently available, it will not |
| 12975 |
affect bundles being asynchronously generated. |
| 12976 |
.SS admin::clone\-bundles\-refresh |
| 12977 |
.sp |
| 12978 |
generate clone bundles according to the configuration: |
| 12979 |
.sp |
| 12980 |
.nf |
| 12981 |
.ft C |
| 12982 |
hg admin::clone\-bundles\-refresh |
| 12983 |
.ft P |
| 12984 |
.fi |
| 12985 |
.sp |
| 12986 |
This runs the logic for automatic generation, removing outdated bundles and |
| 12987 |
generating new ones if necessary. See \%\fBhg help \-e clone\-bundles\fP\: for |
| 12988 |
details about how to configure this feature. |
| 12989 |
.sp |
| 12990 |
Options: |
| 12991 |
.INDENT 0.0 |
| 12992 |
.TP |
| 12993 |
.B \-\-background |
| 12994 |
. |
| 12995 |
start bundle generation in the background |
| 12996 |
.UNINDENT |
| 12997 |
.SS closehead |
| 12998 |
.sp |
| 12999 |
close arbitrary heads without checking them out first |
| 13000 |
.SS Commands |
| 13001 |
.SS Change manipulation |
| 13002 |
.SS close\-head |
| 13003 |
.sp |
| 13004 |
close the given head revisions: |
| 13005 |
.sp |
| 13006 |
.nf |
| 13007 |
.ft C |
| 13008 |
hg close\-head [OPTION]... [REV]... |
| 13009 |
.ft P |
| 13010 |
.fi |
| 13011 |
.sp |
| 13012 |
This is equivalent to checking out each revision in a clean tree and running |
| 13013 |
\fBhg commit \-\-close\-branch\fP, except that it doesn\(aqt change the working |
| 13014 |
directory. |
| 13015 |
.sp |
| 13016 |
The commit message must be specified with \-l or \-m. |
| 13017 |
.sp |
| 13018 |
Options: |
| 13019 |
.INDENT 0.0 |
| 13020 |
.TP |
| 13021 |
.BI \-m, \-\-message \ <TEXT> |
| 13022 |
. |
| 13023 |
use text as commit message |
| 13024 |
.TP |
| 13025 |
.BI \-l, \-\-logfile \ <FILE> |
| 13026 |
. |
| 13027 |
read commit message from file |
| 13028 |
.TP |
| 13029 |
.BI \-d, \-\-date \ <DATE> |
| 13030 |
. |
| 13031 |
record the specified date as commit date |
| 13032 |
.TP |
| 13033 |
.BI \-u, \-\-user \ <USER> |
| 13034 |
. |
| 13035 |
record the specified user as committer |
| 13036 |
.TP |
| 13037 |
.BI \-r, \-\-rev \ <REV[+]> |
| 13038 |
. |
| 13039 |
revision to check |
| 13040 |
.UNINDENT |
| 13041 |
.sp |
| 13042 |
[+] marked option can be specified multiple times |
| 13043 |
.\" |
| 13044 |
. |
| 13045 |
.INDENT 0.0 |
| 13046 |
.INDENT 3.5 |
| 13047 |
.sp |
| 13048 |
aliases: close\-heads |
| 13049 |
.UNINDENT |
| 13050 |
.UNINDENT |
| 13051 |
.SS commitextras |
| 13052 |
.sp |
| 13053 |
adds a new flag extras to commit (ADVANCED) |
| 13054 |
.SS convert |
| 13055 |
.sp |
| 13056 |
import revisions from foreign VCS repositories into Mercurial |
| 13057 |
.SS Commands |
| 13058 |
.SS Uncategorized commands |
| 13059 |
.SS convert |
| 13060 |
.sp |
| 13061 |
convert a foreign SCM repository to a Mercurial one.: |
| 13062 |
.sp |
| 13063 |
.nf |
| 13064 |
.ft C |
| 13065 |
hg convert [OPTION]... SOURCE [DEST [REVMAP]] |
| 13066 |
.ft P |
| 13067 |
.fi |
| 13068 |
.sp |
| 13069 |
Accepted source formats [identifiers]: |
| 13070 |
.INDENT 0.0 |
| 13071 |
.IP \(bu 2 |
| 13072 |
. |
| 13073 |
Mercurial [hg] |
| 13074 |
.IP \(bu 2 |
| 13075 |
. |
| 13076 |
CVS [cvs] |
| 13077 |
.IP \(bu 2 |
| 13078 |
. |
| 13079 |
Darcs [darcs] |
| 13080 |
.IP \(bu 2 |
| 13081 |
. |
| 13082 |
git [git] |
| 13083 |
.IP \(bu 2 |
| 13084 |
. |
| 13085 |
Subversion [svn] |
| 13086 |
.IP \(bu 2 |
| 13087 |
. |
| 13088 |
Monotone [mtn] |
| 13089 |
.IP \(bu 2 |
| 13090 |
. |
| 13091 |
GNU Arch [gnuarch] |
| 13092 |
.IP \(bu 2 |
| 13093 |
. |
| 13094 |
Bazaar [bzr] |
| 13095 |
.IP \(bu 2 |
| 13096 |
. |
| 13097 |
Perforce [p4] |
| 13098 |
.UNINDENT |
| 13099 |
.sp |
| 13100 |
Accepted destination formats [identifiers]: |
| 13101 |
.INDENT 0.0 |
| 13102 |
.IP \(bu 2 |
| 13103 |
. |
| 13104 |
Mercurial [hg] |
| 13105 |
.IP \(bu 2 |
| 13106 |
. |
| 13107 |
Subversion [svn] (history on branches is not preserved) |
| 13108 |
.UNINDENT |
| 13109 |
.sp |
| 13110 |
If no revision is given, all revisions will be converted. |
| 13111 |
Otherwise, convert will only import up to the named revision |
| 13112 |
(given in a format understood by the source). |
| 13113 |
.sp |
| 13114 |
If no destination directory name is specified, it defaults to the |
| 13115 |
basename of the source with \fB\-hg\fP appended. If the destination |
| 13116 |
repository doesn\(aqt exist, it will be created. |
| 13117 |
.sp |
| 13118 |
By default, all sources except Mercurial will use \-\-branchsort. |
| 13119 |
Mercurial uses \-\-sourcesort to preserve original revision numbers |
| 13120 |
order. Sort modes have the following effects: |
| 13121 |
.INDENT 0.0 |
| 13122 |
.TP |
| 13123 |
.B \-\-branchsort |
| 13124 |
. |
| 13125 |
convert from parent to child revision when possible, |
| 13126 |
which means branches are usually converted one after |
| 13127 |
the other. It generates more compact repositories. |
| 13128 |
.TP |
| 13129 |
.B \-\-datesort |
| 13130 |
. |
| 13131 |
sort revisions by date. Converted repositories have |
| 13132 |
good\-looking changelogs but are often an order of |
| 13133 |
magnitude larger than the same ones generated by |
| 13134 |
\-\-branchsort. |
| 13135 |
.TP |
| 13136 |
.B \-\-sourcesort |
| 13137 |
. |
| 13138 |
try to preserve source revisions order, only |
| 13139 |
supported by Mercurial sources. |
| 13140 |
.TP |
| 13141 |
.B \-\-closesort |
| 13142 |
. |
| 13143 |
try to move closed revisions as close as possible |
| 13144 |
to parent branches, only supported by Mercurial |
| 13145 |
sources. |
| 13146 |
.UNINDENT |
| 13147 |
.sp |
| 13148 |
If \fBREVMAP\fP isn\(aqt given, it will be put in a default location |
| 13149 |
(\fB<dest>/.hg/shamap\fP by default). The \fBREVMAP\fP is a simple |
| 13150 |
text file that maps each source commit ID to the destination ID |
| 13151 |
for that revision, like so: |
| 13152 |
.sp |
| 13153 |
.nf |
| 13154 |
.ft C |
| 13155 |
<source ID> <destination ID> |
| 13156 |
.ft P |
| 13157 |
.fi |
| 13158 |
.sp |
| 13159 |
If the file doesn\(aqt exist, it\(aqs automatically created. It\(aqs |
| 13160 |
updated on each commit copied, so \%\fBhg convert\fP\: can be interrupted |
| 13161 |
and can be run repeatedly to copy new commits. |
| 13162 |
.sp |
| 13163 |
The authormap is a simple text file that maps each source commit |
| 13164 |
author to a destination commit author. It is handy for source SCMs |
| 13165 |
that use unix logins to identify authors (e.g.: CVS). One line per |
| 13166 |
author mapping and the line format is: |
| 13167 |
.sp |
| 13168 |
.nf |
| 13169 |
.ft C |
| 13170 |
source author = destination author |
| 13171 |
.ft P |
| 13172 |
.fi |
| 13173 |
.sp |
| 13174 |
Empty lines and lines starting with a \fB#\fP are ignored. |
| 13175 |
.sp |
| 13176 |
The filemap is a file that allows filtering and remapping of files |
| 13177 |
and directories. Each line can contain one of the following |
| 13178 |
directives: |
| 13179 |
.sp |
| 13180 |
.nf |
| 13181 |
.ft C |
| 13182 |
include path/to/file\-or\-dir |
| 13183 |
|
| 13184 |
exclude path/to/file\-or\-dir |
| 13185 |
|
| 13186 |
rename path/to/source path/to/destination |
| 13187 |
.ft P |
| 13188 |
.fi |
| 13189 |
.sp |
| 13190 |
Comment lines start with \fB#\fP. A specified path matches if it |
| 13191 |
equals the full relative name of a file or one of its parent |
| 13192 |
directories. The \fBinclude\fP or \fBexclude\fP directive with the |
| 13193 |
longest matching path applies, so line order does not matter. |
| 13194 |
.sp |
| 13195 |
The \fBinclude\fP directive causes a file, or all files under a |
| 13196 |
directory, to be included in the destination repository. The default |
| 13197 |
if there are no \fBinclude\fP statements is to include everything. |
| 13198 |
If there are any \fBinclude\fP statements, nothing else is included. |
| 13199 |
The \fBexclude\fP directive causes files or directories to |
| 13200 |
be omitted. The \fBrename\fP directive renames a file or directory if |
| 13201 |
it is converted. To rename from a subdirectory into the root of |
| 13202 |
the repository, use \fB.\fP as the path to rename to. |
| 13203 |
.sp |
| 13204 |
\fB\-\-full\fP will make sure the converted changesets contain exactly |
| 13205 |
the right files with the right content. It will make a full |
| 13206 |
conversion of all files, not just the ones that have |
| 13207 |
changed. Files that already are correct will not be changed. This |
| 13208 |
can be used to apply filemap changes when converting |
| 13209 |
incrementally. This is currently only supported for Mercurial and |
| 13210 |
Subversion. |
| 13211 |
.sp |
| 13212 |
The splicemap is a file that allows insertion of synthetic |
| 13213 |
history, letting you specify the parents of a revision. This is |
| 13214 |
useful if you want to e.g. give a Subversion merge two parents, or |
| 13215 |
graft two disconnected series of history together. Each entry |
| 13216 |
contains a key, followed by a space, followed by one or two |
| 13217 |
comma\-separated values: |
| 13218 |
.sp |
| 13219 |
.nf |
| 13220 |
.ft C |
| 13221 |
key parent1, parent2 |
| 13222 |
.ft P |
| 13223 |
.fi |
| 13224 |
.sp |
| 13225 |
The key is the revision ID in the source |
| 13226 |
revision control system whose parents should be modified (same |
| 13227 |
format as a key in .hg/shamap). The values are the revision IDs |
| 13228 |
(in either the source or destination revision control system) that |
| 13229 |
should be used as the new parents for that node. For example, if |
| 13230 |
you have merged "release\-1.0" into "trunk", then you should |
| 13231 |
specify the revision on "trunk" as the first parent and the one on |
| 13232 |
the "release\-1.0" branch as the second. |
| 13233 |
.sp |
| 13234 |
The branchmap is a file that allows you to rename a branch when it is |
| 13235 |
being brought in from whatever external repository. When used in |
| 13236 |
conjunction with a splicemap, it allows for a powerful combination |
| 13237 |
to help fix even the most badly mismanaged repositories and turn them |
| 13238 |
into nicely structured Mercurial repositories. The branchmap contains |
| 13239 |
lines of the form: |
| 13240 |
.sp |
| 13241 |
.nf |
| 13242 |
.ft C |
| 13243 |
original_branch_name new_branch_name |
| 13244 |
.ft P |
| 13245 |
.fi |
| 13246 |
.sp |
| 13247 |
where "original_branch_name" is the name of the branch in the |
| 13248 |
source repository, and "new_branch_name" is the name of the branch |
| 13249 |
is the destination repository. No whitespace is allowed in the new |
| 13250 |
branch name. This can be used to (for instance) move code in one |
| 13251 |
repository from "default" to a named branch. |
| 13252 |
.SS Mercurial Source |
| 13253 |
.sp |
| 13254 |
The Mercurial source recognizes the following configuration |
| 13255 |
options, which you can set on the command line with \fB\-\-config\fP: |
| 13256 |
.INDENT 0.0 |
| 13257 |
.TP |
| 13258 |
.B convert.hg.ignoreerrors |
| 13259 |
. |
| 13260 |
ignore integrity errors when reading. |
| 13261 |
Use it to fix Mercurial repositories with missing revlogs, by |
| 13262 |
converting from and to Mercurial. Default is False. |
| 13263 |
.TP |
| 13264 |
.B convert.hg.saverev |
| 13265 |
. |
| 13266 |
store original revision ID in changeset |
| 13267 |
(forces target IDs to change). It takes a boolean argument and |
| 13268 |
defaults to False. |
| 13269 |
.TP |
| 13270 |
.B convert.hg.startrev |
| 13271 |
. |
| 13272 |
specify the initial Mercurial revision. |
| 13273 |
The default is 0. |
| 13274 |
.TP |
| 13275 |
.B convert.hg.revs |
| 13276 |
. |
| 13277 |
revset specifying the source revisions to convert. |
| 13278 |
.UNINDENT |
| 13279 |
.SS Bazaar Source |
| 13280 |
.sp |
| 13281 |
The following options can be used with \fB\-\-config\fP: |
| 13282 |
.INDENT 0.0 |
| 13283 |
.TP |
| 13284 |
.B convert.bzr.saverev |
| 13285 |
. |
| 13286 |
whether to store the original Bazaar commit ID in |
| 13287 |
the metadata of the destination commit. The default is True. |
| 13288 |
.UNINDENT |
| 13289 |
.SS CVS Source |
| 13290 |
.sp |
| 13291 |
CVS source will use a sandbox (i.e. a checked\-out copy) from CVS |
| 13292 |
to indicate the starting point of what will be converted. Direct |
| 13293 |
access to the repository files is not needed, unless of course the |
| 13294 |
repository is \fB:local:\fP. The conversion uses the top level |
| 13295 |
directory in the sandbox to find the CVS repository, and then uses |
| 13296 |
CVS rlog commands to find files to convert. This means that unless |
| 13297 |
a filemap is given, all files under the starting directory will be |
| 13298 |
converted, and that any directory reorganization in the CVS |
| 13299 |
sandbox is ignored. |
| 13300 |
.sp |
| 13301 |
The following options can be used with \fB\-\-config\fP: |
| 13302 |
.INDENT 0.0 |
| 13303 |
.TP |
| 13304 |
.B convert.cvsps.cache |
| 13305 |
. |
| 13306 |
Set to False to disable remote log caching, |
| 13307 |
for testing and debugging purposes. Default is True. |
| 13308 |
.TP |
| 13309 |
.B convert.cvsps.fuzz |
| 13310 |
. |
| 13311 |
Specify the maximum time (in seconds) that is |
| 13312 |
allowed between commits with identical user and log message in |
| 13313 |
a single changeset. When very large files were checked in as |
| 13314 |
part of a changeset then the default may not be long enough. |
| 13315 |
The default is 60. |
| 13316 |
.TP |
| 13317 |
.B convert.cvsps.logencoding |
| 13318 |
. |
| 13319 |
Specify encoding name to be used for |
| 13320 |
transcoding CVS log messages. Multiple encoding names can be |
| 13321 |
specified as a list (see \%\fBhg help config.Syntax\fP\:), but only |
| 13322 |
the first acceptable encoding in the list is used per CVS log |
| 13323 |
entries. This transcoding is executed before cvslog hook below. |
| 13324 |
.TP |
| 13325 |
.B convert.cvsps.mergeto |
| 13326 |
. |
| 13327 |
Specify a regular expression to which |
| 13328 |
commit log messages are matched. If a match occurs, then the |
| 13329 |
conversion process will insert a dummy revision merging the |
| 13330 |
branch on which this log message occurs to the branch |
| 13331 |
indicated in the regex. Default is \fB{{mergetobranch |
| 13332 |
([\-\ew]+)}}\fP |
| 13333 |
.TP |
| 13334 |
.B convert.cvsps.mergefrom |
| 13335 |
. |
| 13336 |
Specify a regular expression to which |
| 13337 |
commit log messages are matched. If a match occurs, then the |
| 13338 |
conversion process will add the most recent revision on the |
| 13339 |
branch indicated in the regex as the second parent of the |
| 13340 |
changeset. Default is \fB{{mergefrombranch ([\-\ew]+)}}\fP |
| 13341 |
.TP |
| 13342 |
.B convert.localtimezone |
| 13343 |
. |
| 13344 |
use local time (as determined by the TZ |
| 13345 |
environment variable) for changeset date/times. The default |
| 13346 |
is False (use UTC). |
| 13347 |
.TP |
| 13348 |
.B hooks.cvslog |
| 13349 |
. |
| 13350 |
Specify a Python function to be called at the end of |
| 13351 |
gathering the CVS log. The function is passed a list with the |
| 13352 |
log entries, and can modify the entries in\-place, or add or |
| 13353 |
delete them. |
| 13354 |
.TP |
| 13355 |
.B hooks.cvschangesets |
| 13356 |
. |
| 13357 |
Specify a Python function to be called after |
| 13358 |
the changesets are calculated from the CVS log. The |
| 13359 |
function is passed a list with the changeset entries, and can |
| 13360 |
modify the changesets in\-place, or add or delete them. |
| 13361 |
.UNINDENT |
| 13362 |
.sp |
| 13363 |
An additional "debugcvsps" Mercurial command allows the builtin |
| 13364 |
changeset merging code to be run without doing a conversion. Its |
| 13365 |
parameters and output are similar to that of cvsps 2.1. Please see |
| 13366 |
the command help for more details. |
| 13367 |
.SS Subversion Source |
| 13368 |
.sp |
| 13369 |
Subversion source detects classical trunk/branches/tags layouts. |
| 13370 |
By default, the supplied \fBsvn://repo/path/\fP source URL is |
| 13371 |
converted as a single branch. If \fBsvn://repo/path/trunk\fP exists |
| 13372 |
it replaces the default branch. If \fBsvn://repo/path/branches\fP |
| 13373 |
exists, its subdirectories are listed as possible branches. If |
| 13374 |
\fBsvn://repo/path/tags\fP exists, it is looked for tags referencing |
| 13375 |
converted branches. Default \fBtrunk\fP, \fBbranches\fP and \fBtags\fP |
| 13376 |
values can be overridden with following options. Set them to paths |
| 13377 |
relative to the source URL, or leave them blank to disable auto |
| 13378 |
detection. |
| 13379 |
.sp |
| 13380 |
The following options can be set with \fB\-\-config\fP: |
| 13381 |
.INDENT 0.0 |
| 13382 |
.TP |
| 13383 |
.B convert.svn.branches |
| 13384 |
. |
| 13385 |
specify the directory containing branches. |
| 13386 |
The default is \fBbranches\fP. |
| 13387 |
.TP |
| 13388 |
.B convert.svn.tags |
| 13389 |
. |
| 13390 |
specify the directory containing tags. The |
| 13391 |
default is \fBtags\fP. |
| 13392 |
.TP |
| 13393 |
.B convert.svn.trunk |
| 13394 |
. |
| 13395 |
specify the name of the trunk branch. The |
| 13396 |
default is \fBtrunk\fP. |
| 13397 |
.TP |
| 13398 |
.B convert.localtimezone |
| 13399 |
. |
| 13400 |
use local time (as determined by the TZ |
| 13401 |
environment variable) for changeset date/times. The default |
| 13402 |
is False (use UTC). |
| 13403 |
.UNINDENT |
| 13404 |
.sp |
| 13405 |
Source history can be retrieved starting at a specific revision, |
| 13406 |
instead of being integrally converted. Only single branch |
| 13407 |
conversions are supported. |
| 13408 |
.INDENT 0.0 |
| 13409 |
.TP |
| 13410 |
.B convert.svn.startrev |
| 13411 |
. |
| 13412 |
specify start Subversion revision number. |
| 13413 |
The default is 0. |
| 13414 |
.UNINDENT |
| 13415 |
.SS Git Source |
| 13416 |
.sp |
| 13417 |
The Git importer converts commits from all reachable branches (refs |
| 13418 |
in refs/heads) and remotes (refs in refs/remotes) to Mercurial. |
| 13419 |
Branches are converted to bookmarks with the same name, with the |
| 13420 |
leading \(aqrefs/heads\(aq stripped. Git submodules are converted to Git |
| 13421 |
subrepos in Mercurial. |
| 13422 |
.sp |
| 13423 |
The following options can be set with \fB\-\-config\fP: |
| 13424 |
.INDENT 0.0 |
| 13425 |
.TP |
| 13426 |
.B convert.git.similarity |
| 13427 |
. |
| 13428 |
specify how similar files modified in a |
| 13429 |
commit must be to be imported as renames or copies, as a |
| 13430 |
percentage between \fB0\fP (disabled) and \fB100\fP (files must be |
| 13431 |
identical). For example, \fB90\fP means that a delete/add pair will |
| 13432 |
be imported as a rename if more than 90% of the file hasn\(aqt |
| 13433 |
changed. The default is \fB50\fP. |
| 13434 |
.TP |
| 13435 |
.B convert.git.findcopiesharder |
| 13436 |
. |
| 13437 |
while detecting copies, look at all |
| 13438 |
files in the working copy instead of just changed ones. This |
| 13439 |
is very expensive for large projects, and is only effective when |
| 13440 |
\fBconvert.git.similarity\fP is greater than 0. The default is False. |
| 13441 |
.TP |
| 13442 |
.B convert.git.renamelimit |
| 13443 |
. |
| 13444 |
perform rename and copy detection up to this |
| 13445 |
many changed files in a commit. Increasing this will make rename |
| 13446 |
and copy detection more accurate but will significantly slow down |
| 13447 |
computation on large projects. The option is only relevant if |
| 13448 |
\fBconvert.git.similarity\fP is greater than 0. The default is |
| 13449 |
\fB400\fP. |
| 13450 |
.TP |
| 13451 |
.B convert.git.committeractions |
| 13452 |
. |
| 13453 |
list of actions to take when processing |
| 13454 |
author and committer values. |
| 13455 |
.sp |
| 13456 |
Git commits have separate author (who wrote the commit) and committer |
| 13457 |
(who applied the commit) fields. Not all destinations support separate |
| 13458 |
author and committer fields (including Mercurial). This config option |
| 13459 |
controls what to do with these author and committer fields during |
| 13460 |
conversion. |
| 13461 |
.sp |
| 13462 |
A value of \fBmessagedifferent\fP will append a \fBcommitter: ...\fP |
| 13463 |
line to the commit message if the Git committer is different from the |
| 13464 |
author. The prefix of that line can be specified using the syntax |
| 13465 |
\fBmessagedifferent=<prefix>\fP. e.g. \fBmessagedifferent=git\-committer:\fP. |
| 13466 |
When a prefix is specified, a space will always be inserted between the |
| 13467 |
prefix and the value. |
| 13468 |
.sp |
| 13469 |
\fBmessagealways\fP behaves like \fBmessagedifferent\fP except it will |
| 13470 |
always result in a \fBcommitter: ...\fP line being appended to the commit |
| 13471 |
message. This value is mutually exclusive with \fBmessagedifferent\fP. |
| 13472 |
.sp |
| 13473 |
\fBdropcommitter\fP will remove references to the committer. Only |
| 13474 |
references to the author will remain. Actions that add references |
| 13475 |
to the committer will have no effect when this is set. |
| 13476 |
.sp |
| 13477 |
\fBreplaceauthor\fP will replace the value of the author field with |
| 13478 |
the committer. Other actions that add references to the committer |
| 13479 |
will still take effect when this is set. |
| 13480 |
.sp |
| 13481 |
The default is \fBmessagedifferent\fP. |
| 13482 |
.TP |
| 13483 |
.B convert.git.extrakeys |
| 13484 |
. |
| 13485 |
list of extra keys from commit metadata to copy to |
| 13486 |
the destination. Some Git repositories store extra metadata in commits. |
| 13487 |
By default, this non\-default metadata will be lost during conversion. |
| 13488 |
Setting this config option can retain that metadata. Some built\-in |
| 13489 |
keys such as \fBparent\fP and \fBbranch\fP are not allowed to be copied. |
| 13490 |
.TP |
| 13491 |
.B convert.git.remoteprefix |
| 13492 |
. |
| 13493 |
remote refs are converted as bookmarks with |
| 13494 |
\fBconvert.git.remoteprefix\fP as a prefix followed by a /. The default |
| 13495 |
is \(aqremote\(aq. |
| 13496 |
.TP |
| 13497 |
.B convert.git.saverev |
| 13498 |
. |
| 13499 |
whether to store the original Git commit ID in the |
| 13500 |
metadata of the destination commit. The default is True. |
| 13501 |
.TP |
| 13502 |
.B convert.git.skipsubmodules |
| 13503 |
. |
| 13504 |
does not convert root level .gitmodules files |
| 13505 |
or files with 160000 mode indicating a submodule. Default is False. |
| 13506 |
.UNINDENT |
| 13507 |
.SS Perforce Source |
| 13508 |
.sp |
| 13509 |
The Perforce (P4) importer can be given a p4 depot path or a |
| 13510 |
client specification as source. It will convert all files in the |
| 13511 |
source to a flat Mercurial repository, ignoring labels, branches |
| 13512 |
and integrations. Note that when a depot path is given you then |
| 13513 |
usually should specify a target directory, because otherwise the |
| 13514 |
target may be named \fB...\-hg\fP. |
| 13515 |
.sp |
| 13516 |
The following options can be set with \fB\-\-config\fP: |
| 13517 |
.INDENT 0.0 |
| 13518 |
.TP |
| 13519 |
.B convert.p4.encoding |
| 13520 |
. |
| 13521 |
specify the encoding to use when decoding standard |
| 13522 |
output of the Perforce command line tool. The default is default system |
| 13523 |
encoding. |
| 13524 |
.TP |
| 13525 |
.B convert.p4.startrev |
| 13526 |
. |
| 13527 |
specify initial Perforce revision (a |
| 13528 |
Perforce changelist number). |
| 13529 |
.UNINDENT |
| 13530 |
.SS Mercurial Destination |
| 13531 |
.sp |
| 13532 |
The Mercurial destination will recognize Mercurial subrepositories in the |
| 13533 |
destination directory, and update the .hgsubstate file automatically if the |
| 13534 |
destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
| 13535 |
Converting a repository with subrepositories requires converting a single |
| 13536 |
repository at a time, from the bottom up. |
| 13537 |
.sp |
| 13538 |
An example showing how to convert a repository with subrepositories: |
| 13539 |
.sp |
| 13540 |
.nf |
| 13541 |
.ft C |
| 13542 |
# so convert knows the type when it sees a non empty destination |
| 13543 |
$ hg init converted |
| 13544 |
|
| 13545 |
$ hg convert orig/sub1 converted/sub1 |
| 13546 |
$ hg convert orig/sub2 converted/sub2 |
| 13547 |
$ hg convert orig converted |
| 13548 |
.ft P |
| 13549 |
.fi |
| 13550 |
.sp |
| 13551 |
The following options are supported: |
| 13552 |
.INDENT 0.0 |
| 13553 |
.TP |
| 13554 |
.B convert.hg.clonebranches |
| 13555 |
. |
| 13556 |
dispatch source branches in separate |
| 13557 |
clones. The default is False. |
| 13558 |
.TP |
| 13559 |
.B convert.hg.tagsbranch |
| 13560 |
. |
| 13561 |
branch name for tag revisions, defaults to |
| 13562 |
\fBdefault\fP. |
| 13563 |
.TP |
| 13564 |
.B convert.hg.usebranchnames |
| 13565 |
. |
| 13566 |
preserve branch names. The default is |
| 13567 |
True. |
| 13568 |
.TP |
| 13569 |
.B convert.hg.sourcename |
| 13570 |
. |
| 13571 |
records the given string as a \(aqconvert_source\(aq extra |
| 13572 |
value on each commit made in the target repository. The default is None. |
| 13573 |
.TP |
| 13574 |
.B convert.hg.preserve\-hash |
| 13575 |
. |
| 13576 |
only works with mercurial sources. Make convert |
| 13577 |
prevent performance improvement to the list of modified files in commits |
| 13578 |
when such an improvement would cause the hash of a commit to change. |
| 13579 |
The default is False. |
| 13580 |
.UNINDENT |
| 13581 |
.SS All Destinations |
| 13582 |
.sp |
| 13583 |
All destination types accept the following options: |
| 13584 |
.INDENT 0.0 |
| 13585 |
.TP |
| 13586 |
.B convert.skiptags |
| 13587 |
. |
| 13588 |
does not convert tags from the source repo to the target |
| 13589 |
repo. The default is False. |
| 13590 |
.UNINDENT |
| 13591 |
.SS Subversion Destination |
| 13592 |
.sp |
| 13593 |
Original commit dates are not preserved by default. |
| 13594 |
.INDENT 0.0 |
| 13595 |
.TP |
| 13596 |
.B convert.svn.dangerous\-set\-commit\-dates |
| 13597 |
. |
| 13598 |
preserve original commit dates, |
| 13599 |
forcefully setting \fBsvn:date\fP revision properties. This option is |
| 13600 |
DANGEROUS and may break some subversion functionality for the resulting |
| 13601 |
repository (e.g. filtering revisions with date ranges in \fBsvn log\fP), |
| 13602 |
as original commit dates are not guaranteed to be monotonically |
| 13603 |
increasing. |
| 13604 |
.UNINDENT |
| 13605 |
.sp |
| 13606 |
For commit dates setting to work destination repository must have |
| 13607 |
\fBpre\-revprop\-change\fP hook configured to allow setting of \fBsvn:date\fP |
| 13608 |
revision properties. See Subversion documentation for more details. |
| 13609 |
.sp |
| 13610 |
Options: |
| 13611 |
.INDENT 0.0 |
| 13612 |
.TP |
| 13613 |
.BI \-\-authors \ <FILE> |
| 13614 |
. |
| 13615 |
username mapping filename (DEPRECATED) (use \-\-authormap instead) |
| 13616 |
.TP |
| 13617 |
.BI \-s, \-\-source\-type \ <TYPE> |
| 13618 |
. |
| 13619 |
source repository type |
| 13620 |
.TP |
| 13621 |
.BI \-d, \-\-dest\-type \ <TYPE> |
| 13622 |
. |
| 13623 |
destination repository type |
| 13624 |
.TP |
| 13625 |
.BI \-r, \-\-rev \ <REV[+]> |
| 13626 |
. |
| 13627 |
import up to source revision REV |
| 13628 |
.TP |
| 13629 |
.BI \-A, \-\-authormap \ <FILE> |
| 13630 |
. |
| 13631 |
remap usernames using this file |
| 13632 |
.TP |
| 13633 |
.BI \-\-filemap \ <FILE> |
| 13634 |
. |
| 13635 |
remap file names using contents of file |
| 13636 |
.TP |
| 13637 |
.B \-\-full |
| 13638 |
. |
| 13639 |
apply filemap changes by converting all files again |
| 13640 |
.TP |
| 13641 |
.BI \-\-splicemap \ <FILE> |
| 13642 |
. |
| 13643 |
splice synthesized history into place |
| 13644 |
.TP |
| 13645 |
.BI \-\-branchmap \ <FILE> |
| 13646 |
. |
| 13647 |
change branch names while converting |
| 13648 |
.TP |
| 13649 |
.B \-\-branchsort |
| 13650 |
. |
| 13651 |
try to sort changesets by branches |
| 13652 |
.TP |
| 13653 |
.B \-\-datesort |
| 13654 |
. |
| 13655 |
try to sort changesets by date |
| 13656 |
.TP |
| 13657 |
.B \-\-sourcesort |
| 13658 |
. |
| 13659 |
preserve source changesets order |
| 13660 |
.TP |
| 13661 |
.B \-\-closesort |
| 13662 |
. |
| 13663 |
try to reorder closed revisions |
| 13664 |
.UNINDENT |
| 13665 |
.sp |
| 13666 |
[+] marked option can be specified multiple times |
| 13667 |
.SS eol |
| 13668 |
.sp |
| 13669 |
automatically manage newlines in repository files |
| 13670 |
.sp |
| 13671 |
This extension allows you to manage the type of line endings (CRLF or |
| 13672 |
LF) that are used in the repository and in the local working |
| 13673 |
directory. That way you can get CRLF line endings on Windows and LF on |
| 13674 |
Unix/Mac, thereby letting everybody use their OS native line endings. |
| 13675 |
.sp |
| 13676 |
The extension reads its configuration from a versioned \fB.hgeol\fP |
| 13677 |
configuration file found in the root of the working directory. The |
| 13678 |
\fB.hgeol\fP file use the same syntax as all other Mercurial |
| 13679 |
configuration files. It uses two sections, \fB[patterns]\fP and |
| 13680 |
\fB[repository]\fP. |
| 13681 |
.sp |
| 13682 |
The \fB[patterns]\fP section specifies how line endings should be |
| 13683 |
converted between the working directory and the repository. The format is |
| 13684 |
specified by a file pattern. The first match is used, so put more |
| 13685 |
specific patterns first. The available line endings are \fBLF\fP, |
| 13686 |
\fBCRLF\fP, and \fBBIN\fP. |
| 13687 |
.sp |
| 13688 |
Files with the declared format of \fBCRLF\fP or \fBLF\fP are always |
| 13689 |
checked out and stored in the repository in that format and files |
| 13690 |
declared to be binary (\fBBIN\fP) are left unchanged. Additionally, |
| 13691 |
\fBnative\fP is an alias for checking out in the platform\(aqs default line |
| 13692 |
ending: \fBLF\fP on Unix (including Mac OS X) and \fBCRLF\fP on |
| 13693 |
Windows. Note that \fBBIN\fP (do nothing to line endings) is Mercurial\(aqs |
| 13694 |
default behavior; it is only needed if you need to override a later, |
| 13695 |
more general pattern. |
| 13696 |
.sp |
| 13697 |
The optional \fB[repository]\fP section specifies the line endings to |
| 13698 |
use for files stored in the repository. It has a single setting, |
| 13699 |
\fBnative\fP, which determines the storage line endings for files |
| 13700 |
declared as \fBnative\fP in the \fB[patterns]\fP section. It can be set to |
| 13701 |
\fBLF\fP or \fBCRLF\fP. The default is \fBLF\fP. For example, this means |
| 13702 |
that on Windows, files configured as \fBnative\fP (\fBCRLF\fP by default) |
| 13703 |
will be converted to \fBLF\fP when stored in the repository. Files |
| 13704 |
declared as \fBLF\fP, \fBCRLF\fP, or \fBBIN\fP in the \fB[patterns]\fP section |
| 13705 |
are always stored as\-is in the repository. |
| 13706 |
.sp |
| 13707 |
Example versioned \fB.hgeol\fP file: |
| 13708 |
.sp |
| 13709 |
.nf |
| 13710 |
.ft C |
| 13711 |
[patterns] |
| 13712 |
**.py = native |
| 13713 |
**.vcproj = CRLF |
| 13714 |
**.txt = native |
| 13715 |
Makefile = LF |
| 13716 |
**.jpg = BIN |
| 13717 |
|
| 13718 |
[repository] |
| 13719 |
native = LF |
| 13720 |
.ft P |
| 13721 |
.fi |
| 13722 |
.IP Note |
| 13723 |
. |
| 13724 |
The rules will first apply when files are touched in the working |
| 13725 |
directory, e.g. by updating to null and back to tip to touch all files. |
| 13726 |
.RE |
| 13727 |
.sp |
| 13728 |
The extension uses an optional \fB[eol]\fP section read from both the |
| 13729 |
normal Mercurial configuration files and the \fB.hgeol\fP file, with the |
| 13730 |
latter overriding the former. You can use that section to control the |
| 13731 |
overall behavior. There are three settings: |
| 13732 |
.INDENT 0.0 |
| 13733 |
.IP \(bu 2 |
| 13734 |
. |
| 13735 |
\fBeol.native\fP (default \fBos.linesep\fP) can be set to \fBLF\fP or |
| 13736 |
\fBCRLF\fP to override the default interpretation of \fBnative\fP for |
| 13737 |
checkout. This can be used with \%\fBhg archive\fP\: on Unix, say, to |
| 13738 |
generate an archive where files have line endings for Windows. |
| 13739 |
.IP \(bu 2 |
| 13740 |
. |
| 13741 |
\fBeol.only\-consistent\fP (default True) can be set to False to make |
| 13742 |
the extension convert files with inconsistent EOLs. Inconsistent |
| 13743 |
means that there is both \fBCRLF\fP and \fBLF\fP present in the file. |
| 13744 |
Such files are normally not touched under the assumption that they |
| 13745 |
have mixed EOLs on purpose. |
| 13746 |
.IP \(bu 2 |
| 13747 |
. |
| 13748 |
\fBeol.fix\-trailing\-newline\fP (default False) can be set to True to |
| 13749 |
ensure that converted files end with a EOL character (either \fB\en\fP |
| 13750 |
or \fB\er\en\fP as per the configured patterns). |
| 13751 |
.UNINDENT |
| 13752 |
.sp |
| 13753 |
The extension provides \fBcleverencode:\fP and \fBcleverdecode:\fP filters |
| 13754 |
like the deprecated win32text extension does. This means that you can |
| 13755 |
disable win32text and enable eol and your filters will still work. You |
| 13756 |
only need to these filters until you have prepared a \fB.hgeol\fP file. |
| 13757 |
.sp |
| 13758 |
The \fBwin32text.forbid*\fP hooks provided by the win32text extension |
| 13759 |
have been unified into a single hook named \fBeol.checkheadshook\fP. The |
| 13760 |
hook will lookup the expected line endings from the \fB.hgeol\fP file, |
| 13761 |
which means you must migrate to a \fB.hgeol\fP file first before using |
| 13762 |
the hook. \fBeol.checkheadshook\fP only checks heads, intermediate |
| 13763 |
invalid revisions will be pushed. To forbid them completely, use the |
| 13764 |
\fBeol.checkallhook\fP hook. These hooks are best used as |
| 13765 |
\fBpretxnchangegroup\fP hooks. |
| 13766 |
.sp |
| 13767 |
See \%\fBhg help patterns\fP\: for more information about the glob patterns |
| 13768 |
used. |
| 13769 |
.SS extdiff |
| 13770 |
.sp |
| 13771 |
command to allow external programs to compare revisions |
| 13772 |
.sp |
| 13773 |
The extdiff Mercurial extension allows you to use external programs |
| 13774 |
to compare revisions, or revision with working directory. The external |
| 13775 |
diff programs are called with a configurable set of options and two |
| 13776 |
non\-option arguments: paths to directories containing snapshots of |
| 13777 |
files to compare. |
| 13778 |
.sp |
| 13779 |
If there is more than one file being compared and the "child" revision |
| 13780 |
is the working directory, any modifications made in the external diff |
| 13781 |
program will be copied back to the working directory from the temporary |
| 13782 |
directory. |
| 13783 |
.sp |
| 13784 |
The extdiff extension also allows you to configure new diff commands, so |
| 13785 |
you do not need to type \%\fBhg extdiff \-p kdiff3\fP\: always. |
| 13786 |
.sp |
| 13787 |
.nf |
| 13788 |
.ft C |
| 13789 |
[extdiff] |
| 13790 |
# add new command that runs GNU diff(1) in \(aqcontext diff\(aq mode |
| 13791 |
cdiff = gdiff \-Nprc5 |
| 13792 |
## or the old way: |
| 13793 |
#cmd.cdiff = gdiff |
| 13794 |
#opts.cdiff = \-Nprc5 |
| 13795 |
|
| 13796 |
# add new command called meld, runs meld (no need to name twice). If |
| 13797 |
# the meld executable is not available, the meld tool in [merge\-tools] |
| 13798 |
# will be used, if available |
| 13799 |
meld = |
| 13800 |
|
| 13801 |
# add new command called vimdiff, runs gvimdiff with DirDiff plugin |
| 13802 |
# (see http://www.vim.org/scripts/script.php?script_id=102) Non |
| 13803 |
# English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
| 13804 |
# your .vimrc |
| 13805 |
vimdiff = gvim \-f "+next" \e |
| 13806 |
"+execute \(aqDirDiff\(aq fnameescape(argv(0)) fnameescape(argv(1))" |
| 13807 |
.ft P |
| 13808 |
.fi |
| 13809 |
.sp |
| 13810 |
Tool arguments can include variables that are expanded at runtime: |
| 13811 |
.sp |
| 13812 |
.nf |
| 13813 |
.ft C |
| 13814 |
$parent1, $plabel1 \- filename, descriptive label of first parent |
| 13815 |
$child, $clabel \- filename, descriptive label of child revision |
| 13816 |
$parent2, $plabel2 \- filename, descriptive label of second parent |
| 13817 |
$root \- repository root |
| 13818 |
$parent is an alias for $parent1. |
| 13819 |
.ft P |
| 13820 |
.fi |
| 13821 |
.sp |
| 13822 |
The extdiff extension will look in your [diff\-tools] and [merge\-tools] |
| 13823 |
sections for diff tool arguments, when none are specified in [extdiff]. |
| 13824 |
.sp |
| 13825 |
.nf |
| 13826 |
.ft C |
| 13827 |
[extdiff] |
| 13828 |
kdiff3 = |
| 13829 |
|
| 13830 |
[diff\-tools] |
| 13831 |
kdiff3.diffargs=\-\-L1 \(aq$plabel1\(aq \-\-L2 \(aq$clabel\(aq $parent $child |
| 13832 |
.ft P |
| 13833 |
.fi |
| 13834 |
.sp |
| 13835 |
If a program has a graphical interface, it might be interesting to tell |
| 13836 |
Mercurial about it. It will prevent the program from being mistakenly |
| 13837 |
used in a terminal\-only environment (such as an SSH terminal session), |
| 13838 |
and will make \%\fBhg extdiff \-\-per\-file\fP\: open multiple file diffs at once |
| 13839 |
instead of one by one (if you still want to open file diffs one by one, |
| 13840 |
you can use the \-\-confirm option). |
| 13841 |
.sp |
| 13842 |
Declaring that a tool has a graphical interface can be done with the |
| 13843 |
\fBgui\fP flag next to where \fBdiffargs\fP are specified: |
| 13844 |
.sp |
| 13845 |
.nf |
| 13846 |
.ft C |
| 13847 |
[diff\-tools] |
| 13848 |
kdiff3.diffargs=\-\-L1 \(aq$plabel1\(aq \-\-L2 \(aq$clabel\(aq $parent $child |
| 13849 |
kdiff3.gui = true |
| 13850 |
.ft P |
| 13851 |
.fi |
| 13852 |
.sp |
| 13853 |
You can use \-I/\-X and list of file or directory names like normal |
| 13854 |
\%\fBhg diff\fP\: command. The extdiff extension makes snapshots of only |
| 13855 |
needed files, so running the external diff program will actually be |
| 13856 |
pretty fast (at least faster than having to compare the entire tree). |
| 13857 |
.SS Commands |
| 13858 |
.SS File content management |
| 13859 |
.SS extdiff |
| 13860 |
.sp |
| 13861 |
use external program to diff repository (or selected files): |
| 13862 |
.sp |
| 13863 |
.nf |
| 13864 |
.ft C |
| 13865 |
hg extdiff [OPT]... [FILE]... |
| 13866 |
.ft P |
| 13867 |
.fi |
| 13868 |
.sp |
| 13869 |
Show differences between revisions for the specified files, using |
| 13870 |
an external program. The default program used is diff, with |
| 13871 |
default options "\-Npru". |
| 13872 |
.sp |
| 13873 |
To select a different program, use the \-p/\-\-program option. The |
| 13874 |
program will be passed the names of two directories to compare, |
| 13875 |
unless the \-\-per\-file option is specified (see below). To pass |
| 13876 |
additional options to the program, use \-o/\-\-option. These will be |
| 13877 |
passed before the names of the directories or files to compare. |
| 13878 |
.sp |
| 13879 |
The \-\-from, \-\-to, and \-\-change options work the same way they do for |
| 13880 |
\%\fBhg diff\fP\:. |
| 13881 |
.sp |
| 13882 |
The \-\-per\-file option runs the external program repeatedly on each |
| 13883 |
file to diff, instead of once on two directories. By default, |
| 13884 |
this happens one by one, where the next file diff is open in the |
| 13885 |
external program only once the previous external program (for the |
| 13886 |
previous file diff) has exited. If the external program has a |
| 13887 |
graphical interface, it can open all the file diffs at once instead |
| 13888 |
of one by one. See \%\fBhg help \-e extdiff\fP\: for information about how |
| 13889 |
to tell Mercurial that a given program has a graphical interface. |
| 13890 |
.sp |
| 13891 |
The \-\-confirm option will prompt the user before each invocation of |
| 13892 |
the external program. It is ignored if \-\-per\-file isn\(aqt specified. |
| 13893 |
.sp |
| 13894 |
Options: |
| 13895 |
.INDENT 0.0 |
| 13896 |
.TP |
| 13897 |
.BI \-p, \-\-program \ <CMD> |
| 13898 |
. |
| 13899 |
comparison program to run |
| 13900 |
.TP |
| 13901 |
.BI \-o, \-\-option \ <OPT[+]> |
| 13902 |
. |
| 13903 |
pass option to comparison program |
| 13904 |
.TP |
| 13905 |
.BI \-r, \-\-rev \ <REV[+]> |
| 13906 |
. |
| 13907 |
revision (DEPRECATED) |
| 13908 |
.TP |
| 13909 |
.BI \-\-from \ <REV1> |
| 13910 |
. |
| 13911 |
revision to diff from |
| 13912 |
.TP |
| 13913 |
.BI \-\-to \ <REV2> |
| 13914 |
. |
| 13915 |
revision to diff to |
| 13916 |
.TP |
| 13917 |
.BI \-c, \-\-change \ <REV> |
| 13918 |
. |
| 13919 |
change made by revision |
| 13920 |
.TP |
| 13921 |
.B \-\-per\-file |
| 13922 |
. |
| 13923 |
compare each file instead of revision snapshots |
| 13924 |
.TP |
| 13925 |
.B \-\-confirm |
| 13926 |
. |
| 13927 |
prompt user before each external program invocation |
| 13928 |
.TP |
| 13929 |
.B \-\-patch |
| 13930 |
. |
| 13931 |
compare patches for two revisions |
| 13932 |
.TP |
| 13933 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 13934 |
. |
| 13935 |
include names matching the given patterns |
| 13936 |
.TP |
| 13937 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 13938 |
. |
| 13939 |
exclude names matching the given patterns |
| 13940 |
.TP |
| 13941 |
.B \-S, \-\-subrepos |
| 13942 |
. |
| 13943 |
recurse into subrepositories |
| 13944 |
.UNINDENT |
| 13945 |
.sp |
| 13946 |
[+] marked option can be specified multiple times |
| 13947 |
.SS factotum |
| 13948 |
.sp |
| 13949 |
http authentication with factotum |
| 13950 |
.sp |
| 13951 |
This extension allows the factotum(4) facility on Plan 9 from Bell Labs |
| 13952 |
platforms to provide authentication information for HTTP access. Configuration |
| 13953 |
entries specified in the auth section as well as authentication information |
| 13954 |
provided in the repository URL are fully supported. If no prefix is specified, |
| 13955 |
a value of "*" will be assumed. |
| 13956 |
.sp |
| 13957 |
By default, keys are specified as: |
| 13958 |
.sp |
| 13959 |
.nf |
| 13960 |
.ft C |
| 13961 |
proto=pass service=hg prefix=<prefix> user=<username> !password=<password> |
| 13962 |
.ft P |
| 13963 |
.fi |
| 13964 |
.sp |
| 13965 |
If the factotum extension is unable to read the required key, one will be |
| 13966 |
requested interactively. |
| 13967 |
.sp |
| 13968 |
A configuration section is available to customize runtime behavior. By |
| 13969 |
default, these entries are: |
| 13970 |
.sp |
| 13971 |
.nf |
| 13972 |
.ft C |
| 13973 |
[factotum] |
| 13974 |
executable = /bin/auth/factotum |
| 13975 |
mountpoint = /mnt/factotum |
| 13976 |
service = hg |
| 13977 |
.ft P |
| 13978 |
.fi |
| 13979 |
.sp |
| 13980 |
The executable entry defines the full path to the factotum binary. The |
| 13981 |
mountpoint entry defines the path to the factotum file service. Lastly, the |
| 13982 |
service entry controls the service name used when reading keys. |
| 13983 |
.SS fastannotate |
| 13984 |
.sp |
| 13985 |
yet another annotate implementation that might be faster (EXPERIMENTAL) |
| 13986 |
.sp |
| 13987 |
The fastannotate extension provides a \(aqfastannotate\(aq command that makes |
| 13988 |
use of the linelog data structure as a cache layer and is expected to |
| 13989 |
be faster than the vanilla \(aqannotate\(aq if the cache is present. |
| 13990 |
.sp |
| 13991 |
In most cases, fastannotate requires a setup that mainbranch is some pointer |
| 13992 |
that always moves forward, to be most efficient. |
| 13993 |
.sp |
| 13994 |
Using fastannotate together with linkrevcache would speed up building the |
| 13995 |
annotate cache greatly. Run "debugbuildlinkrevcache" before |
| 13996 |
"debugbuildannotatecache". |
| 13997 |
.sp |
| 13998 |
.nf |
| 13999 |
.ft C |
| 14000 |
[fastannotate] |
| 14001 |
# specify the main branch head. the internal linelog will only contain |
| 14002 |
# the linear (ignoring p2) "mainbranch". since linelog cannot move |
| 14003 |
# backwards without a rebuild, this should be something that always moves |
| 14004 |
# forward, usually it is "master" or "@". |
| 14005 |
mainbranch = master |
| 14006 |
|
| 14007 |
# fastannotate supports different modes to expose its feature. |
| 14008 |
# a list of combination: |
| 14009 |
# \- fastannotate: expose the feature via the "fastannotate" command which |
| 14010 |
# deals with everything in a most efficient way, and provides extra |
| 14011 |
# features like \-\-deleted etc. |
| 14012 |
# \- fctx: replace fctx.annotate implementation. note: |
| 14013 |
# a. it is less efficient than the "fastannotate" command |
| 14014 |
# b. it will make it practically impossible to access the old (disk |
| 14015 |
# side\-effect free) annotate implementation |
| 14016 |
# c. it implies "hgweb". |
| 14017 |
# \- hgweb: replace hgweb\(aqs annotate implementation. conflict with "fctx". |
| 14018 |
# (default: fastannotate) |
| 14019 |
modes = fastannotate |
| 14020 |
|
| 14021 |
# default format when no format flags are used (default: number) |
| 14022 |
defaultformat = changeset, user, date |
| 14023 |
|
| 14024 |
# serve the annotate cache via wire protocol (default: False) |
| 14025 |
# tip: the .hg/fastannotate directory is portable \- can be rsynced |
| 14026 |
server = True |
| 14027 |
|
| 14028 |
# build annotate cache on demand for every client request (default: True) |
| 14029 |
# disabling it could make server response faster, useful when there is a |
| 14030 |
# cronjob building the cache. |
| 14031 |
serverbuildondemand = True |
| 14032 |
|
| 14033 |
# update local annotate cache from remote on demand |
| 14034 |
client = False |
| 14035 |
|
| 14036 |
# path to use when connecting to the remote server (default: default) |
| 14037 |
remotepath = default |
| 14038 |
|
| 14039 |
# minimal length of the history of a file required to fetch linelog from |
| 14040 |
# the server. (default: 10) |
| 14041 |
clientfetchthreshold = 10 |
| 14042 |
|
| 14043 |
# for "fctx" mode, always follow renames regardless of command line option. |
| 14044 |
# this is a BC with the original command but will reduced the space needed |
| 14045 |
# for annotate cache, and is useful for client\-server setup since the |
| 14046 |
# server will only provide annotate cache with default options (i.e. with |
| 14047 |
# follow). do not affect "fastannotate" mode. (default: True) |
| 14048 |
forcefollow = True |
| 14049 |
|
| 14050 |
# for "fctx" mode, always treat file as text files, to skip the "isbinary" |
| 14051 |
# check. this is consistent with the "fastannotate" command and could help |
| 14052 |
# to avoid a file fetch if remotefilelog is used. (default: True) |
| 14053 |
forcetext = True |
| 14054 |
|
| 14055 |
# use unfiltered repo for better performance. |
| 14056 |
unfilteredrepo = True |
| 14057 |
|
| 14058 |
# sacrifice correctness in some corner cases for performance. it does not |
| 14059 |
# affect the correctness of the annotate cache being built. the option |
| 14060 |
# is experimental and may disappear in the future (default: False) |
| 14061 |
perfhack = True |
| 14062 |
.ft P |
| 14063 |
.fi |
| 14064 |
.SS Commands |
| 14065 |
.SS fastexport |
| 14066 |
.sp |
| 14067 |
export repositories as git fast\-import stream |
| 14068 |
.SS Commands |
| 14069 |
.SS Change import/export |
| 14070 |
.SS fastexport |
| 14071 |
.sp |
| 14072 |
export repository as git fast\-import stream: |
| 14073 |
.sp |
| 14074 |
.nf |
| 14075 |
.ft C |
| 14076 |
hg fastexport [OPTION]... [REV]... |
| 14077 |
.ft P |
| 14078 |
.fi |
| 14079 |
.sp |
| 14080 |
This command lets you dump a repository as a human\-readable text stream. |
| 14081 |
It can be piped into corresponding import routines like "git fast\-import". |
| 14082 |
Incremental dumps can be created by using marks files. |
| 14083 |
.sp |
| 14084 |
Options: |
| 14085 |
.INDENT 0.0 |
| 14086 |
.TP |
| 14087 |
.BI \-r, \-\-rev \ <REV[+]> |
| 14088 |
. |
| 14089 |
revisions to export |
| 14090 |
.TP |
| 14091 |
.BI \-i, \-\-import\-marks \ <FILE> |
| 14092 |
. |
| 14093 |
old marks file to read |
| 14094 |
.TP |
| 14095 |
.BI \-e, \-\-export\-marks \ <FILE> |
| 14096 |
. |
| 14097 |
new marks file to write |
| 14098 |
.TP |
| 14099 |
.BI \-A, \-\-authormap \ <FILE> |
| 14100 |
. |
| 14101 |
remap usernames using this file |
| 14102 |
.UNINDENT |
| 14103 |
.sp |
| 14104 |
[+] marked option can be specified multiple times |
| 14105 |
.SS fetch |
| 14106 |
.sp |
| 14107 |
pull, update and merge in one command (DEPRECATED) |
| 14108 |
.SS Commands |
| 14109 |
.SS Remote repository management |
| 14110 |
.SS fetch |
| 14111 |
.sp |
| 14112 |
pull changes from a remote repository, merge new changes if needed.: |
| 14113 |
.sp |
| 14114 |
.nf |
| 14115 |
.ft C |
| 14116 |
hg fetch [SOURCE] |
| 14117 |
.ft P |
| 14118 |
.fi |
| 14119 |
.sp |
| 14120 |
This finds all changes from the repository at the specified path |
| 14121 |
or URL and adds them to the local repository. |
| 14122 |
.sp |
| 14123 |
If the pulled changes add a new branch head, the head is |
| 14124 |
automatically merged, and the result of the merge is committed. |
| 14125 |
Otherwise, the working directory is updated to include the new |
| 14126 |
changes. |
| 14127 |
.sp |
| 14128 |
When a merge is needed, the working directory is first updated to |
| 14129 |
the newly pulled changes. Local changes are then merged into the |
| 14130 |
pulled changes. To switch the merge order, use \-\-switch\-parent. |
| 14131 |
.sp |
| 14132 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 14133 |
.sp |
| 14134 |
Returns 0 on success. |
| 14135 |
.sp |
| 14136 |
Options: |
| 14137 |
.INDENT 0.0 |
| 14138 |
.TP |
| 14139 |
.BI \-r, \-\-rev \ <REV[+]> |
| 14140 |
. |
| 14141 |
a specific revision you would like to pull |
| 14142 |
.TP |
| 14143 |
.B \-\-edit |
| 14144 |
. |
| 14145 |
invoke editor on commit messages |
| 14146 |
.TP |
| 14147 |
.B \-\-force\-editor |
| 14148 |
. |
| 14149 |
edit commit message (DEPRECATED) |
| 14150 |
.TP |
| 14151 |
.B \-\-switch\-parent |
| 14152 |
. |
| 14153 |
switch parents when merging |
| 14154 |
.TP |
| 14155 |
.BI \-m, \-\-message \ <TEXT> |
| 14156 |
. |
| 14157 |
use text as commit message |
| 14158 |
.TP |
| 14159 |
.BI \-l, \-\-logfile \ <FILE> |
| 14160 |
. |
| 14161 |
read commit message from file |
| 14162 |
.TP |
| 14163 |
.BI \-d, \-\-date \ <DATE> |
| 14164 |
. |
| 14165 |
record the specified date as commit date |
| 14166 |
.TP |
| 14167 |
.BI \-u, \-\-user \ <USER> |
| 14168 |
. |
| 14169 |
record the specified user as committer |
| 14170 |
.TP |
| 14171 |
.BI \-e, \-\-ssh \ <CMD> |
| 14172 |
. |
| 14173 |
specify ssh command to use |
| 14174 |
.TP |
| 14175 |
.BI \-\-remotecmd \ <CMD> |
| 14176 |
. |
| 14177 |
specify hg command to run on the remote side |
| 14178 |
.TP |
| 14179 |
.B \-\-insecure |
| 14180 |
. |
| 14181 |
do not verify server certificate (ignoring web.cacerts config) |
| 14182 |
.UNINDENT |
| 14183 |
.sp |
| 14184 |
[+] marked option can be specified multiple times |
| 14185 |
.SS fix |
| 14186 |
.sp |
| 14187 |
rewrite file content in changesets or working copy (EXPERIMENTAL) |
| 14188 |
.sp |
| 14189 |
Provides a command that runs configured tools on the contents of modified files, |
| 14190 |
writing back any fixes to the working copy or replacing changesets. |
| 14191 |
.sp |
| 14192 |
Fixer tools are run in the repository\(aqs root directory. This allows them to read |
| 14193 |
configuration files from the working copy, or even write to the working copy. |
| 14194 |
The working copy is not updated to match the revision being fixed. In fact, |
| 14195 |
several revisions may be fixed in parallel. Writes to the working copy are not |
| 14196 |
amended into the revision being fixed; fixer tools MUST always read content to |
| 14197 |
be fixed from stdin, and write fixed file content back to stdout. |
| 14198 |
.sp |
| 14199 |
Here is an example configuration that causes \%\fBhg fix\fP\: to apply automatic |
| 14200 |
formatting fixes to modified lines in C++ code: |
| 14201 |
.sp |
| 14202 |
.nf |
| 14203 |
.ft C |
| 14204 |
[fix] |
| 14205 |
clang\-format:command=clang\-format \-\-assume\-filename={rootpath} |
| 14206 |
clang\-format:linerange=\-\-lines={first}:{last} |
| 14207 |
clang\-format:pattern=set:**.cpp or **.hpp |
| 14208 |
.ft P |
| 14209 |
.fi |
| 14210 |
.sp |
| 14211 |
The :command suboption forms the first part of the shell command that will be |
| 14212 |
used to fix a file. The content of the file is passed on standard input, and the |
| 14213 |
fixed file content is expected on standard output. Any output on standard error |
| 14214 |
will be displayed as a warning. If the exit status is not zero, the file will |
| 14215 |
not be affected. A placeholder warning is displayed if there is a non\-zero exit |
| 14216 |
status but no standard error output. Some values may be substituted into the |
| 14217 |
command: |
| 14218 |
.sp |
| 14219 |
.nf |
| 14220 |
.ft C |
| 14221 |
{rootpath} The path of the file being fixed, relative to the repo root |
| 14222 |
{basename} The name of the file being fixed, without the directory path |
| 14223 |
.ft P |
| 14224 |
.fi |
| 14225 |
.sp |
| 14226 |
If the :linerange suboption is set, the tool will only be run if there are |
| 14227 |
changed lines in a file. The value of this suboption is appended to the shell |
| 14228 |
command once for every range of changed lines in the file. Some values may be |
| 14229 |
substituted into the command: |
| 14230 |
.sp |
| 14231 |
.nf |
| 14232 |
.ft C |
| 14233 |
{first} The 1\-based line number of the first line in the modified range |
| 14234 |
{last} The 1\-based line number of the last line in the modified range |
| 14235 |
.ft P |
| 14236 |
.fi |
| 14237 |
.sp |
| 14238 |
Deleted sections of a file will be ignored by :linerange, because there is no |
| 14239 |
corresponding line range in the version being fixed. |
| 14240 |
.sp |
| 14241 |
By default, tools that set :linerange will only be executed if there is at least |
| 14242 |
one changed line range. This is meant to prevent accidents like running a code |
| 14243 |
formatter in such a way that it unexpectedly reformats the whole file. If such a |
| 14244 |
tool needs to operate on unchanged files, it should set the :skipclean suboption |
| 14245 |
to false. |
| 14246 |
.sp |
| 14247 |
The :pattern suboption determines which files will be passed through each |
| 14248 |
configured tool. See \%\fBhg help patterns\fP\: for possible values. However, all |
| 14249 |
patterns are relative to the repo root, even if that text says they are relative |
| 14250 |
to the current working directory. If there are file arguments to \%\fBhg fix\fP\:, the |
| 14251 |
intersection of these patterns is used. |
| 14252 |
.sp |
| 14253 |
There is also a configurable limit for the maximum size of file that will be |
| 14254 |
processed by \%\fBhg fix\fP\:: |
| 14255 |
.sp |
| 14256 |
.nf |
| 14257 |
.ft C |
| 14258 |
[fix] |
| 14259 |
maxfilesize = 2MB |
| 14260 |
.ft P |
| 14261 |
.fi |
| 14262 |
.sp |
| 14263 |
Normally, execution of configured tools will continue after a failure (indicated |
| 14264 |
by a non\-zero exit status). It can also be configured to abort after the first |
| 14265 |
such failure, so that no files will be affected if any tool fails. This abort |
| 14266 |
will also cause \%\fBhg fix\fP\: to exit with a non\-zero status: |
| 14267 |
.sp |
| 14268 |
.nf |
| 14269 |
.ft C |
| 14270 |
[fix] |
| 14271 |
failure = abort |
| 14272 |
.ft P |
| 14273 |
.fi |
| 14274 |
.sp |
| 14275 |
When multiple tools are configured to affect a file, they execute in an order |
| 14276 |
defined by the :priority suboption. The priority suboption has a default value |
| 14277 |
of zero for each tool. Tools are executed in order of descending priority. The |
| 14278 |
execution order of tools with equal priority is unspecified. For example, you |
| 14279 |
could use the \(aqsort\(aq and \(aqhead\(aq utilities to keep only the 10 smallest numbers |
| 14280 |
in a text file by ensuring that \(aqsort\(aq runs before \(aqhead\(aq: |
| 14281 |
.sp |
| 14282 |
.nf |
| 14283 |
.ft C |
| 14284 |
[fix] |
| 14285 |
sort:command = sort \-n |
| 14286 |
head:command = head \-n 10 |
| 14287 |
sort:pattern = numbers.txt |
| 14288 |
head:pattern = numbers.txt |
| 14289 |
sort:priority = 2 |
| 14290 |
head:priority = 1 |
| 14291 |
.ft P |
| 14292 |
.fi |
| 14293 |
.sp |
| 14294 |
To account for changes made by each tool, the line numbers used for incremental |
| 14295 |
formatting are recomputed before executing the next tool. So, each tool may see |
| 14296 |
different values for the arguments added by the :linerange suboption. |
| 14297 |
.sp |
| 14298 |
Each fixer tool is allowed to return some metadata in addition to the fixed file |
| 14299 |
content. The metadata must be placed before the file content on stdout, |
| 14300 |
separated from the file content by a zero byte. The metadata is parsed as a JSON |
| 14301 |
value (so, it should be UTF\-8 encoded and contain no zero bytes). A fixer tool |
| 14302 |
is expected to produce this metadata encoding if and only if the :metadata |
| 14303 |
suboption is true: |
| 14304 |
.sp |
| 14305 |
.nf |
| 14306 |
.ft C |
| 14307 |
[fix] |
| 14308 |
tool:command = tool \-\-prepend\-json\-metadata |
| 14309 |
tool:metadata = true |
| 14310 |
.ft P |
| 14311 |
.fi |
| 14312 |
.sp |
| 14313 |
The metadata values are passed to hooks, which can be used to print summaries or |
| 14314 |
perform other post\-fixing work. The supported hooks are: |
| 14315 |
.sp |
| 14316 |
.nf |
| 14317 |
.ft C |
| 14318 |
"postfixfile" |
| 14319 |
Run once for each file in each revision where any fixer tools made changes |
| 14320 |
to the file content. Provides "$HG_REV" and "$HG_PATH" to identify the file, |
| 14321 |
and "$HG_METADATA" with a map of fixer names to metadata values from fixer |
| 14322 |
tools that affected the file. Fixer tools that didn\(aqt affect the file have a |
| 14323 |
value of None. Only fixer tools that executed are present in the metadata. |
| 14324 |
|
| 14325 |
"postfix" |
| 14326 |
Run once after all files and revisions have been handled. Provides |
| 14327 |
"$HG_REPLACEMENTS" with information about what revisions were created and |
| 14328 |
made obsolete. Provides a boolean "$HG_WDIRWRITTEN" to indicate whether any |
| 14329 |
files in the working copy were updated. Provides a list "$HG_METADATA" |
| 14330 |
mapping fixer tool names to lists of metadata values returned from |
| 14331 |
executions that modified a file. This aggregates the same metadata |
| 14332 |
previously passed to the "postfixfile" hook. |
| 14333 |
.ft P |
| 14334 |
.fi |
| 14335 |
.sp |
| 14336 |
You can specify a list of directories to search the tool command in using the |
| 14337 |
\fIfix.extra\-bin\-paths\fP configuration. |
| 14338 |
.SS Commands |
| 14339 |
.SS File content management |
| 14340 |
.SS fix |
| 14341 |
.sp |
| 14342 |
rewrite file content in changesets or working directory: |
| 14343 |
.sp |
| 14344 |
.nf |
| 14345 |
.ft C |
| 14346 |
hg fix [OPTION]... [FILE]... |
| 14347 |
.ft P |
| 14348 |
.fi |
| 14349 |
.sp |
| 14350 |
Runs any configured tools to fix the content of files. (See |
| 14351 |
\%\fBhg help \-e fix\fP\: for details about configuring tools.) Only affects files |
| 14352 |
with changes, unless file arguments are provided. Only affects changed lines |
| 14353 |
of files, unless the \-\-whole flag is used. Some tools may always affect the |
| 14354 |
whole file regardless of \-\-whole. |
| 14355 |
.sp |
| 14356 |
If \-\-working\-dir is used, files with uncommitted changes in the working copy |
| 14357 |
will be fixed. Note that no backup are made. |
| 14358 |
.sp |
| 14359 |
If revisions are specified with \-\-source, those revisions and their |
| 14360 |
descendants will be checked, and they may be replaced with new revisions |
| 14361 |
that have fixed file content. By automatically including the descendants, |
| 14362 |
no merging, rebasing, or evolution will be required. If an ancestor of the |
| 14363 |
working copy is included, then the working copy itself will also be fixed, |
| 14364 |
and the working copy will be updated to the fixed parent. |
| 14365 |
.sp |
| 14366 |
When determining what lines of each file to fix at each revision, the whole |
| 14367 |
set of revisions being fixed is considered, so that fixes to earlier |
| 14368 |
revisions are not forgotten in later ones. The \-\-base flag can be used to |
| 14369 |
override this default behavior, though it is not usually desirable to do so. |
| 14370 |
.sp |
| 14371 |
Options: |
| 14372 |
.INDENT 0.0 |
| 14373 |
.TP |
| 14374 |
.B \-\-all |
| 14375 |
. |
| 14376 |
fix all non\-public non\-obsolete revisions |
| 14377 |
.TP |
| 14378 |
.BI \-\-base \ <REV[+]> |
| 14379 |
. |
| 14380 |
revisions to diff against (overrides automatic selection, and applies to every revision being fixed) |
| 14381 |
.TP |
| 14382 |
.BI \-r, \-\-rev \ <REV[+]> |
| 14383 |
. |
| 14384 |
revisions to fix (ADVANCED) |
| 14385 |
.TP |
| 14386 |
.BI \-s, \-\-source \ <REV[+]> |
| 14387 |
. |
| 14388 |
fix the specified revisions and their descendants |
| 14389 |
.TP |
| 14390 |
.B \-w, \-\-working\-dir |
| 14391 |
. |
| 14392 |
fix the working directory |
| 14393 |
.TP |
| 14394 |
.B \-\-whole |
| 14395 |
. |
| 14396 |
always fix every line of a file |
| 14397 |
.UNINDENT |
| 14398 |
.sp |
| 14399 |
[+] marked option can be specified multiple times |
| 14400 |
.SS fsmonitor |
| 14401 |
.sp |
| 14402 |
Faster status operations with the Watchman file monitor (EXPERIMENTAL) |
| 14403 |
.sp |
| 14404 |
Integrates the file\-watching program Watchman with Mercurial to produce faster |
| 14405 |
status results. |
| 14406 |
.sp |
| 14407 |
On a particular Linux system, for a real\-world repository with over 400,000 |
| 14408 |
files hosted on ext4, vanilla \fIhg status\fP takes 1.3 seconds. On the same |
| 14409 |
system, with fsmonitor it takes about 0.3 seconds. |
| 14410 |
.sp |
| 14411 |
fsmonitor requires no configuration \-\- it will tell Watchman about your |
| 14412 |
repository as necessary. You\(aqll need to install Watchman from |
| 14413 |
\%https://facebook.github.io/watchman/\: and make sure it is in your PATH. |
| 14414 |
.sp |
| 14415 |
fsmonitor is incompatible with the largefiles and eol extensions, and |
| 14416 |
will disable itself if any of those are active. |
| 14417 |
.sp |
| 14418 |
The following configuration options exist: |
| 14419 |
.sp |
| 14420 |
.nf |
| 14421 |
.ft C |
| 14422 |
[fsmonitor] |
| 14423 |
mode = {off, on, paranoid} |
| 14424 |
.ft P |
| 14425 |
.fi |
| 14426 |
.sp |
| 14427 |
When \fImode = off\fP, fsmonitor will disable itself (similar to not loading the |
| 14428 |
extension at all). When \fImode = on\fP, fsmonitor will be enabled (the default). |
| 14429 |
When \fImode = paranoid\fP, fsmonitor will query both Watchman and the filesystem, |
| 14430 |
and ensure that the results are consistent. |
| 14431 |
.sp |
| 14432 |
.nf |
| 14433 |
.ft C |
| 14434 |
[fsmonitor] |
| 14435 |
timeout = (float) |
| 14436 |
.ft P |
| 14437 |
.fi |
| 14438 |
.sp |
| 14439 |
A value, in seconds, that determines how long fsmonitor will wait for Watchman |
| 14440 |
to return results. Defaults to \fI2.0\fP. |
| 14441 |
.sp |
| 14442 |
.nf |
| 14443 |
.ft C |
| 14444 |
[fsmonitor] |
| 14445 |
blacklistusers = (list of userids) |
| 14446 |
.ft P |
| 14447 |
.fi |
| 14448 |
.sp |
| 14449 |
A list of usernames for which fsmonitor will disable itself altogether. |
| 14450 |
.sp |
| 14451 |
.nf |
| 14452 |
.ft C |
| 14453 |
[fsmonitor] |
| 14454 |
walk_on_invalidate = (boolean) |
| 14455 |
.ft P |
| 14456 |
.fi |
| 14457 |
.sp |
| 14458 |
Whether or not to walk the whole repo ourselves when our cached state has been |
| 14459 |
invalidated, for example when Watchman has been restarted or .hgignore rules |
| 14460 |
have been changed. Walking the repo in that case can result in competing for |
| 14461 |
I/O with Watchman. For large repos it is recommended to set this value to |
| 14462 |
false. You may wish to set this to true if you have a very fast filesystem |
| 14463 |
that can outpace the IPC overhead of getting the result data for the full repo |
| 14464 |
from Watchman. Defaults to false. |
| 14465 |
.sp |
| 14466 |
.nf |
| 14467 |
.ft C |
| 14468 |
[fsmonitor] |
| 14469 |
warn_when_unused = (boolean) |
| 14470 |
.ft P |
| 14471 |
.fi |
| 14472 |
.sp |
| 14473 |
Whether to print a warning during certain operations when fsmonitor would be |
| 14474 |
beneficial to performance but isn\(aqt enabled. |
| 14475 |
.sp |
| 14476 |
.nf |
| 14477 |
.ft C |
| 14478 |
[fsmonitor] |
| 14479 |
warn_update_file_count = (integer) |
| 14480 |
# or when mercurial is built with rust support |
| 14481 |
warn_update_file_count_rust = (integer) |
| 14482 |
.ft P |
| 14483 |
.fi |
| 14484 |
.sp |
| 14485 |
If \fBwarn_when_unused\fP is set and fsmonitor isn\(aqt enabled, a warning will |
| 14486 |
be printed during working directory updates if this many files will be |
| 14487 |
created. |
| 14488 |
.SS git |
| 14489 |
.sp |
| 14490 |
grant Mercurial the ability to operate on Git repositories. (EXPERIMENTAL) |
| 14491 |
.sp |
| 14492 |
This is currently super experimental. It probably will consume your |
| 14493 |
firstborn a la Rumpelstiltskin, etc. |
| 14494 |
.SS githelp |
| 14495 |
.sp |
| 14496 |
try mapping git commands to Mercurial commands |
| 14497 |
.sp |
| 14498 |
Tries to map a given git command to a Mercurial command: |
| 14499 |
.INDENT 0.0 |
| 14500 |
.INDENT 3.5 |
| 14501 |
.sp |
| 14502 |
$ hg githelp \-\- git checkout master |
| 14503 |
hg update master |
| 14504 |
.UNINDENT |
| 14505 |
.UNINDENT |
| 14506 |
.sp |
| 14507 |
If an unknown command or parameter combination is detected, an error is |
| 14508 |
produced. |
| 14509 |
.SS Commands |
| 14510 |
.SS Help |
| 14511 |
.SS githelp |
| 14512 |
.sp |
| 14513 |
suggests the Mercurial equivalent of the given git command: |
| 14514 |
.sp |
| 14515 |
.nf |
| 14516 |
.ft C |
| 14517 |
hg githelp |
| 14518 |
.ft P |
| 14519 |
.fi |
| 14520 |
.sp |
| 14521 |
Usage: hg githelp \-\- <git command> |
| 14522 |
.\" |
| 14523 |
. |
| 14524 |
.INDENT 0.0 |
| 14525 |
.INDENT 3.5 |
| 14526 |
.sp |
| 14527 |
aliases: git |
| 14528 |
.UNINDENT |
| 14529 |
.UNINDENT |
| 14530 |
.SS gpg |
| 14531 |
.sp |
| 14532 |
commands to sign and verify changesets |
| 14533 |
.SS Commands |
| 14534 |
.SS Signing changes (GPG) |
| 14535 |
.SS sigcheck |
| 14536 |
.sp |
| 14537 |
verify all the signatures there may be for a particular revision: |
| 14538 |
.sp |
| 14539 |
.nf |
| 14540 |
.ft C |
| 14541 |
hg sigcheck REV |
| 14542 |
.ft P |
| 14543 |
.fi |
| 14544 |
.sp |
| 14545 |
verify all the signatures there may be for a particular revision |
| 14546 |
.SS sign |
| 14547 |
.sp |
| 14548 |
add a signature for the current or given revision: |
| 14549 |
.sp |
| 14550 |
.nf |
| 14551 |
.ft C |
| 14552 |
hg sign [OPTION]... [REV]... |
| 14553 |
.ft P |
| 14554 |
.fi |
| 14555 |
.sp |
| 14556 |
If no revision is given, the parent of the working directory is used, |
| 14557 |
or tip if no revision is checked out. |
| 14558 |
.sp |
| 14559 |
The \fBgpg.cmd\fP config setting can be used to specify the command |
| 14560 |
to run. A default key can be specified with \fBgpg.key\fP. |
| 14561 |
.sp |
| 14562 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 14563 |
.sp |
| 14564 |
Options: |
| 14565 |
.INDENT 0.0 |
| 14566 |
.TP |
| 14567 |
.B \-l, \-\-local |
| 14568 |
. |
| 14569 |
make the signature local |
| 14570 |
.TP |
| 14571 |
.B \-f, \-\-force |
| 14572 |
. |
| 14573 |
sign even if the sigfile is modified |
| 14574 |
.TP |
| 14575 |
.B \-\-no\-commit |
| 14576 |
. |
| 14577 |
do not commit the sigfile after signing |
| 14578 |
.TP |
| 14579 |
.BI \-k, \-\-key \ <ID> |
| 14580 |
. |
| 14581 |
the key id to sign with |
| 14582 |
.TP |
| 14583 |
.BI \-m, \-\-message \ <TEXT> |
| 14584 |
. |
| 14585 |
use text as commit message |
| 14586 |
.TP |
| 14587 |
.B \-e, \-\-edit |
| 14588 |
. |
| 14589 |
invoke editor on commit messages |
| 14590 |
.TP |
| 14591 |
.BI \-d, \-\-date \ <DATE> |
| 14592 |
. |
| 14593 |
record the specified date as commit date |
| 14594 |
.TP |
| 14595 |
.BI \-u, \-\-user \ <USER> |
| 14596 |
. |
| 14597 |
record the specified user as committer |
| 14598 |
.UNINDENT |
| 14599 |
.SS sigs |
| 14600 |
.sp |
| 14601 |
list signed changesets: |
| 14602 |
.sp |
| 14603 |
.nf |
| 14604 |
.ft C |
| 14605 |
hg sigs |
| 14606 |
.ft P |
| 14607 |
.fi |
| 14608 |
.sp |
| 14609 |
list signed changesets |
| 14610 |
.SS graphlog |
| 14611 |
.sp |
| 14612 |
command to view revision graphs from a shell (DEPRECATED) |
| 14613 |
.sp |
| 14614 |
The functionality of this extension has been include in core Mercurial |
| 14615 |
since version 2.3. Please use \%\fBhg log \-G ...\fP\: instead. |
| 14616 |
.sp |
| 14617 |
This extension adds a \-\-graph option to the incoming, outgoing and log |
| 14618 |
commands. When this options is given, an ASCII representation of the |
| 14619 |
revision graph is also shown. |
| 14620 |
.SS Commands |
| 14621 |
.SS Change navigation |
| 14622 |
.SS glog |
| 14623 |
.sp |
| 14624 |
show revision history alongside an ASCII revision graph: |
| 14625 |
.sp |
| 14626 |
.nf |
| 14627 |
.ft C |
| 14628 |
hg glog [OPTION]... [FILE] |
| 14629 |
.ft P |
| 14630 |
.fi |
| 14631 |
.sp |
| 14632 |
Print a revision history alongside a revision graph drawn with |
| 14633 |
ASCII characters. |
| 14634 |
.sp |
| 14635 |
Nodes printed as an @ character are parents of the working |
| 14636 |
directory. |
| 14637 |
.sp |
| 14638 |
This is an alias to \%\fBhg log \-G\fP\:. |
| 14639 |
.sp |
| 14640 |
Options: |
| 14641 |
.INDENT 0.0 |
| 14642 |
.TP |
| 14643 |
.B \-f, \-\-follow |
| 14644 |
. |
| 14645 |
follow changeset history, or file history across copies and renames |
| 14646 |
.TP |
| 14647 |
.B \-\-follow\-first |
| 14648 |
. |
| 14649 |
only follow the first parent of merge changesets (DEPRECATED) |
| 14650 |
.TP |
| 14651 |
.BI \-d, \-\-date \ <DATE> |
| 14652 |
. |
| 14653 |
show revisions matching date spec |
| 14654 |
.TP |
| 14655 |
.B \-C, \-\-copies |
| 14656 |
. |
| 14657 |
show copied files |
| 14658 |
.TP |
| 14659 |
.BI \-k, \-\-keyword \ <TEXT[+]> |
| 14660 |
. |
| 14661 |
do case\-insensitive search for a given text |
| 14662 |
.TP |
| 14663 |
.BI \-r, \-\-rev \ <REV[+]> |
| 14664 |
. |
| 14665 |
show the specified revision or revset |
| 14666 |
.TP |
| 14667 |
.B \-\-removed |
| 14668 |
. |
| 14669 |
include revisions where files were removed |
| 14670 |
.TP |
| 14671 |
.B \-m, \-\-only\-merges |
| 14672 |
. |
| 14673 |
show only merges (DEPRECATED) |
| 14674 |
.TP |
| 14675 |
.BI \-u, \-\-user \ <USER[+]> |
| 14676 |
. |
| 14677 |
revisions committed by user |
| 14678 |
.TP |
| 14679 |
.BI \-\-only\-branch \ <BRANCH[+]> |
| 14680 |
. |
| 14681 |
show only changesets within the given named branch (DEPRECATED) |
| 14682 |
.TP |
| 14683 |
.BI \-b, \-\-branch \ <BRANCH[+]> |
| 14684 |
. |
| 14685 |
show changesets within the given named branch |
| 14686 |
.TP |
| 14687 |
.BI \-P, \-\-prune \ <REV[+]> |
| 14688 |
. |
| 14689 |
do not display revision or any of its ancestors |
| 14690 |
.TP |
| 14691 |
.B \-p, \-\-patch |
| 14692 |
. |
| 14693 |
show patch |
| 14694 |
.TP |
| 14695 |
.B \-g, \-\-git |
| 14696 |
. |
| 14697 |
use git extended diff format |
| 14698 |
.TP |
| 14699 |
.BI \-l, \-\-limit \ <NUM> |
| 14700 |
. |
| 14701 |
limit number of changes displayed |
| 14702 |
.TP |
| 14703 |
.B \-M, \-\-no\-merges |
| 14704 |
. |
| 14705 |
do not show merges |
| 14706 |
.TP |
| 14707 |
.B \-\-stat |
| 14708 |
. |
| 14709 |
output diffstat\-style summary of changes |
| 14710 |
.TP |
| 14711 |
.B \-G, \-\-graph |
| 14712 |
. |
| 14713 |
show the revision DAG |
| 14714 |
.TP |
| 14715 |
.BI \-\-style \ <STYLE> |
| 14716 |
. |
| 14717 |
display using template map file (DEPRECATED) |
| 14718 |
.TP |
| 14719 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 14720 |
. |
| 14721 |
display with template |
| 14722 |
.TP |
| 14723 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 14724 |
. |
| 14725 |
include names matching the given patterns |
| 14726 |
.TP |
| 14727 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 14728 |
. |
| 14729 |
exclude names matching the given patterns |
| 14730 |
.UNINDENT |
| 14731 |
.sp |
| 14732 |
[+] marked option can be specified multiple times |
| 14733 |
.SS hgk |
| 14734 |
.sp |
| 14735 |
browse the repository in a graphical way |
| 14736 |
.sp |
| 14737 |
The hgk extension allows browsing the history of a repository in a |
| 14738 |
graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not |
| 14739 |
distributed with Mercurial.) |
| 14740 |
.sp |
| 14741 |
hgk consists of two parts: a Tcl script that does the displaying and |
| 14742 |
querying of information, and an extension to Mercurial named hgk.py, |
| 14743 |
which provides hooks for hgk to get information. hgk can be found in |
| 14744 |
the contrib directory, and the extension is shipped in the hgext |
| 14745 |
repository, and needs to be enabled. |
| 14746 |
.sp |
| 14747 |
The \%\fBhg view\fP\: command will launch the hgk Tcl script. For this command |
| 14748 |
to work, hgk must be in your search path. Alternately, you can specify |
| 14749 |
the path to hgk in your configuration file: |
| 14750 |
.sp |
| 14751 |
.nf |
| 14752 |
.ft C |
| 14753 |
[hgk] |
| 14754 |
path = /location/of/hgk |
| 14755 |
.ft P |
| 14756 |
.fi |
| 14757 |
.sp |
| 14758 |
hgk can make use of the extdiff extension to visualize revisions. |
| 14759 |
Assuming you had already configured extdiff vdiff command, just add: |
| 14760 |
.sp |
| 14761 |
.nf |
| 14762 |
.ft C |
| 14763 |
[hgk] |
| 14764 |
vdiff=vdiff |
| 14765 |
.ft P |
| 14766 |
.fi |
| 14767 |
.sp |
| 14768 |
Revisions context menu will now display additional entries to fire |
| 14769 |
vdiff on hovered and selected revisions. |
| 14770 |
.SS Commands |
| 14771 |
.SS Change navigation |
| 14772 |
.SS view |
| 14773 |
.sp |
| 14774 |
start interactive history viewer: |
| 14775 |
.sp |
| 14776 |
.nf |
| 14777 |
.ft C |
| 14778 |
hg view [\-l LIMIT] [REVRANGE] |
| 14779 |
.ft P |
| 14780 |
.fi |
| 14781 |
.sp |
| 14782 |
start interactive history viewer |
| 14783 |
.sp |
| 14784 |
Options: |
| 14785 |
.INDENT 0.0 |
| 14786 |
.TP |
| 14787 |
.BI \-l, \-\-limit \ <NUM> |
| 14788 |
. |
| 14789 |
limit number of changes displayed |
| 14790 |
.UNINDENT |
| 14791 |
.SS highlight |
| 14792 |
.sp |
| 14793 |
syntax highlighting for hgweb (requires Pygments) |
| 14794 |
.sp |
| 14795 |
It depends on the Pygments syntax highlighting library: |
| 14796 |
\%http://pygments.org/\: |
| 14797 |
.sp |
| 14798 |
There are the following configuration options: |
| 14799 |
.sp |
| 14800 |
.nf |
| 14801 |
.ft C |
| 14802 |
[web] |
| 14803 |
pygments_style = <style> (default: colorful) |
| 14804 |
highlightfiles = <fileset> (default: size(\(aq<5M\(aq)) |
| 14805 |
highlightonlymatchfilename = <bool> (default False) |
| 14806 |
.ft P |
| 14807 |
.fi |
| 14808 |
.sp |
| 14809 |
\fBhighlightonlymatchfilename\fP will only highlight files if their type could |
| 14810 |
be identified by their filename. When this is not enabled (the default), |
| 14811 |
Pygments will try very hard to identify the file type from content and any |
| 14812 |
match (even matches with a low confidence score) will be used. |
| 14813 |
.SS histedit |
| 14814 |
.sp |
| 14815 |
interactive history editing |
| 14816 |
.sp |
| 14817 |
With this extension installed, Mercurial gains one new command: histedit. Usage |
| 14818 |
is as follows, assuming the following history: |
| 14819 |
.sp |
| 14820 |
.nf |
| 14821 |
.ft C |
| 14822 |
@ 3[tip] 7c2fd3b9020c 2009\-04\-27 18:04 \-0500 durin42 |
| 14823 |
| Add delta |
| 14824 |
| |
| 14825 |
o 2 030b686bedc4 2009\-04\-27 18:04 \-0500 durin42 |
| 14826 |
| Add gamma |
| 14827 |
| |
| 14828 |
o 1 c561b4e977df 2009\-04\-27 18:04 \-0500 durin42 |
| 14829 |
| Add beta |
| 14830 |
| |
| 14831 |
o 0 d8d2fcd0e319 2009\-04\-27 18:04 \-0500 durin42 |
| 14832 |
Add alpha |
| 14833 |
.ft P |
| 14834 |
.fi |
| 14835 |
.sp |
| 14836 |
If you were to run \fBhg histedit c561b4e977df\fP, you would see the following |
| 14837 |
file open in your editor: |
| 14838 |
.sp |
| 14839 |
.nf |
| 14840 |
.ft C |
| 14841 |
pick c561b4e977df Add beta |
| 14842 |
pick 030b686bedc4 Add gamma |
| 14843 |
pick 7c2fd3b9020c Add delta |
| 14844 |
|
| 14845 |
# Edit history between c561b4e977df and 7c2fd3b9020c |
| 14846 |
# |
| 14847 |
# Commits are listed from least to most recent |
| 14848 |
# |
| 14849 |
# Commands: |
| 14850 |
# p, pick = use commit |
| 14851 |
# e, edit = use commit, but allow edits before making new commit |
| 14852 |
# f, fold = use commit, but combine it with the one above |
| 14853 |
# r, roll = like fold, but discard this commit\(aqs description and date |
| 14854 |
# d, drop = remove commit from history |
| 14855 |
# m, mess = edit commit message without changing commit content |
| 14856 |
# b, base = checkout changeset and apply further changesets from there |
| 14857 |
# |
| 14858 |
.ft P |
| 14859 |
.fi |
| 14860 |
.sp |
| 14861 |
In this file, lines beginning with \fB#\fP are ignored. You must specify a rule |
| 14862 |
for each revision in your history. For example, if you had meant to add gamma |
| 14863 |
before beta, and then wanted to add delta in the same revision as beta, you |
| 14864 |
would reorganize the file to look like this: |
| 14865 |
.sp |
| 14866 |
.nf |
| 14867 |
.ft C |
| 14868 |
pick 030b686bedc4 Add gamma |
| 14869 |
pick c561b4e977df Add beta |
| 14870 |
fold 7c2fd3b9020c Add delta |
| 14871 |
|
| 14872 |
# Edit history between c561b4e977df and 7c2fd3b9020c |
| 14873 |
# |
| 14874 |
# Commits are listed from least to most recent |
| 14875 |
# |
| 14876 |
# Commands: |
| 14877 |
# p, pick = use commit |
| 14878 |
# e, edit = use commit, but allow edits before making new commit |
| 14879 |
# f, fold = use commit, but combine it with the one above |
| 14880 |
# r, roll = like fold, but discard this commit\(aqs description and date |
| 14881 |
# d, drop = remove commit from history |
| 14882 |
# m, mess = edit commit message without changing commit content |
| 14883 |
# b, base = checkout changeset and apply further changesets from there |
| 14884 |
# |
| 14885 |
.ft P |
| 14886 |
.fi |
| 14887 |
.sp |
| 14888 |
At which point you close the editor and \fBhistedit\fP starts working. When you |
| 14889 |
specify a \fBfold\fP operation, \fBhistedit\fP will open an editor when it folds |
| 14890 |
those revisions together, offering you a chance to clean up the commit message: |
| 14891 |
.sp |
| 14892 |
.nf |
| 14893 |
.ft C |
| 14894 |
Add beta |
| 14895 |
*** |
| 14896 |
Add delta |
| 14897 |
.ft P |
| 14898 |
.fi |
| 14899 |
.sp |
| 14900 |
Edit the commit message to your liking, then close the editor. The date used |
| 14901 |
for the commit will be the later of the two commits\(aq dates. For this example, |
| 14902 |
let\(aqs assume that the commit message was changed to \fBAdd beta and delta.\fP |
| 14903 |
After histedit has run and had a chance to remove any old or temporary |
| 14904 |
revisions it needed, the history looks like this: |
| 14905 |
.sp |
| 14906 |
.nf |
| 14907 |
.ft C |
| 14908 |
@ 2[tip] 989b4d060121 2009\-04\-27 18:04 \-0500 durin42 |
| 14909 |
| Add beta and delta. |
| 14910 |
| |
| 14911 |
o 1 081603921c3f 2009\-04\-27 18:04 \-0500 durin42 |
| 14912 |
| Add gamma |
| 14913 |
| |
| 14914 |
o 0 d8d2fcd0e319 2009\-04\-27 18:04 \-0500 durin42 |
| 14915 |
Add alpha |
| 14916 |
.ft P |
| 14917 |
.fi |
| 14918 |
.sp |
| 14919 |
Note that \fBhistedit\fP does \fInot\fP remove any revisions (even its own temporary |
| 14920 |
ones) until after it has completed all the editing operations, so it will |
| 14921 |
probably perform several strip operations when it\(aqs done. For the above example, |
| 14922 |
it had to run strip twice. Strip can be slow depending on a variety of factors, |
| 14923 |
so you might need to be a little patient. You can choose to keep the original |
| 14924 |
revisions by passing the \fB\-\-keep\fP flag. |
| 14925 |
.sp |
| 14926 |
The \fBedit\fP operation will drop you back to a command prompt, |
| 14927 |
allowing you to edit files freely, or even use \fBhg record\fP to commit |
| 14928 |
some changes as a separate commit. When you\(aqre done, any remaining |
| 14929 |
uncommitted changes will be committed as well. When done, run \fBhg |
| 14930 |
histedit \-\-continue\fP to finish this step. If there are uncommitted |
| 14931 |
changes, you\(aqll be prompted for a new commit message, but the default |
| 14932 |
commit message will be the original message for the \fBedit\fP ed |
| 14933 |
revision, and the date of the original commit will be preserved. |
| 14934 |
.sp |
| 14935 |
The \fBmessage\fP operation will give you a chance to revise a commit |
| 14936 |
message without changing the contents. It\(aqs a shortcut for doing |
| 14937 |
\fBedit\fP immediately followed by \fIhg histedit \-\-continue\(ga\fP. |
| 14938 |
.sp |
| 14939 |
If \fBhistedit\fP encounters a conflict when moving a revision (while |
| 14940 |
handling \fBpick\fP or \fBfold\fP), it\(aqll stop in a similar manner to |
| 14941 |
\fBedit\fP with the difference that it won\(aqt prompt you for a commit |
| 14942 |
message when done. If you decide at this point that you don\(aqt like how |
| 14943 |
much work it will be to rearrange history, or that you made a mistake, |
| 14944 |
you can use \fBhg histedit \-\-abort\fP to abandon the new changes you |
| 14945 |
have made and return to the state before you attempted to edit your |
| 14946 |
history. |
| 14947 |
.sp |
| 14948 |
If we clone the histedit\-ed example repository above and add four more |
| 14949 |
changes, such that we have the following history: |
| 14950 |
.sp |
| 14951 |
.nf |
| 14952 |
.ft C |
| 14953 |
@ 6[tip] 038383181893 2009\-04\-27 18:04 \-0500 stefan |
| 14954 |
| Add theta |
| 14955 |
| |
| 14956 |
o 5 140988835471 2009\-04\-27 18:04 \-0500 stefan |
| 14957 |
| Add eta |
| 14958 |
| |
| 14959 |
o 4 122930637314 2009\-04\-27 18:04 \-0500 stefan |
| 14960 |
| Add zeta |
| 14961 |
| |
| 14962 |
o 3 836302820282 2009\-04\-27 18:04 \-0500 stefan |
| 14963 |
| Add epsilon |
| 14964 |
| |
| 14965 |
o 2 989b4d060121 2009\-04\-27 18:04 \-0500 durin42 |
| 14966 |
| Add beta and delta. |
| 14967 |
| |
| 14968 |
o 1 081603921c3f 2009\-04\-27 18:04 \-0500 durin42 |
| 14969 |
| Add gamma |
| 14970 |
| |
| 14971 |
o 0 d8d2fcd0e319 2009\-04\-27 18:04 \-0500 durin42 |
| 14972 |
Add alpha |
| 14973 |
.ft P |
| 14974 |
.fi |
| 14975 |
.sp |
| 14976 |
If you run \fBhg histedit \-\-outgoing\fP on the clone then it is the same |
| 14977 |
as running \fBhg histedit 836302820282\fP. If you need plan to push to a |
| 14978 |
repository that Mercurial does not detect to be related to the source |
| 14979 |
repo, you can add a \fB\-\-force\fP option. |
| 14980 |
.SS Config |
| 14981 |
.sp |
| 14982 |
Histedit rule lines are truncated to 80 characters by default. You |
| 14983 |
can customize this behavior by setting a different length in your |
| 14984 |
configuration file: |
| 14985 |
.sp |
| 14986 |
.nf |
| 14987 |
.ft C |
| 14988 |
[histedit] |
| 14989 |
linelen = 120 # truncate rule lines at 120 characters |
| 14990 |
.ft P |
| 14991 |
.fi |
| 14992 |
.sp |
| 14993 |
The summary of a change can be customized as well: |
| 14994 |
.sp |
| 14995 |
.nf |
| 14996 |
.ft C |
| 14997 |
[histedit] |
| 14998 |
summary\-template = \(aq{rev} {bookmarks} {desc|firstline}\(aq |
| 14999 |
.ft P |
| 15000 |
.fi |
| 15001 |
.sp |
| 15002 |
The customized summary should be kept short enough that rule lines |
| 15003 |
will fit in the configured line length. See above if that requires |
| 15004 |
customization. |
| 15005 |
.sp |
| 15006 |
\fBhg histedit\fP attempts to automatically choose an appropriate base |
| 15007 |
revision to use. To change which base revision is used, define a |
| 15008 |
revset in your configuration file: |
| 15009 |
.sp |
| 15010 |
.nf |
| 15011 |
.ft C |
| 15012 |
[histedit] |
| 15013 |
defaultrev = only(.) & draft() |
| 15014 |
.ft P |
| 15015 |
.fi |
| 15016 |
.sp |
| 15017 |
By default each edited revision needs to be present in histedit commands. |
| 15018 |
To remove revision you need to use \fBdrop\fP operation. You can configure |
| 15019 |
the drop to be implicit for missing commits by adding: |
| 15020 |
.sp |
| 15021 |
.nf |
| 15022 |
.ft C |
| 15023 |
[histedit] |
| 15024 |
dropmissing = True |
| 15025 |
.ft P |
| 15026 |
.fi |
| 15027 |
.sp |
| 15028 |
By default, histedit will close the transaction after each action. For |
| 15029 |
performance purposes, you can configure histedit to use a single transaction |
| 15030 |
across the entire histedit. WARNING: This setting introduces a significant risk |
| 15031 |
of losing the work you\(aqve done in a histedit if the histedit aborts |
| 15032 |
unexpectedly: |
| 15033 |
.sp |
| 15034 |
.nf |
| 15035 |
.ft C |
| 15036 |
[histedit] |
| 15037 |
singletransaction = True |
| 15038 |
.ft P |
| 15039 |
.fi |
| 15040 |
.SS Commands |
| 15041 |
.SS Change manipulation |
| 15042 |
.SS histedit |
| 15043 |
.sp |
| 15044 |
interactively edit changeset history: |
| 15045 |
.sp |
| 15046 |
.nf |
| 15047 |
.ft C |
| 15048 |
hg histedit [OPTIONS] ([ANCESTOR] | \-\-outgoing [URL]) |
| 15049 |
.ft P |
| 15050 |
.fi |
| 15051 |
.sp |
| 15052 |
This command lets you edit a linear series of changesets (up to |
| 15053 |
and including the working directory, which should be clean). |
| 15054 |
You can: |
| 15055 |
.INDENT 0.0 |
| 15056 |
.IP \(bu 2 |
| 15057 |
. |
| 15058 |
\fIpick\fP to [re]order a changeset |
| 15059 |
.IP \(bu 2 |
| 15060 |
. |
| 15061 |
\fIdrop\fP to omit changeset |
| 15062 |
.IP \(bu 2 |
| 15063 |
. |
| 15064 |
\fImess\fP to reword the changeset commit message |
| 15065 |
.IP \(bu 2 |
| 15066 |
. |
| 15067 |
\fIfold\fP to combine it with the preceding changeset (using the later date) |
| 15068 |
.IP \(bu 2 |
| 15069 |
. |
| 15070 |
\fIroll\fP like fold, but discarding this commit\(aqs description and date |
| 15071 |
.IP \(bu 2 |
| 15072 |
. |
| 15073 |
\fIedit\fP to edit this changeset (preserving date) |
| 15074 |
.IP \(bu 2 |
| 15075 |
. |
| 15076 |
\fIbase\fP to checkout changeset and apply further changesets from there |
| 15077 |
.UNINDENT |
| 15078 |
.sp |
| 15079 |
There are a number of ways to select the root changeset: |
| 15080 |
.INDENT 0.0 |
| 15081 |
.IP \(bu 2 |
| 15082 |
. |
| 15083 |
Specify ANCESTOR directly |
| 15084 |
.IP \(bu 2 |
| 15085 |
. |
| 15086 |
Use \-\-outgoing \-\- it will be the first linear changeset not |
| 15087 |
included in destination. (See \%\fBhg help config.paths.default\-push\fP\:) |
| 15088 |
.IP \(bu 2 |
| 15089 |
. |
| 15090 |
Otherwise, the value from the "histedit.defaultrev" config option |
| 15091 |
is used as a revset to select the base revision when ANCESTOR is not |
| 15092 |
specified. The first revision returned by the revset is used. By |
| 15093 |
default, this selects the editable history that is unique to the |
| 15094 |
ancestry of the working directory. |
| 15095 |
.UNINDENT |
| 15096 |
.sp |
| 15097 |
If you use \-\-outgoing, this command will abort if there are ambiguous |
| 15098 |
outgoing revisions. For example, if there are multiple branches |
| 15099 |
containing outgoing revisions. |
| 15100 |
.sp |
| 15101 |
Use "min(outgoing() and ::.)" or similar revset specification |
| 15102 |
instead of \-\-outgoing to specify edit target revision exactly in |
| 15103 |
such ambiguous situation. See \%\fBhg help revsets\fP\: for detail about |
| 15104 |
selecting revisions. |
| 15105 |
.sp |
| 15106 |
Examples: |
| 15107 |
.INDENT 0.0 |
| 15108 |
.INDENT 3.5 |
| 15109 |
.INDENT 0.0 |
| 15110 |
.IP \(bu 2 |
| 15111 |
. |
| 15112 |
A number of changes have been made. |
| 15113 |
Revision 3 is no longer needed. |
| 15114 |
.sp |
| 15115 |
Start history editing from revision 3: |
| 15116 |
.sp |
| 15117 |
.nf |
| 15118 |
.ft C |
| 15119 |
hg histedit \-r 3 |
| 15120 |
.ft P |
| 15121 |
.fi |
| 15122 |
.sp |
| 15123 |
An editor opens, containing the list of revisions, |
| 15124 |
with specific actions specified: |
| 15125 |
.sp |
| 15126 |
.nf |
| 15127 |
.ft C |
| 15128 |
pick 5339bf82f0ca 3 Zworgle the foobar |
| 15129 |
pick 8ef592ce7cc4 4 Bedazzle the zerlog |
| 15130 |
pick 0a9639fcda9d 5 Morgify the cromulancy |
| 15131 |
.ft P |
| 15132 |
.fi |
| 15133 |
.sp |
| 15134 |
Additional information about the possible actions |
| 15135 |
to take appears below the list of revisions. |
| 15136 |
.sp |
| 15137 |
To remove revision 3 from the history, |
| 15138 |
its action (at the beginning of the relevant line) |
| 15139 |
is changed to \(aqdrop\(aq: |
| 15140 |
.sp |
| 15141 |
.nf |
| 15142 |
.ft C |
| 15143 |
drop 5339bf82f0ca 3 Zworgle the foobar |
| 15144 |
pick 8ef592ce7cc4 4 Bedazzle the zerlog |
| 15145 |
pick 0a9639fcda9d 5 Morgify the cromulancy |
| 15146 |
.ft P |
| 15147 |
.fi |
| 15148 |
.IP \(bu 2 |
| 15149 |
. |
| 15150 |
A number of changes have been made. |
| 15151 |
Revision 2 and 4 need to be swapped. |
| 15152 |
.sp |
| 15153 |
Start history editing from revision 2: |
| 15154 |
.sp |
| 15155 |
.nf |
| 15156 |
.ft C |
| 15157 |
hg histedit \-r 2 |
| 15158 |
.ft P |
| 15159 |
.fi |
| 15160 |
.sp |
| 15161 |
An editor opens, containing the list of revisions, |
| 15162 |
with specific actions specified: |
| 15163 |
.sp |
| 15164 |
.nf |
| 15165 |
.ft C |
| 15166 |
pick 252a1af424ad 2 Blorb a morgwazzle |
| 15167 |
pick 5339bf82f0ca 3 Zworgle the foobar |
| 15168 |
pick 8ef592ce7cc4 4 Bedazzle the zerlog |
| 15169 |
.ft P |
| 15170 |
.fi |
| 15171 |
.sp |
| 15172 |
To swap revision 2 and 4, its lines are swapped |
| 15173 |
in the editor: |
| 15174 |
.sp |
| 15175 |
.nf |
| 15176 |
.ft C |
| 15177 |
pick 8ef592ce7cc4 4 Bedazzle the zerlog |
| 15178 |
pick 5339bf82f0ca 3 Zworgle the foobar |
| 15179 |
pick 252a1af424ad 2 Blorb a morgwazzle |
| 15180 |
.ft P |
| 15181 |
.fi |
| 15182 |
.UNINDENT |
| 15183 |
.UNINDENT |
| 15184 |
.UNINDENT |
| 15185 |
.sp |
| 15186 |
Returns 0 on success, 1 if user intervention is required (not only |
| 15187 |
for intentional "edit" command, but also for resolving unexpected |
| 15188 |
conflicts). |
| 15189 |
.sp |
| 15190 |
Options: |
| 15191 |
.INDENT 0.0 |
| 15192 |
.TP |
| 15193 |
.BI \-\-commands \ <FILE> |
| 15194 |
. |
| 15195 |
read history edits from the specified file |
| 15196 |
.TP |
| 15197 |
.B \-c, \-\-continue |
| 15198 |
. |
| 15199 |
continue an edit already in progress |
| 15200 |
.TP |
| 15201 |
.B \-\-edit\-plan |
| 15202 |
. |
| 15203 |
edit remaining actions list |
| 15204 |
.TP |
| 15205 |
.B \-k, \-\-keep |
| 15206 |
. |
| 15207 |
don\(aqt strip old nodes after edit is complete |
| 15208 |
.TP |
| 15209 |
.B \-\-abort |
| 15210 |
. |
| 15211 |
abort an edit in progress |
| 15212 |
.TP |
| 15213 |
.B \-o, \-\-outgoing |
| 15214 |
. |
| 15215 |
changesets not found in destination |
| 15216 |
.TP |
| 15217 |
.B \-f, \-\-force |
| 15218 |
. |
| 15219 |
force outgoing even for unrelated repositories |
| 15220 |
.TP |
| 15221 |
.BI \-r, \-\-rev \ <REV[+]> |
| 15222 |
. |
| 15223 |
first revision to be edited |
| 15224 |
.TP |
| 15225 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 15226 |
. |
| 15227 |
display with template |
| 15228 |
.UNINDENT |
| 15229 |
.sp |
| 15230 |
[+] marked option can be specified multiple times |
| 15231 |
.SS hooklib |
| 15232 |
.sp |
| 15233 |
collection of simple hooks for common tasks (EXPERIMENTAL) |
| 15234 |
.sp |
| 15235 |
This extension provides a number of simple hooks to handle issues |
| 15236 |
commonly found in repositories with many contributors: |
| 15237 |
\- email notification when changesets move from draft to public phase |
| 15238 |
\- email notification when changesets are obsoleted |
| 15239 |
\- enforcement of draft phase for all incoming changesets |
| 15240 |
\- enforcement of a no\-branch\-merge policy |
| 15241 |
\- enforcement of a no\-multiple\-heads policy |
| 15242 |
.sp |
| 15243 |
The implementation of the hooks is subject to change, e.g. whether to |
| 15244 |
implement them as individual hooks or merge them into the notify |
| 15245 |
extension as option. The functionality itself is planned to be supported |
| 15246 |
long\-term. |
| 15247 |
.SS journal |
| 15248 |
.sp |
| 15249 |
track previous positions of bookmarks (EXPERIMENTAL) |
| 15250 |
.sp |
| 15251 |
This extension adds a new command: \fIhg journal\fP, which shows you where |
| 15252 |
bookmarks were previously located. |
| 15253 |
.SS Commands |
| 15254 |
.SS Change organization |
| 15255 |
.SS journal |
| 15256 |
.sp |
| 15257 |
show the previous position of bookmarks and the working copy: |
| 15258 |
.sp |
| 15259 |
.nf |
| 15260 |
.ft C |
| 15261 |
hg journal [OPTION]... [BOOKMARKNAME] |
| 15262 |
.ft P |
| 15263 |
.fi |
| 15264 |
.sp |
| 15265 |
The journal is used to see the previous commits that bookmarks and the |
| 15266 |
working copy pointed to. By default the previous locations for the working |
| 15267 |
copy. Passing a bookmark name will show all the previous positions of |
| 15268 |
that bookmark. Use the \-\-all switch to show previous locations for all |
| 15269 |
bookmarks and the working copy; each line will then include the bookmark |
| 15270 |
name, or \(aq.\(aq for the working copy, as well. |
| 15271 |
.sp |
| 15272 |
If \fIname\fP starts with \fIre:\fP, the remainder of the name is treated as |
| 15273 |
a regular expression. To match a name that actually starts with \fIre:\fP, |
| 15274 |
use the prefix \fIliteral:\fP. |
| 15275 |
.sp |
| 15276 |
By default hg journal only shows the commit hash and the command that was |
| 15277 |
running at that time. \-v/\-\-verbose will show the prior hash, the user, and |
| 15278 |
the time at which it happened. |
| 15279 |
.sp |
| 15280 |
Use \-c/\-\-commits to output log information on each commit hash; at this |
| 15281 |
point you can use the usual \fI\-\-patch\fP, \fI\-\-git\fP, \fI\-\-stat\fP and \fI\-\-template\fP |
| 15282 |
switches to alter the log output for these. |
| 15283 |
.sp |
| 15284 |
\fIhg journal \-T json\fP can be used to produce machine readable output. |
| 15285 |
.sp |
| 15286 |
Options: |
| 15287 |
.INDENT 0.0 |
| 15288 |
.TP |
| 15289 |
.B \-\-all |
| 15290 |
. |
| 15291 |
show history for all names |
| 15292 |
.TP |
| 15293 |
.B \-c, \-\-commits |
| 15294 |
. |
| 15295 |
show commit metadata |
| 15296 |
.TP |
| 15297 |
.B \-p, \-\-patch |
| 15298 |
. |
| 15299 |
show patch |
| 15300 |
.TP |
| 15301 |
.B \-g, \-\-git |
| 15302 |
. |
| 15303 |
use git extended diff format |
| 15304 |
.TP |
| 15305 |
.BI \-l, \-\-limit \ <NUM> |
| 15306 |
. |
| 15307 |
limit number of changes displayed |
| 15308 |
.TP |
| 15309 |
.B \-\-stat |
| 15310 |
. |
| 15311 |
output diffstat\-style summary of changes |
| 15312 |
.TP |
| 15313 |
.BI \-\-style \ <STYLE> |
| 15314 |
. |
| 15315 |
display using template map file (DEPRECATED) |
| 15316 |
.TP |
| 15317 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 15318 |
. |
| 15319 |
display with template |
| 15320 |
.UNINDENT |
| 15321 |
.SS keyword |
| 15322 |
.sp |
| 15323 |
expand keywords in tracked files |
| 15324 |
.sp |
| 15325 |
This extension expands RCS/CVS\-like or self\-customized $Keywords$ in |
| 15326 |
tracked text files selected by your configuration. |
| 15327 |
.sp |
| 15328 |
Keywords are only expanded in local repositories and not stored in the |
| 15329 |
change history. The mechanism can be regarded as a convenience for the |
| 15330 |
current user or for archive distribution. |
| 15331 |
.sp |
| 15332 |
Keywords expand to the changeset data pertaining to the latest change |
| 15333 |
relative to the working directory parent of each file. |
| 15334 |
.sp |
| 15335 |
Configuration is done in the [keyword], [keywordset] and [keywordmaps] |
| 15336 |
sections of hgrc files. |
| 15337 |
.sp |
| 15338 |
Example: |
| 15339 |
.sp |
| 15340 |
.nf |
| 15341 |
.ft C |
| 15342 |
[keyword] |
| 15343 |
# expand keywords in every python file except those matching "x*" |
| 15344 |
**.py = |
| 15345 |
x* = ignore |
| 15346 |
|
| 15347 |
[keywordset] |
| 15348 |
# prefer svn\- over cvs\-like default keywordmaps |
| 15349 |
svn = True |
| 15350 |
.ft P |
| 15351 |
.fi |
| 15352 |
.IP Note |
| 15353 |
. |
| 15354 |
The more specific you are in your filename patterns the less you |
| 15355 |
lose speed in huge repositories. |
| 15356 |
.RE |
| 15357 |
.sp |
| 15358 |
For [keywordmaps] template mapping and expansion demonstration and |
| 15359 |
control run \%\fBhg kwdemo\fP\:. See \%\fBhg help templates\fP\: for a list of |
| 15360 |
available templates and filters. |
| 15361 |
.sp |
| 15362 |
Three additional date template filters are provided: |
| 15363 |
.INDENT 0.0 |
| 15364 |
.TP |
| 15365 |
.B \fButcdate\fP |
| 15366 |
.sp |
| 15367 |
"2006/09/18 15:13:13" |
| 15368 |
.TP |
| 15369 |
.B \fBsvnutcdate\fP |
| 15370 |
.sp |
| 15371 |
"2006\-09\-18 15:13:13Z" |
| 15372 |
.TP |
| 15373 |
.B \fBsvnisodate\fP |
| 15374 |
.sp |
| 15375 |
"2006\-09\-18 08:13:13 \-700 (Mon, 18 Sep 2006)" |
| 15376 |
.UNINDENT |
| 15377 |
.sp |
| 15378 |
The default template mappings (view with \%\fBhg kwdemo \-d\fP\:) can be |
| 15379 |
replaced with customized keywords and templates. Again, run |
| 15380 |
\%\fBhg kwdemo\fP\: to control the results of your configuration changes. |
| 15381 |
.sp |
| 15382 |
Before changing/disabling active keywords, you must run \%\fBhg kwshrink\fP\: |
| 15383 |
to avoid storing expanded keywords in the change history. |
| 15384 |
.sp |
| 15385 |
To force expansion after enabling it, or a configuration change, run |
| 15386 |
\%\fBhg kwexpand\fP\:. |
| 15387 |
.sp |
| 15388 |
Expansions spanning more than one line and incremental expansions, |
| 15389 |
like CVS\(aq $Log$, are not supported. A keyword template map "Log = |
| 15390 |
{desc}" expands to the first line of the changeset description. |
| 15391 |
.SS Commands |
| 15392 |
.SS Uncategorized commands |
| 15393 |
.SS kwdemo |
| 15394 |
.sp |
| 15395 |
print [keywordmaps] configuration and an expansion example: |
| 15396 |
.sp |
| 15397 |
.nf |
| 15398 |
.ft C |
| 15399 |
hg kwdemo [\-d] [\-f RCFILE] [TEMPLATEMAP]... |
| 15400 |
.ft P |
| 15401 |
.fi |
| 15402 |
.sp |
| 15403 |
Show current, custom, or default keyword template maps and their |
| 15404 |
expansions. |
| 15405 |
.sp |
| 15406 |
Extend the current configuration by specifying maps as arguments |
| 15407 |
and using \-f/\-\-rcfile to source an external hgrc file. |
| 15408 |
.sp |
| 15409 |
Use \-d/\-\-default to disable current configuration. |
| 15410 |
.sp |
| 15411 |
See \%\fBhg help templates\fP\: for information on templates and filters. |
| 15412 |
.sp |
| 15413 |
Options: |
| 15414 |
.INDENT 0.0 |
| 15415 |
.TP |
| 15416 |
.B \-d, \-\-default |
| 15417 |
. |
| 15418 |
show default keyword template maps |
| 15419 |
.TP |
| 15420 |
.BI \-f, \-\-rcfile \ <FILE> |
| 15421 |
. |
| 15422 |
read maps from rcfile |
| 15423 |
.UNINDENT |
| 15424 |
.SS kwexpand |
| 15425 |
.sp |
| 15426 |
expand keywords in the working directory: |
| 15427 |
.sp |
| 15428 |
.nf |
| 15429 |
.ft C |
| 15430 |
hg kwexpand [OPTION]... [FILE]... |
| 15431 |
.ft P |
| 15432 |
.fi |
| 15433 |
.sp |
| 15434 |
Run after (re)enabling keyword expansion. |
| 15435 |
.sp |
| 15436 |
kwexpand refuses to run if given files contain local changes. |
| 15437 |
.sp |
| 15438 |
Options: |
| 15439 |
.INDENT 0.0 |
| 15440 |
.TP |
| 15441 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 15442 |
. |
| 15443 |
include names matching the given patterns |
| 15444 |
.TP |
| 15445 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 15446 |
. |
| 15447 |
exclude names matching the given patterns |
| 15448 |
.UNINDENT |
| 15449 |
.sp |
| 15450 |
[+] marked option can be specified multiple times |
| 15451 |
.SS kwfiles |
| 15452 |
.sp |
| 15453 |
show files configured for keyword expansion: |
| 15454 |
.sp |
| 15455 |
.nf |
| 15456 |
.ft C |
| 15457 |
hg kwfiles [OPTION]... [FILE]... |
| 15458 |
.ft P |
| 15459 |
.fi |
| 15460 |
.sp |
| 15461 |
List which files in the working directory are matched by the |
| 15462 |
[keyword] configuration patterns. |
| 15463 |
.sp |
| 15464 |
Useful to prevent inadvertent keyword expansion and to speed up |
| 15465 |
execution by including only files that are actual candidates for |
| 15466 |
expansion. |
| 15467 |
.sp |
| 15468 |
See \%\fBhg help keyword\fP\: on how to construct patterns both for |
| 15469 |
inclusion and exclusion of files. |
| 15470 |
.sp |
| 15471 |
With \-A/\-\-all and \-v/\-\-verbose the codes used to show the status |
| 15472 |
of files are: |
| 15473 |
.sp |
| 15474 |
.nf |
| 15475 |
.ft C |
| 15476 |
K = keyword expansion candidate |
| 15477 |
k = keyword expansion candidate (not tracked) |
| 15478 |
I = ignored |
| 15479 |
i = ignored (not tracked) |
| 15480 |
.ft P |
| 15481 |
.fi |
| 15482 |
.sp |
| 15483 |
Options: |
| 15484 |
.INDENT 0.0 |
| 15485 |
.TP |
| 15486 |
.B \-A, \-\-all |
| 15487 |
. |
| 15488 |
show keyword status flags of all files |
| 15489 |
.TP |
| 15490 |
.B \-i, \-\-ignore |
| 15491 |
. |
| 15492 |
show files excluded from expansion |
| 15493 |
.TP |
| 15494 |
.B \-u, \-\-unknown |
| 15495 |
. |
| 15496 |
only show unknown (not tracked) files |
| 15497 |
.TP |
| 15498 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 15499 |
. |
| 15500 |
include names matching the given patterns |
| 15501 |
.TP |
| 15502 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 15503 |
. |
| 15504 |
exclude names matching the given patterns |
| 15505 |
.UNINDENT |
| 15506 |
.sp |
| 15507 |
[+] marked option can be specified multiple times |
| 15508 |
.SS kwshrink |
| 15509 |
.sp |
| 15510 |
revert expanded keywords in the working directory: |
| 15511 |
.sp |
| 15512 |
.nf |
| 15513 |
.ft C |
| 15514 |
hg kwshrink [OPTION]... [FILE]... |
| 15515 |
.ft P |
| 15516 |
.fi |
| 15517 |
.sp |
| 15518 |
Must be run before changing/disabling active keywords. |
| 15519 |
.sp |
| 15520 |
kwshrink refuses to run if given files contain local changes. |
| 15521 |
.sp |
| 15522 |
Options: |
| 15523 |
.INDENT 0.0 |
| 15524 |
.TP |
| 15525 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 15526 |
. |
| 15527 |
include names matching the given patterns |
| 15528 |
.TP |
| 15529 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 15530 |
. |
| 15531 |
exclude names matching the given patterns |
| 15532 |
.UNINDENT |
| 15533 |
.sp |
| 15534 |
[+] marked option can be specified multiple times |
| 15535 |
.SS largefiles |
| 15536 |
.sp |
| 15537 |
track large binary files |
| 15538 |
.sp |
| 15539 |
Large binary files tend to be not very compressible, not very |
| 15540 |
diffable, and not at all mergeable. Such files are not handled |
| 15541 |
efficiently by Mercurial\(aqs storage format (revlog), which is based on |
| 15542 |
compressed binary deltas; storing large binary files as regular |
| 15543 |
Mercurial files wastes bandwidth and disk space and increases |
| 15544 |
Mercurial\(aqs memory usage. The largefiles extension addresses these |
| 15545 |
problems by adding a centralized client\-server layer on top of |
| 15546 |
Mercurial: largefiles live in a \fIcentral store\fP out on the network |
| 15547 |
somewhere, and you only fetch the revisions that you need when you |
| 15548 |
need them. |
| 15549 |
.sp |
| 15550 |
largefiles works by maintaining a "standin file" in .hglf/ for each |
| 15551 |
largefile. The standins are small (41 bytes: an SHA\-1 hash plus |
| 15552 |
newline) and are tracked by Mercurial. Largefile revisions are |
| 15553 |
identified by the SHA\-1 hash of their contents, which is written to |
| 15554 |
the standin. largefiles uses that revision ID to get/put largefile |
| 15555 |
revisions from/to the central store. This saves both disk space and |
| 15556 |
bandwidth, since you don\(aqt need to retrieve all historical revisions |
| 15557 |
of large files when you clone or pull. |
| 15558 |
.sp |
| 15559 |
To start a new repository or add new large binary files, just add |
| 15560 |
\-\-large to your \%\fBhg add\fP\: command. For example: |
| 15561 |
.sp |
| 15562 |
.nf |
| 15563 |
.ft C |
| 15564 |
$ dd if=/dev/urandom of=randomdata count=2000 |
| 15565 |
$ hg add \-\-large randomdata |
| 15566 |
$ hg commit \-m "add randomdata as a largefile" |
| 15567 |
.ft P |
| 15568 |
.fi |
| 15569 |
.sp |
| 15570 |
When you push a changeset that adds/modifies largefiles to a remote |
| 15571 |
repository, its largefile revisions will be uploaded along with it. |
| 15572 |
Note that the remote Mercurial must also have the largefiles extension |
| 15573 |
enabled for this to work. |
| 15574 |
.sp |
| 15575 |
When you pull a changeset that affects largefiles from a remote |
| 15576 |
repository, the largefiles for the changeset will by default not be |
| 15577 |
pulled down. However, when you update to such a revision, any |
| 15578 |
largefiles needed by that revision are downloaded and cached (if |
| 15579 |
they have never been downloaded before). One way to pull largefiles |
| 15580 |
when pulling is thus to use \-\-update, which will update your working |
| 15581 |
copy to the latest pulled revision (and thereby downloading any new |
| 15582 |
largefiles). |
| 15583 |
.sp |
| 15584 |
If you want to pull largefiles you don\(aqt need for update yet, then |
| 15585 |
you can use pull with the \fI\-\-lfrev\fP option or the \%\fBhg lfpull\fP\: command. |
| 15586 |
.sp |
| 15587 |
If you know you are pulling from a non\-default location and want to |
| 15588 |
download all the largefiles that correspond to the new changesets at |
| 15589 |
the same time, then you can pull with \fI\-\-lfrev "pulled()"\fP. |
| 15590 |
.sp |
| 15591 |
If you just want to ensure that you will have the largefiles needed to |
| 15592 |
merge or rebase with new heads that you are pulling, then you can pull |
| 15593 |
with \fI\-\-lfrev "head(pulled())"\fP flag to pre\-emptively download any largefiles |
| 15594 |
that are new in the heads you are pulling. |
| 15595 |
.sp |
| 15596 |
Keep in mind that network access may now be required to update to |
| 15597 |
changesets that you have not previously updated to. The nature of the |
| 15598 |
largefiles extension means that updating is no longer guaranteed to |
| 15599 |
be a local\-only operation. |
| 15600 |
.sp |
| 15601 |
If you already have large files tracked by Mercurial without the |
| 15602 |
largefiles extension, you will need to convert your repository in |
| 15603 |
order to benefit from largefiles. This is done with the |
| 15604 |
\%\fBhg lfconvert\fP\: command: |
| 15605 |
.sp |
| 15606 |
.nf |
| 15607 |
.ft C |
| 15608 |
$ hg lfconvert \-\-size 10 oldrepo newrepo |
| 15609 |
.ft P |
| 15610 |
.fi |
| 15611 |
.sp |
| 15612 |
In repositories that already have largefiles in them, any new file |
| 15613 |
over 10MB will automatically be added as a largefile. To change this |
| 15614 |
threshold, set \fBlargefiles.minsize\fP in your Mercurial config file |
| 15615 |
to the minimum size in megabytes to track as a largefile, or use the |
| 15616 |
\-\-lfsize option to the add command (also in megabytes): |
| 15617 |
.sp |
| 15618 |
.nf |
| 15619 |
.ft C |
| 15620 |
[largefiles] |
| 15621 |
minsize = 2 |
| 15622 |
|
| 15623 |
$ hg add \-\-lfsize 2 |
| 15624 |
.ft P |
| 15625 |
.fi |
| 15626 |
.sp |
| 15627 |
The \fBlargefiles.patterns\fP config option allows you to specify a list |
| 15628 |
of filename patterns (see \%\fBhg help patterns\fP\:) that should always be |
| 15629 |
tracked as largefiles: |
| 15630 |
.sp |
| 15631 |
.nf |
| 15632 |
.ft C |
| 15633 |
[largefiles] |
| 15634 |
patterns = |
| 15635 |
*.jpg |
| 15636 |
re:.*\e.(png|bmp)$ |
| 15637 |
library.zip |
| 15638 |
content/audio/* |
| 15639 |
.ft P |
| 15640 |
.fi |
| 15641 |
.sp |
| 15642 |
Files that match one of these patterns will be added as largefiles |
| 15643 |
regardless of their size. |
| 15644 |
.sp |
| 15645 |
The \fBlargefiles.minsize\fP and \fBlargefiles.patterns\fP config options |
| 15646 |
will be ignored for any repositories not already containing a |
| 15647 |
largefile. To add the first largefile to a repository, you must |
| 15648 |
explicitly do so with the \-\-large flag passed to the \%\fBhg add\fP\: |
| 15649 |
command. |
| 15650 |
.SS Commands |
| 15651 |
.SS Uncategorized commands |
| 15652 |
.SS lfconvert |
| 15653 |
.sp |
| 15654 |
convert a normal repository to a largefiles repository: |
| 15655 |
.sp |
| 15656 |
.nf |
| 15657 |
.ft C |
| 15658 |
hg lfconvert SOURCE DEST [FILE ...] |
| 15659 |
.ft P |
| 15660 |
.fi |
| 15661 |
.sp |
| 15662 |
Convert repository SOURCE to a new repository DEST, identical to |
| 15663 |
SOURCE except that certain files will be converted as largefiles: |
| 15664 |
specifically, any file that matches any PATTERN \fIor\fP whose size is |
| 15665 |
above the minimum size threshold is converted as a largefile. The |
| 15666 |
size used to determine whether or not to track a file as a |
| 15667 |
largefile is the size of the first version of the file. The |
| 15668 |
minimum size can be specified either with \-\-size or in |
| 15669 |
configuration as \fBlargefiles.size\fP. |
| 15670 |
.sp |
| 15671 |
After running this command you will need to make sure that |
| 15672 |
largefiles is enabled anywhere you intend to push the new |
| 15673 |
repository. |
| 15674 |
.sp |
| 15675 |
Use \-\-to\-normal to convert largefiles back to normal files; after |
| 15676 |
this, the DEST repository can be used without largefiles at all. |
| 15677 |
.sp |
| 15678 |
Options: |
| 15679 |
.INDENT 0.0 |
| 15680 |
.TP |
| 15681 |
.BI \-s, \-\-size \ <SIZE> |
| 15682 |
. |
| 15683 |
minimum size (MB) for files to be converted as largefiles |
| 15684 |
.TP |
| 15685 |
.B \-\-to\-normal |
| 15686 |
. |
| 15687 |
convert from a largefiles repo to a normal repo |
| 15688 |
.UNINDENT |
| 15689 |
.SS lfpull |
| 15690 |
.sp |
| 15691 |
pull largefiles for the specified revisions from the specified source: |
| 15692 |
.sp |
| 15693 |
.nf |
| 15694 |
.ft C |
| 15695 |
hg lfpull \-r REV... [\-e CMD] [\-\-remotecmd CMD] [SOURCE] |
| 15696 |
.ft P |
| 15697 |
.fi |
| 15698 |
.sp |
| 15699 |
Pull largefiles that are referenced from local changesets but missing |
| 15700 |
locally, pulling from a remote repository to the local cache. |
| 15701 |
.sp |
| 15702 |
If SOURCE is omitted, the \(aqdefault\(aq path will be used. |
| 15703 |
See \%\fBhg help urls\fP\: for more information. |
| 15704 |
.sp |
| 15705 |
Some examples: |
| 15706 |
.INDENT 0.0 |
| 15707 |
.IP \(bu 2 |
| 15708 |
. |
| 15709 |
pull largefiles for all branch heads: |
| 15710 |
.sp |
| 15711 |
.nf |
| 15712 |
.ft C |
| 15713 |
hg lfpull \-r "head() and not closed()" |
| 15714 |
.ft P |
| 15715 |
.fi |
| 15716 |
.IP \(bu 2 |
| 15717 |
. |
| 15718 |
pull largefiles on the default branch: |
| 15719 |
.sp |
| 15720 |
.nf |
| 15721 |
.ft C |
| 15722 |
hg lfpull \-r "branch(default)" |
| 15723 |
.ft P |
| 15724 |
.fi |
| 15725 |
.UNINDENT |
| 15726 |
.sp |
| 15727 |
Options: |
| 15728 |
.INDENT 0.0 |
| 15729 |
.TP |
| 15730 |
.BI \-r, \-\-rev \ <VALUE[+]> |
| 15731 |
. |
| 15732 |
pull largefiles for these revisions |
| 15733 |
.TP |
| 15734 |
.BI \-e, \-\-ssh \ <CMD> |
| 15735 |
. |
| 15736 |
specify ssh command to use |
| 15737 |
.TP |
| 15738 |
.BI \-\-remotecmd \ <CMD> |
| 15739 |
. |
| 15740 |
specify hg command to run on the remote side |
| 15741 |
.TP |
| 15742 |
.B \-\-insecure |
| 15743 |
. |
| 15744 |
do not verify server certificate (ignoring web.cacerts config) |
| 15745 |
.UNINDENT |
| 15746 |
.sp |
| 15747 |
[+] marked option can be specified multiple times |
| 15748 |
.SS lfs |
| 15749 |
.sp |
| 15750 |
lfs \- large file support (EXPERIMENTAL) |
| 15751 |
.sp |
| 15752 |
This extension allows large files to be tracked outside of the normal |
| 15753 |
repository storage and stored on a centralized server, similar to the |
| 15754 |
\fBlargefiles\fP extension. The \fBgit\-lfs\fP protocol is used when |
| 15755 |
communicating with the server, so existing git infrastructure can be |
| 15756 |
harnessed. Even though the files are stored outside of the repository, |
| 15757 |
they are still integrity checked in the same manner as normal files. |
| 15758 |
.sp |
| 15759 |
The files stored outside of the repository are downloaded on demand, |
| 15760 |
which reduces the time to clone, and possibly the local disk usage. |
| 15761 |
This changes fundamental workflows in a DVCS, so careful thought |
| 15762 |
should be given before deploying it. \%\fBhg convert\fP\: can be used to |
| 15763 |
convert LFS repositories to normal repositories that no longer |
| 15764 |
require this extension, and do so without changing the commit hashes. |
| 15765 |
This allows the extension to be disabled if the centralized workflow |
| 15766 |
becomes burdensome. However, the pre and post convert clones will |
| 15767 |
not be able to communicate with each other unless the extension is |
| 15768 |
enabled on both. |
| 15769 |
.sp |
| 15770 |
To start a new repository, or to add LFS files to an existing one, just |
| 15771 |
create an \fB.hglfs\fP file as described below in the root directory of |
| 15772 |
the repository. Typically, this file should be put under version |
| 15773 |
control, so that the settings will propagate to other repositories with |
| 15774 |
push and pull. During any commit, Mercurial will consult this file to |
| 15775 |
determine if an added or modified file should be stored externally. The |
| 15776 |
type of storage depends on the characteristics of the file at each |
| 15777 |
commit. A file that is near a size threshold may switch back and forth |
| 15778 |
between LFS and normal storage, as needed. |
| 15779 |
.sp |
| 15780 |
Alternately, both normal repositories and largefile controlled |
| 15781 |
repositories can be converted to LFS by using \%\fBhg convert\fP\: and the |
| 15782 |
\fBlfs.track\fP config option described below. The \fB.hglfs\fP file |
| 15783 |
should then be created and added, to control subsequent LFS selection. |
| 15784 |
The hashes are also unchanged in this case. The LFS and non\-LFS |
| 15785 |
repositories can be distinguished because the LFS repository will |
| 15786 |
abort any command if this extension is disabled. |
| 15787 |
.sp |
| 15788 |
Committed LFS files are held locally, until the repository is pushed. |
| 15789 |
Prior to pushing the normal repository data, the LFS files that are |
| 15790 |
tracked by the outgoing commits are automatically uploaded to the |
| 15791 |
configured central server. No LFS files are transferred on |
| 15792 |
\%\fBhg pull\fP\: or \%\fBhg clone\fP\:. Instead, the files are downloaded on |
| 15793 |
demand as they need to be read, if a cached copy cannot be found |
| 15794 |
locally. Both committing and downloading an LFS file will link the |
| 15795 |
file to a usercache, to speed up future access. See the \fIusercache\fP |
| 15796 |
config setting described below. |
| 15797 |
.sp |
| 15798 |
The extension reads its configuration from a versioned \fB.hglfs\fP |
| 15799 |
configuration file found in the root of the working directory. The |
| 15800 |
\fB.hglfs\fP file uses the same syntax as all other Mercurial |
| 15801 |
configuration files. It uses a single section, \fB[track]\fP. |
| 15802 |
.sp |
| 15803 |
The \fB[track]\fP section specifies which files are stored as LFS (or |
| 15804 |
not). Each line is keyed by a file pattern, with a predicate value. |
| 15805 |
The first file pattern match is used, so put more specific patterns |
| 15806 |
first. The available predicates are \fBall()\fP, \fBnone()\fP, and |
| 15807 |
\fBsize()\fP. See "hg help filesets.size" for the latter. |
| 15808 |
.sp |
| 15809 |
Example versioned \fB.hglfs\fP file: |
| 15810 |
.sp |
| 15811 |
.nf |
| 15812 |
.ft C |
| 15813 |
[track] |
| 15814 |
# No Makefile or python file, anywhere, will be LFS |
| 15815 |
**Makefile = none() |
| 15816 |
**.py = none() |
| 15817 |
|
| 15818 |
**.zip = all() |
| 15819 |
**.exe = size(">1MB") |
| 15820 |
|
| 15821 |
# Catchall for everything not matched above |
| 15822 |
** = size(">10MB") |
| 15823 |
.ft P |
| 15824 |
.fi |
| 15825 |
.sp |
| 15826 |
Configs: |
| 15827 |
.sp |
| 15828 |
.nf |
| 15829 |
.ft C |
| 15830 |
[lfs] |
| 15831 |
# Remote endpoint. Multiple protocols are supported: |
| 15832 |
# \- http(s)://user:[email protected]/path |
| 15833 |
# git\-lfs endpoint |
| 15834 |
# \- file:///tmp/path |
| 15835 |
# local filesystem, usually for testing |
| 15836 |
# if unset, lfs will assume the remote repository also handles blob storage |
| 15837 |
# for http(s) URLs. Otherwise, lfs will prompt to set this when it must |
| 15838 |
# use this value. |
| 15839 |
# (default: unset) |
| 15840 |
url = https://example.com/repo.git/info/lfs |
| 15841 |
|
| 15842 |
# Which files to track in LFS. Path tests are "**.extname" for file |
| 15843 |
# extensions, and "path:under/some/directory" for path prefix. Both |
| 15844 |
# are relative to the repository root. |
| 15845 |
# File size can be tested with the "size()" fileset, and tests can be |
| 15846 |
# joined with fileset operators. (See "hg help filesets.operators".) |
| 15847 |
# |
| 15848 |
# Some examples: |
| 15849 |
# \- all() # everything |
| 15850 |
# \- none() # nothing |
| 15851 |
# \- size(">20MB") # larger than 20MB |
| 15852 |
# \- !**.txt # anything not a *.txt file |
| 15853 |
# \- **.zip | **.tar.gz | **.7z # some types of compressed files |
| 15854 |
# \- path:bin # files under "bin" in the project root |
| 15855 |
# \- (**.php & size(">2MB")) | (**.js & size(">5MB")) | **.tar.gz |
| 15856 |
# | (path:bin & !path:/bin/README) | size(">1GB") |
| 15857 |
# (default: none()) |
| 15858 |
# |
| 15859 |
# This is ignored if there is a tracked \(aq.hglfs\(aq file, and this setting |
| 15860 |
# will eventually be deprecated and removed. |
| 15861 |
track = size(">10M") |
| 15862 |
|
| 15863 |
# how many times to retry before giving up on transferring an object |
| 15864 |
retry = 5 |
| 15865 |
|
| 15866 |
# the local directory to store lfs files for sharing across local clones. |
| 15867 |
# If not set, the cache is located in an OS specific cache location. |
| 15868 |
usercache = /path/to/global/cache |
| 15869 |
.ft P |
| 15870 |
.fi |
| 15871 |
.SS Commands |
| 15872 |
.SS logtoprocess |
| 15873 |
.sp |
| 15874 |
send ui.log() data to a subprocess (EXPERIMENTAL) |
| 15875 |
.sp |
| 15876 |
This extension lets you specify a shell command per ui.log() event, |
| 15877 |
sending all remaining arguments to as environment variables to that command. |
| 15878 |
.sp |
| 15879 |
Positional arguments construct a log message, which is passed in the \fIMSG1\fP |
| 15880 |
environment variables. Each keyword argument is set as a \fIOPT_UPPERCASE_KEY\fP |
| 15881 |
variable (so the key is uppercased, and prefixed with \fIOPT_\fP). The original |
| 15882 |
event name is passed in the \fIEVENT\fP environment variable, and the process ID |
| 15883 |
of mercurial is given in \fIHGPID\fP. |
| 15884 |
.sp |
| 15885 |
So given a call \fIui.log(\(aqfoo\(aq, \(aqbar %s |
| 15886 |
\(aq, \(aqbaz\(aq, spam=\(aqeggs\(aq), a script |
| 15887 |
configured for the \(gafoo\fP event can expect an environment with \fIMSG1=bar baz\fP, |
| 15888 |
and \fIOPT_SPAM=eggs\fP. |
| 15889 |
.sp |
| 15890 |
Scripts are configured in the \fI[logtoprocess]\fP section, each key an event name. |
| 15891 |
For example: |
| 15892 |
.sp |
| 15893 |
.nf |
| 15894 |
.ft C |
| 15895 |
[logtoprocess] |
| 15896 |
commandexception = echo "$MSG1" > /var/log/mercurial_exceptions.log |
| 15897 |
.ft P |
| 15898 |
.fi |
| 15899 |
.sp |
| 15900 |
would log the warning message and traceback of any failed command dispatch. |
| 15901 |
.sp |
| 15902 |
Scripts are run asynchronously as detached daemon processes; mercurial will |
| 15903 |
not ensure that they exit cleanly. |
| 15904 |
.SS mq |
| 15905 |
.sp |
| 15906 |
manage a stack of patches |
| 15907 |
.sp |
| 15908 |
This extension lets you work with a stack of patches in a Mercurial |
| 15909 |
repository. It manages two stacks of patches \- all known patches, and |
| 15910 |
applied patches (subset of known patches). |
| 15911 |
.sp |
| 15912 |
Known patches are represented as patch files in the .hg/patches |
| 15913 |
directory. Applied patches are both patch files and changesets. |
| 15914 |
.sp |
| 15915 |
Common tasks (use \%\fBhg help COMMAND\fP\: for more details): |
| 15916 |
.sp |
| 15917 |
.nf |
| 15918 |
.ft C |
| 15919 |
create new patch qnew |
| 15920 |
import existing patch qimport |
| 15921 |
|
| 15922 |
print patch series qseries |
| 15923 |
print applied patches qapplied |
| 15924 |
|
| 15925 |
add known patch to applied stack qpush |
| 15926 |
remove patch from applied stack qpop |
| 15927 |
refresh contents of top applied patch qrefresh |
| 15928 |
.ft P |
| 15929 |
.fi |
| 15930 |
.sp |
| 15931 |
By default, mq will automatically use git patches when required to |
| 15932 |
avoid losing file mode changes, copy records, binary files or empty |
| 15933 |
files creations or deletions. This behavior can be configured with: |
| 15934 |
.sp |
| 15935 |
.nf |
| 15936 |
.ft C |
| 15937 |
[mq] |
| 15938 |
git = auto/keep/yes/no |
| 15939 |
.ft P |
| 15940 |
.fi |
| 15941 |
.sp |
| 15942 |
If set to \(aqkeep\(aq, mq will obey the [diff] section configuration while |
| 15943 |
preserving existing git patches upon qrefresh. If set to \(aqyes\(aq or |
| 15944 |
\(aqno\(aq, mq will override the [diff] section and always generate git or |
| 15945 |
regular patches, possibly losing data in the second case. |
| 15946 |
.sp |
| 15947 |
It may be desirable for mq changesets to be kept in the secret phase (see |
| 15948 |
\%\fBhg help phases\fP\:), which can be enabled with the following setting: |
| 15949 |
.sp |
| 15950 |
.nf |
| 15951 |
.ft C |
| 15952 |
[mq] |
| 15953 |
secret = True |
| 15954 |
.ft P |
| 15955 |
.fi |
| 15956 |
.sp |
| 15957 |
You will by default be managing a patch queue named "patches". You can |
| 15958 |
create other, independent patch queues with the \%\fBhg qqueue\fP\: command. |
| 15959 |
.sp |
| 15960 |
If the working directory contains uncommitted files, qpush, qpop and |
| 15961 |
qgoto abort immediately. If \-f/\-\-force is used, the changes are |
| 15962 |
discarded. Setting: |
| 15963 |
.sp |
| 15964 |
.nf |
| 15965 |
.ft C |
| 15966 |
[mq] |
| 15967 |
keepchanges = True |
| 15968 |
.ft P |
| 15969 |
.fi |
| 15970 |
.sp |
| 15971 |
make them behave as if \-\-keep\-changes were passed, and non\-conflicting |
| 15972 |
local changes will be tolerated and preserved. If incompatible options |
| 15973 |
such as \-f/\-\-force or \-\-exact are passed, this setting is ignored. |
| 15974 |
.sp |
| 15975 |
This extension used to provide a strip command. This command now lives |
| 15976 |
in the strip extension. |
| 15977 |
.SS Commands |
| 15978 |
.SS Repository creation |
| 15979 |
.SS qclone |
| 15980 |
.sp |
| 15981 |
clone main and patch repository at same time: |
| 15982 |
.sp |
| 15983 |
.nf |
| 15984 |
.ft C |
| 15985 |
hg qclone [OPTION]... SOURCE [DEST] |
| 15986 |
.ft P |
| 15987 |
.fi |
| 15988 |
.sp |
| 15989 |
If source is local, destination will have no patches applied. If |
| 15990 |
source is remote, this command can not check if patches are |
| 15991 |
applied in source, so cannot guarantee that patches are not |
| 15992 |
applied in destination. If you clone remote repository, be sure |
| 15993 |
before that it has no patches applied. |
| 15994 |
.sp |
| 15995 |
Source patch repository is looked for in <src>/.hg/patches by |
| 15996 |
default. Use \-p <url> to change. |
| 15997 |
.sp |
| 15998 |
The patch directory must be a nested Mercurial repository, as |
| 15999 |
would be created by \%\fBhg init \-\-mq\fP\:. |
| 16000 |
.sp |
| 16001 |
Return 0 on success. |
| 16002 |
.sp |
| 16003 |
Options: |
| 16004 |
.INDENT 0.0 |
| 16005 |
.TP |
| 16006 |
.B \-\-pull |
| 16007 |
. |
| 16008 |
use pull protocol to copy metadata |
| 16009 |
.TP |
| 16010 |
.B \-U, \-\-noupdate |
| 16011 |
. |
| 16012 |
do not update the new working directories |
| 16013 |
.TP |
| 16014 |
.B \-\-uncompressed |
| 16015 |
. |
| 16016 |
use uncompressed transfer (fast over LAN) |
| 16017 |
.TP |
| 16018 |
.BI \-p, \-\-patches \ <REPO> |
| 16019 |
. |
| 16020 |
location of source patch repository |
| 16021 |
.TP |
| 16022 |
.BI \-e, \-\-ssh \ <CMD> |
| 16023 |
. |
| 16024 |
specify ssh command to use |
| 16025 |
.TP |
| 16026 |
.BI \-\-remotecmd \ <CMD> |
| 16027 |
. |
| 16028 |
specify hg command to run on the remote side |
| 16029 |
.TP |
| 16030 |
.B \-\-insecure |
| 16031 |
. |
| 16032 |
do not verify server certificate (ignoring web.cacerts config) |
| 16033 |
.UNINDENT |
| 16034 |
.SS qinit |
| 16035 |
.sp |
| 16036 |
init a new queue repository (DEPRECATED): |
| 16037 |
.sp |
| 16038 |
.nf |
| 16039 |
.ft C |
| 16040 |
hg qinit [\-c] |
| 16041 |
.ft P |
| 16042 |
.fi |
| 16043 |
.sp |
| 16044 |
The queue repository is unversioned by default. If |
| 16045 |
\-c/\-\-create\-repo is specified, qinit will create a separate nested |
| 16046 |
repository for patches (qinit \-c may also be run later to convert |
| 16047 |
an unversioned patch repository into a versioned one). You can use |
| 16048 |
qcommit to commit changes to this queue repository. |
| 16049 |
.sp |
| 16050 |
This command is deprecated. Without \-c, it\(aqs implied by other relevant |
| 16051 |
commands. With \-c, use \%\fBhg init \-\-mq\fP\: instead. |
| 16052 |
.sp |
| 16053 |
Options: |
| 16054 |
.INDENT 0.0 |
| 16055 |
.TP |
| 16056 |
.B \-c, \-\-create\-repo |
| 16057 |
. |
| 16058 |
create queue repository |
| 16059 |
.UNINDENT |
| 16060 |
.SS Change creation |
| 16061 |
.SS qcommit |
| 16062 |
.sp |
| 16063 |
commit changes in the queue repository (DEPRECATED): |
| 16064 |
.sp |
| 16065 |
.nf |
| 16066 |
.ft C |
| 16067 |
hg qcommit [OPTION]... [FILE]... |
| 16068 |
.ft P |
| 16069 |
.fi |
| 16070 |
.sp |
| 16071 |
This command is deprecated; use \%\fBhg commit \-\-mq\fP\: instead. |
| 16072 |
.sp |
| 16073 |
Options: |
| 16074 |
.INDENT 0.0 |
| 16075 |
.TP |
| 16076 |
.B \-A, \-\-addremove |
| 16077 |
. |
| 16078 |
mark new/missing files as added/removed before committing |
| 16079 |
.TP |
| 16080 |
.B \-\-close\-branch |
| 16081 |
. |
| 16082 |
mark a branch head as closed |
| 16083 |
.TP |
| 16084 |
.B \-\-amend |
| 16085 |
. |
| 16086 |
amend the parent of the working directory |
| 16087 |
.TP |
| 16088 |
.B \-s, \-\-secret |
| 16089 |
. |
| 16090 |
use the secret phase for committing |
| 16091 |
.TP |
| 16092 |
.B \-\-draft |
| 16093 |
. |
| 16094 |
use the draft phase for committing |
| 16095 |
.TP |
| 16096 |
.B \-e, \-\-edit |
| 16097 |
. |
| 16098 |
invoke editor on commit messages |
| 16099 |
.TP |
| 16100 |
.B \-\-force\-close\-branch |
| 16101 |
. |
| 16102 |
forcibly close branch from a non\-head changeset (ADVANCED) |
| 16103 |
.TP |
| 16104 |
.B \-i, \-\-interactive |
| 16105 |
. |
| 16106 |
use interactive mode |
| 16107 |
.TP |
| 16108 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 16109 |
. |
| 16110 |
include names matching the given patterns |
| 16111 |
.TP |
| 16112 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 16113 |
. |
| 16114 |
exclude names matching the given patterns |
| 16115 |
.TP |
| 16116 |
.BI \-m, \-\-message \ <TEXT> |
| 16117 |
. |
| 16118 |
use text as commit message |
| 16119 |
.TP |
| 16120 |
.BI \-l, \-\-logfile \ <FILE> |
| 16121 |
. |
| 16122 |
read commit message from file |
| 16123 |
.TP |
| 16124 |
.BI \-d, \-\-date \ <DATE> |
| 16125 |
. |
| 16126 |
record the specified date as commit date |
| 16127 |
.TP |
| 16128 |
.BI \-u, \-\-user \ <USER> |
| 16129 |
. |
| 16130 |
record the specified user as committer |
| 16131 |
.TP |
| 16132 |
.B \-S, \-\-subrepos |
| 16133 |
. |
| 16134 |
recurse into subrepositories |
| 16135 |
.UNINDENT |
| 16136 |
.sp |
| 16137 |
[+] marked option can be specified multiple times |
| 16138 |
.\" |
| 16139 |
. |
| 16140 |
.INDENT 0.0 |
| 16141 |
.INDENT 3.5 |
| 16142 |
.sp |
| 16143 |
aliases: qci |
| 16144 |
.UNINDENT |
| 16145 |
.UNINDENT |
| 16146 |
.SS qnew |
| 16147 |
.sp |
| 16148 |
create a new patch: |
| 16149 |
.sp |
| 16150 |
.nf |
| 16151 |
.ft C |
| 16152 |
hg qnew [\-e] [\-m TEXT] [\-l FILE] PATCH [FILE]... |
| 16153 |
.ft P |
| 16154 |
.fi |
| 16155 |
.sp |
| 16156 |
qnew creates a new patch on top of the currently\-applied patch (if |
| 16157 |
any). The patch will be initialized with any outstanding changes |
| 16158 |
in the working directory. You may also use \-I/\-\-include, |
| 16159 |
\-X/\-\-exclude, and/or a list of files after the patch name to add |
| 16160 |
only changes to matching files to the new patch, leaving the rest |
| 16161 |
as uncommitted modifications. |
| 16162 |
.sp |
| 16163 |
\-u/\-\-user and \-d/\-\-date can be used to set the (given) user and |
| 16164 |
date, respectively. \-U/\-\-currentuser and \-D/\-\-currentdate set user |
| 16165 |
to current user and date to current date. |
| 16166 |
.sp |
| 16167 |
\-e/\-\-edit, \-m/\-\-message or \-l/\-\-logfile set the patch header as |
| 16168 |
well as the commit message. If none is specified, the header is |
| 16169 |
empty and the commit message is \(aq[mq]: PATCH\(aq. |
| 16170 |
.sp |
| 16171 |
Use the \-g/\-\-git option to keep the patch in the git extended diff |
| 16172 |
format. Read the diffs help topic for more information on why this |
| 16173 |
is important for preserving permission changes and copy/rename |
| 16174 |
information. |
| 16175 |
.sp |
| 16176 |
Returns 0 on successful creation of a new patch. |
| 16177 |
.sp |
| 16178 |
Options: |
| 16179 |
.INDENT 0.0 |
| 16180 |
.TP |
| 16181 |
.B \-e, \-\-edit |
| 16182 |
. |
| 16183 |
invoke editor on commit messages |
| 16184 |
.TP |
| 16185 |
.B \-f, \-\-force |
| 16186 |
. |
| 16187 |
import uncommitted changes (DEPRECATED) |
| 16188 |
.TP |
| 16189 |
.B \-g, \-\-git |
| 16190 |
. |
| 16191 |
use git extended diff format |
| 16192 |
.TP |
| 16193 |
.B \-U, \-\-currentuser |
| 16194 |
. |
| 16195 |
add "From: <current user>" to patch |
| 16196 |
.TP |
| 16197 |
.BI \-u, \-\-user \ <USER> |
| 16198 |
. |
| 16199 |
add "From: <USER>" to patch |
| 16200 |
.TP |
| 16201 |
.B \-D, \-\-currentdate |
| 16202 |
. |
| 16203 |
add "Date: <current date>" to patch |
| 16204 |
.TP |
| 16205 |
.BI \-d, \-\-date \ <DATE> |
| 16206 |
. |
| 16207 |
add "Date: <DATE>" to patch |
| 16208 |
.TP |
| 16209 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 16210 |
. |
| 16211 |
include names matching the given patterns |
| 16212 |
.TP |
| 16213 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 16214 |
. |
| 16215 |
exclude names matching the given patterns |
| 16216 |
.TP |
| 16217 |
.BI \-m, \-\-message \ <TEXT> |
| 16218 |
. |
| 16219 |
use text as commit message |
| 16220 |
.TP |
| 16221 |
.BI \-l, \-\-logfile \ <FILE> |
| 16222 |
. |
| 16223 |
read commit message from file |
| 16224 |
.UNINDENT |
| 16225 |
.sp |
| 16226 |
[+] marked option can be specified multiple times |
| 16227 |
.SS qrefresh |
| 16228 |
.sp |
| 16229 |
update the current patch: |
| 16230 |
.sp |
| 16231 |
.nf |
| 16232 |
.ft C |
| 16233 |
hg qrefresh [\-I] [\-X] [\-e] [\-m TEXT] [\-l FILE] [\-s] [FILE]... |
| 16234 |
.ft P |
| 16235 |
.fi |
| 16236 |
.sp |
| 16237 |
If any file patterns are provided, the refreshed patch will |
| 16238 |
contain only the modifications that match those patterns; the |
| 16239 |
remaining modifications will remain in the working directory. |
| 16240 |
.sp |
| 16241 |
If \-s/\-\-short is specified, files currently included in the patch |
| 16242 |
will be refreshed just like matched files and remain in the patch. |
| 16243 |
.sp |
| 16244 |
If \-e/\-\-edit is specified, Mercurial will start your configured editor for |
| 16245 |
you to enter a message. In case qrefresh fails, you will find a backup of |
| 16246 |
your message in \fB.hg/last\-message.txt\fP. |
| 16247 |
.sp |
| 16248 |
hg add/remove/copy/rename work as usual, though you might want to |
| 16249 |
use git\-style patches (\-g/\-\-git or [diff] git=1) to track copies |
| 16250 |
and renames. See the diffs help topic for more information on the |
| 16251 |
git diff format. |
| 16252 |
.sp |
| 16253 |
Returns 0 on success. |
| 16254 |
.sp |
| 16255 |
Options: |
| 16256 |
.INDENT 0.0 |
| 16257 |
.TP |
| 16258 |
.B \-e, \-\-edit |
| 16259 |
. |
| 16260 |
invoke editor on commit messages |
| 16261 |
.TP |
| 16262 |
.B \-g, \-\-git |
| 16263 |
. |
| 16264 |
use git extended diff format |
| 16265 |
.TP |
| 16266 |
.B \-s, \-\-short |
| 16267 |
. |
| 16268 |
refresh only files already in the patch and specified files |
| 16269 |
.TP |
| 16270 |
.B \-U, \-\-currentuser |
| 16271 |
. |
| 16272 |
add/update author field in patch with current user |
| 16273 |
.TP |
| 16274 |
.BI \-u, \-\-user \ <USER> |
| 16275 |
. |
| 16276 |
add/update author field in patch with given user |
| 16277 |
.TP |
| 16278 |
.B \-D, \-\-currentdate |
| 16279 |
. |
| 16280 |
add/update date field in patch with current date |
| 16281 |
.TP |
| 16282 |
.BI \-d, \-\-date \ <DATE> |
| 16283 |
. |
| 16284 |
add/update date field in patch with given date |
| 16285 |
.TP |
| 16286 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 16287 |
. |
| 16288 |
include names matching the given patterns |
| 16289 |
.TP |
| 16290 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 16291 |
. |
| 16292 |
exclude names matching the given patterns |
| 16293 |
.TP |
| 16294 |
.BI \-m, \-\-message \ <TEXT> |
| 16295 |
. |
| 16296 |
use text as commit message |
| 16297 |
.TP |
| 16298 |
.BI \-l, \-\-logfile \ <FILE> |
| 16299 |
. |
| 16300 |
read commit message from file |
| 16301 |
.UNINDENT |
| 16302 |
.sp |
| 16303 |
[+] marked option can be specified multiple times |
| 16304 |
.SS Change manipulation |
| 16305 |
.SS qfold |
| 16306 |
.sp |
| 16307 |
fold the named patches into the current patch: |
| 16308 |
.sp |
| 16309 |
.nf |
| 16310 |
.ft C |
| 16311 |
hg qfold [\-e] [\-k] [\-m TEXT] [\-l FILE] PATCH... |
| 16312 |
.ft P |
| 16313 |
.fi |
| 16314 |
.sp |
| 16315 |
Patches must not yet be applied. Each patch will be successively |
| 16316 |
applied to the current patch in the order given. If all the |
| 16317 |
patches apply successfully, the current patch will be refreshed |
| 16318 |
with the new cumulative patch, and the folded patches will be |
| 16319 |
deleted. With \-k/\-\-keep, the folded patch files will not be |
| 16320 |
removed afterwards. |
| 16321 |
.sp |
| 16322 |
The header for each folded patch will be concatenated with the |
| 16323 |
current patch header, separated by a line of \fB* * *\fP. |
| 16324 |
.sp |
| 16325 |
Returns 0 on success. |
| 16326 |
.sp |
| 16327 |
Options: |
| 16328 |
.INDENT 0.0 |
| 16329 |
.TP |
| 16330 |
.B \-e, \-\-edit |
| 16331 |
. |
| 16332 |
invoke editor on commit messages |
| 16333 |
.TP |
| 16334 |
.B \-k, \-\-keep |
| 16335 |
. |
| 16336 |
keep folded patch files |
| 16337 |
.TP |
| 16338 |
.BI \-m, \-\-message \ <TEXT> |
| 16339 |
. |
| 16340 |
use text as commit message |
| 16341 |
.TP |
| 16342 |
.BI \-l, \-\-logfile \ <FILE> |
| 16343 |
. |
| 16344 |
read commit message from file |
| 16345 |
.UNINDENT |
| 16346 |
.SS Change organization |
| 16347 |
.SS qapplied |
| 16348 |
.sp |
| 16349 |
print the patches already applied: |
| 16350 |
.sp |
| 16351 |
.nf |
| 16352 |
.ft C |
| 16353 |
hg qapplied [\-1] [\-s] [PATCH] |
| 16354 |
.ft P |
| 16355 |
.fi |
| 16356 |
.sp |
| 16357 |
Returns 0 on success. |
| 16358 |
.sp |
| 16359 |
Options: |
| 16360 |
.INDENT 0.0 |
| 16361 |
.TP |
| 16362 |
.B \-1, \-\-last |
| 16363 |
. |
| 16364 |
show only the preceding applied patch |
| 16365 |
.TP |
| 16366 |
.B \-s, \-\-summary |
| 16367 |
. |
| 16368 |
print first line of patch header |
| 16369 |
.UNINDENT |
| 16370 |
.SS qdelete |
| 16371 |
.sp |
| 16372 |
remove patches from queue: |
| 16373 |
.sp |
| 16374 |
.nf |
| 16375 |
.ft C |
| 16376 |
hg qdelete [\-k] [PATCH]... |
| 16377 |
.ft P |
| 16378 |
.fi |
| 16379 |
.sp |
| 16380 |
The patches must not be applied, and at least one patch is required. Exact |
| 16381 |
patch identifiers must be given. With \-k/\-\-keep, the patch files are |
| 16382 |
preserved in the patch directory. |
| 16383 |
.sp |
| 16384 |
To stop managing a patch and move it into permanent history, |
| 16385 |
use the \%\fBhg qfinish\fP\: command. |
| 16386 |
.sp |
| 16387 |
Options: |
| 16388 |
.INDENT 0.0 |
| 16389 |
.TP |
| 16390 |
.B \-k, \-\-keep |
| 16391 |
. |
| 16392 |
keep patch file |
| 16393 |
.TP |
| 16394 |
.BI \-r, \-\-rev \ <REV[+]> |
| 16395 |
. |
| 16396 |
stop managing a revision (DEPRECATED) |
| 16397 |
.UNINDENT |
| 16398 |
.sp |
| 16399 |
[+] marked option can be specified multiple times |
| 16400 |
.\" |
| 16401 |
. |
| 16402 |
.INDENT 0.0 |
| 16403 |
.INDENT 3.5 |
| 16404 |
.sp |
| 16405 |
aliases: qremove qrm |
| 16406 |
.UNINDENT |
| 16407 |
.UNINDENT |
| 16408 |
.SS qfinish |
| 16409 |
.sp |
| 16410 |
move applied patches into repository history: |
| 16411 |
.sp |
| 16412 |
.nf |
| 16413 |
.ft C |
| 16414 |
hg qfinish [\-a] [REV]... |
| 16415 |
.ft P |
| 16416 |
.fi |
| 16417 |
.sp |
| 16418 |
Finishes the specified revisions (corresponding to applied |
| 16419 |
patches) by moving them out of mq control into regular repository |
| 16420 |
history. |
| 16421 |
.sp |
| 16422 |
Accepts a revision range or the \-a/\-\-applied option. If \-\-applied |
| 16423 |
is specified, all applied mq revisions are removed from mq |
| 16424 |
control. Otherwise, the given revisions must be at the base of the |
| 16425 |
stack of applied patches. |
| 16426 |
.sp |
| 16427 |
This can be especially useful if your changes have been applied to |
| 16428 |
an upstream repository, or if you are about to push your changes |
| 16429 |
to upstream. |
| 16430 |
.sp |
| 16431 |
Returns 0 on success. |
| 16432 |
.sp |
| 16433 |
Options: |
| 16434 |
.INDENT 0.0 |
| 16435 |
.TP |
| 16436 |
.B \-a, \-\-applied |
| 16437 |
. |
| 16438 |
finish all applied changesets |
| 16439 |
.UNINDENT |
| 16440 |
.SS qgoto |
| 16441 |
.sp |
| 16442 |
push or pop patches until named patch is at top of stack: |
| 16443 |
.sp |
| 16444 |
.nf |
| 16445 |
.ft C |
| 16446 |
hg qgoto [OPTION]... PATCH |
| 16447 |
.ft P |
| 16448 |
.fi |
| 16449 |
.sp |
| 16450 |
Returns 0 on success. |
| 16451 |
.sp |
| 16452 |
Options: |
| 16453 |
.INDENT 0.0 |
| 16454 |
.TP |
| 16455 |
.B \-\-keep\-changes |
| 16456 |
. |
| 16457 |
tolerate non\-conflicting local changes |
| 16458 |
.TP |
| 16459 |
.B \-f, \-\-force |
| 16460 |
. |
| 16461 |
overwrite any local changes |
| 16462 |
.TP |
| 16463 |
.B \-\-no\-backup |
| 16464 |
. |
| 16465 |
do not save backup copies of files |
| 16466 |
.UNINDENT |
| 16467 |
.SS qguard |
| 16468 |
.sp |
| 16469 |
set or print guards for a patch: |
| 16470 |
.sp |
| 16471 |
.nf |
| 16472 |
.ft C |
| 16473 |
hg qguard [\-l] [\-n] [PATCH] [\-\- [+GUARD]... [\-GUARD]...] |
| 16474 |
.ft P |
| 16475 |
.fi |
| 16476 |
.sp |
| 16477 |
Guards control whether a patch can be pushed. A patch with no |
| 16478 |
guards is always pushed. A patch with a positive guard ("+foo") is |
| 16479 |
pushed only if the \%\fBhg qselect\fP\: command has activated it. A patch with |
| 16480 |
a negative guard ("\-foo") is never pushed if the \%\fBhg qselect\fP\: command |
| 16481 |
has activated it. |
| 16482 |
.sp |
| 16483 |
With no arguments, print the currently active guards. |
| 16484 |
With arguments, set guards for the named patch. |
| 16485 |
.IP Note |
| 16486 |
. |
| 16487 |
Specifying negative guards now requires \(aq\-\-\(aq. |
| 16488 |
.RE |
| 16489 |
.sp |
| 16490 |
To set guards on another patch: |
| 16491 |
.sp |
| 16492 |
.nf |
| 16493 |
.ft C |
| 16494 |
hg qguard other.patch \-\- +2.6.17 \-stable |
| 16495 |
.ft P |
| 16496 |
.fi |
| 16497 |
.sp |
| 16498 |
Returns 0 on success. |
| 16499 |
.sp |
| 16500 |
Options: |
| 16501 |
.INDENT 0.0 |
| 16502 |
.TP |
| 16503 |
.B \-l, \-\-list |
| 16504 |
. |
| 16505 |
list all patches and guards |
| 16506 |
.TP |
| 16507 |
.B \-n, \-\-none |
| 16508 |
. |
| 16509 |
drop all guards |
| 16510 |
.UNINDENT |
| 16511 |
.SS qheader |
| 16512 |
.sp |
| 16513 |
print the header of the topmost or specified patch: |
| 16514 |
.sp |
| 16515 |
.nf |
| 16516 |
.ft C |
| 16517 |
hg qheader [PATCH] |
| 16518 |
.ft P |
| 16519 |
.fi |
| 16520 |
.sp |
| 16521 |
Returns 0 on success. |
| 16522 |
.SS qnext |
| 16523 |
.sp |
| 16524 |
print the name of the next pushable patch: |
| 16525 |
.sp |
| 16526 |
.nf |
| 16527 |
.ft C |
| 16528 |
hg qnext [\-s] |
| 16529 |
.ft P |
| 16530 |
.fi |
| 16531 |
.sp |
| 16532 |
Returns 0 on success. |
| 16533 |
.sp |
| 16534 |
Options: |
| 16535 |
.INDENT 0.0 |
| 16536 |
.TP |
| 16537 |
.B \-s, \-\-summary |
| 16538 |
. |
| 16539 |
print first line of patch header |
| 16540 |
.UNINDENT |
| 16541 |
.SS qpop |
| 16542 |
.sp |
| 16543 |
pop the current patch off the stack: |
| 16544 |
.sp |
| 16545 |
.nf |
| 16546 |
.ft C |
| 16547 |
hg qpop [\-a] [\-f] [PATCH | INDEX] |
| 16548 |
.ft P |
| 16549 |
.fi |
| 16550 |
.sp |
| 16551 |
Without argument, pops off the top of the patch stack. If given a |
| 16552 |
patch name, keeps popping off patches until the named patch is at |
| 16553 |
the top of the stack. |
| 16554 |
.sp |
| 16555 |
By default, abort if the working directory contains uncommitted |
| 16556 |
changes. With \-\-keep\-changes, abort only if the uncommitted files |
| 16557 |
overlap with patched files. With \-f/\-\-force, backup and discard |
| 16558 |
changes made to such files. |
| 16559 |
.sp |
| 16560 |
Return 0 on success. |
| 16561 |
.sp |
| 16562 |
Options: |
| 16563 |
.INDENT 0.0 |
| 16564 |
.TP |
| 16565 |
.B \-a, \-\-all |
| 16566 |
. |
| 16567 |
pop all patches |
| 16568 |
.TP |
| 16569 |
.BI \-n, \-\-name \ <NAME> |
| 16570 |
. |
| 16571 |
queue name to pop (DEPRECATED) |
| 16572 |
.TP |
| 16573 |
.B \-\-keep\-changes |
| 16574 |
. |
| 16575 |
tolerate non\-conflicting local changes |
| 16576 |
.TP |
| 16577 |
.B \-f, \-\-force |
| 16578 |
. |
| 16579 |
forget any local changes to patched files |
| 16580 |
.TP |
| 16581 |
.B \-\-no\-backup |
| 16582 |
. |
| 16583 |
do not save backup copies of files |
| 16584 |
.UNINDENT |
| 16585 |
.SS qprev |
| 16586 |
.sp |
| 16587 |
print the name of the preceding applied patch: |
| 16588 |
.sp |
| 16589 |
.nf |
| 16590 |
.ft C |
| 16591 |
hg qprev [\-s] |
| 16592 |
.ft P |
| 16593 |
.fi |
| 16594 |
.sp |
| 16595 |
Returns 0 on success. |
| 16596 |
.sp |
| 16597 |
Options: |
| 16598 |
.INDENT 0.0 |
| 16599 |
.TP |
| 16600 |
.B \-s, \-\-summary |
| 16601 |
. |
| 16602 |
print first line of patch header |
| 16603 |
.UNINDENT |
| 16604 |
.SS qpush |
| 16605 |
.sp |
| 16606 |
push the next patch onto the stack: |
| 16607 |
.sp |
| 16608 |
.nf |
| 16609 |
.ft C |
| 16610 |
hg qpush [\-f] [\-l] [\-a] [\-\-move] [PATCH | INDEX] |
| 16611 |
.ft P |
| 16612 |
.fi |
| 16613 |
.sp |
| 16614 |
By default, abort if the working directory contains uncommitted |
| 16615 |
changes. With \-\-keep\-changes, abort only if the uncommitted files |
| 16616 |
overlap with patched files. With \-f/\-\-force, backup and patch over |
| 16617 |
uncommitted changes. |
| 16618 |
.sp |
| 16619 |
Return 0 on success. |
| 16620 |
.sp |
| 16621 |
Options: |
| 16622 |
.INDENT 0.0 |
| 16623 |
.TP |
| 16624 |
.B \-\-keep\-changes |
| 16625 |
. |
| 16626 |
tolerate non\-conflicting local changes |
| 16627 |
.TP |
| 16628 |
.B \-f, \-\-force |
| 16629 |
. |
| 16630 |
apply on top of local changes |
| 16631 |
.TP |
| 16632 |
.B \-e, \-\-exact |
| 16633 |
. |
| 16634 |
apply the target patch to its recorded parent |
| 16635 |
.TP |
| 16636 |
.B \-l, \-\-list |
| 16637 |
. |
| 16638 |
list patch name in commit text |
| 16639 |
.TP |
| 16640 |
.B \-a, \-\-all |
| 16641 |
. |
| 16642 |
apply all patches |
| 16643 |
.TP |
| 16644 |
.B \-m, \-\-merge |
| 16645 |
. |
| 16646 |
merge from another queue (DEPRECATED) |
| 16647 |
.TP |
| 16648 |
.BI \-n, \-\-name \ <NAME> |
| 16649 |
. |
| 16650 |
merge queue name (DEPRECATED) |
| 16651 |
.TP |
| 16652 |
.B \-\-move |
| 16653 |
. |
| 16654 |
reorder patch series and apply only the patch |
| 16655 |
.TP |
| 16656 |
.B \-\-no\-backup |
| 16657 |
. |
| 16658 |
do not save backup copies of files |
| 16659 |
.UNINDENT |
| 16660 |
.SS qqueue |
| 16661 |
.sp |
| 16662 |
manage multiple patch queues: |
| 16663 |
.sp |
| 16664 |
.nf |
| 16665 |
.ft C |
| 16666 |
hg qqueue [OPTION] [QUEUE] |
| 16667 |
.ft P |
| 16668 |
.fi |
| 16669 |
.sp |
| 16670 |
Supports switching between different patch queues, as well as creating |
| 16671 |
new patch queues and deleting existing ones. |
| 16672 |
.sp |
| 16673 |
Omitting a queue name or specifying \-l/\-\-list will show you the registered |
| 16674 |
queues \- by default the "normal" patches queue is registered. The currently |
| 16675 |
active queue will be marked with "(active)". Specifying \-\-active will print |
| 16676 |
only the name of the active queue. |
| 16677 |
.sp |
| 16678 |
To create a new queue, use \-c/\-\-create. The queue is automatically made |
| 16679 |
active, except in the case where there are applied patches from the |
| 16680 |
currently active queue in the repository. Then the queue will only be |
| 16681 |
created and switching will fail. |
| 16682 |
.sp |
| 16683 |
To delete an existing queue, use \-\-delete. You cannot delete the currently |
| 16684 |
active queue. |
| 16685 |
.sp |
| 16686 |
Returns 0 on success. |
| 16687 |
.sp |
| 16688 |
Options: |
| 16689 |
.INDENT 0.0 |
| 16690 |
.TP |
| 16691 |
.B \-l, \-\-list |
| 16692 |
. |
| 16693 |
list all available queues |
| 16694 |
.TP |
| 16695 |
.B \-\-active |
| 16696 |
. |
| 16697 |
print name of active queue |
| 16698 |
.TP |
| 16699 |
.B \-c, \-\-create |
| 16700 |
. |
| 16701 |
create new queue |
| 16702 |
.TP |
| 16703 |
.B \-\-rename |
| 16704 |
. |
| 16705 |
rename active queue |
| 16706 |
.TP |
| 16707 |
.B \-\-delete |
| 16708 |
. |
| 16709 |
delete reference to queue |
| 16710 |
.TP |
| 16711 |
.B \-\-purge |
| 16712 |
. |
| 16713 |
delete queue, and remove patch dir |
| 16714 |
.UNINDENT |
| 16715 |
.SS qrename |
| 16716 |
.sp |
| 16717 |
rename a patch: |
| 16718 |
.sp |
| 16719 |
.nf |
| 16720 |
.ft C |
| 16721 |
hg qrename PATCH1 [PATCH2] |
| 16722 |
.ft P |
| 16723 |
.fi |
| 16724 |
.sp |
| 16725 |
With one argument, renames the current patch to PATCH1. |
| 16726 |
With two arguments, renames PATCH1 to PATCH2. |
| 16727 |
.sp |
| 16728 |
Returns 0 on success. |
| 16729 |
.\" |
| 16730 |
. |
| 16731 |
.INDENT 0.0 |
| 16732 |
.INDENT 3.5 |
| 16733 |
.sp |
| 16734 |
aliases: qmv |
| 16735 |
.UNINDENT |
| 16736 |
.UNINDENT |
| 16737 |
.SS qrestore |
| 16738 |
.sp |
| 16739 |
restore the queue state saved by a revision (DEPRECATED): |
| 16740 |
.sp |
| 16741 |
.nf |
| 16742 |
.ft C |
| 16743 |
hg qrestore [\-d] [\-u] REV |
| 16744 |
.ft P |
| 16745 |
.fi |
| 16746 |
.sp |
| 16747 |
This command is deprecated, use \%\fBhg rebase\fP\: instead. |
| 16748 |
.sp |
| 16749 |
Options: |
| 16750 |
.INDENT 0.0 |
| 16751 |
.TP |
| 16752 |
.B \-d, \-\-delete |
| 16753 |
. |
| 16754 |
delete save entry |
| 16755 |
.TP |
| 16756 |
.B \-u, \-\-update |
| 16757 |
. |
| 16758 |
update queue working directory |
| 16759 |
.UNINDENT |
| 16760 |
.SS qsave |
| 16761 |
.sp |
| 16762 |
save current queue state (DEPRECATED): |
| 16763 |
.sp |
| 16764 |
.nf |
| 16765 |
.ft C |
| 16766 |
hg qsave [\-m TEXT] [\-l FILE] [\-c] [\-n NAME] [\-e] [\-f] |
| 16767 |
.ft P |
| 16768 |
.fi |
| 16769 |
.sp |
| 16770 |
This command is deprecated, use \%\fBhg rebase\fP\: instead. |
| 16771 |
.sp |
| 16772 |
Options: |
| 16773 |
.INDENT 0.0 |
| 16774 |
.TP |
| 16775 |
.B \-c, \-\-copy |
| 16776 |
. |
| 16777 |
copy patch directory |
| 16778 |
.TP |
| 16779 |
.BI \-n, \-\-name \ <NAME> |
| 16780 |
. |
| 16781 |
copy directory name |
| 16782 |
.TP |
| 16783 |
.B \-e, \-\-empty |
| 16784 |
. |
| 16785 |
clear queue status file |
| 16786 |
.TP |
| 16787 |
.B \-f, \-\-force |
| 16788 |
. |
| 16789 |
force copy |
| 16790 |
.TP |
| 16791 |
.BI \-m, \-\-message \ <TEXT> |
| 16792 |
. |
| 16793 |
use text as commit message |
| 16794 |
.TP |
| 16795 |
.BI \-l, \-\-logfile \ <FILE> |
| 16796 |
. |
| 16797 |
read commit message from file |
| 16798 |
.UNINDENT |
| 16799 |
.SS qselect |
| 16800 |
.sp |
| 16801 |
set or print guarded patches to push: |
| 16802 |
.sp |
| 16803 |
.nf |
| 16804 |
.ft C |
| 16805 |
hg qselect [OPTION]... [GUARD]... |
| 16806 |
.ft P |
| 16807 |
.fi |
| 16808 |
.sp |
| 16809 |
Use the \%\fBhg qguard\fP\: command to set or print guards on patch, then use |
| 16810 |
qselect to tell mq which guards to use. A patch will be pushed if |
| 16811 |
it has no guards or any positive guards match the currently |
| 16812 |
selected guard, but will not be pushed if any negative guards |
| 16813 |
match the current guard. For example: |
| 16814 |
.sp |
| 16815 |
.nf |
| 16816 |
.ft C |
| 16817 |
qguard foo.patch \-\- \-stable (negative guard) |
| 16818 |
qguard bar.patch +stable (positive guard) |
| 16819 |
qselect stable |
| 16820 |
.ft P |
| 16821 |
.fi |
| 16822 |
.sp |
| 16823 |
This activates the "stable" guard. mq will skip foo.patch (because |
| 16824 |
it has a negative match) but push bar.patch (because it has a |
| 16825 |
positive match). |
| 16826 |
.sp |
| 16827 |
With no arguments, prints the currently active guards. |
| 16828 |
With one argument, sets the active guard. |
| 16829 |
.sp |
| 16830 |
Use \-n/\-\-none to deactivate guards (no other arguments needed). |
| 16831 |
When no guards are active, patches with positive guards are |
| 16832 |
skipped and patches with negative guards are pushed. |
| 16833 |
.sp |
| 16834 |
qselect can change the guards on applied patches. It does not pop |
| 16835 |
guarded patches by default. Use \-\-pop to pop back to the last |
| 16836 |
applied patch that is not guarded. Use \-\-reapply (which implies |
| 16837 |
\-\-pop) to push back to the current patch afterwards, but skip |
| 16838 |
guarded patches. |
| 16839 |
.sp |
| 16840 |
Use \-s/\-\-series to print a list of all guards in the series file |
| 16841 |
(no other arguments needed). Use \-v for more information. |
| 16842 |
.sp |
| 16843 |
Returns 0 on success. |
| 16844 |
.sp |
| 16845 |
Options: |
| 16846 |
.INDENT 0.0 |
| 16847 |
.TP |
| 16848 |
.B \-n, \-\-none |
| 16849 |
. |
| 16850 |
disable all guards |
| 16851 |
.TP |
| 16852 |
.B \-s, \-\-series |
| 16853 |
. |
| 16854 |
list all guards in series file |
| 16855 |
.TP |
| 16856 |
.B \-\-pop |
| 16857 |
. |
| 16858 |
pop to before first guarded applied patch |
| 16859 |
.TP |
| 16860 |
.B \-\-reapply |
| 16861 |
. |
| 16862 |
pop, then reapply patches |
| 16863 |
.UNINDENT |
| 16864 |
.SS qseries |
| 16865 |
.sp |
| 16866 |
print the entire series file: |
| 16867 |
.sp |
| 16868 |
.nf |
| 16869 |
.ft C |
| 16870 |
hg qseries [\-ms] |
| 16871 |
.ft P |
| 16872 |
.fi |
| 16873 |
.sp |
| 16874 |
Returns 0 on success. |
| 16875 |
.sp |
| 16876 |
Options: |
| 16877 |
.INDENT 0.0 |
| 16878 |
.TP |
| 16879 |
.B \-m, \-\-missing |
| 16880 |
. |
| 16881 |
print patches not in series |
| 16882 |
.TP |
| 16883 |
.B \-s, \-\-summary |
| 16884 |
. |
| 16885 |
print first line of patch header |
| 16886 |
.UNINDENT |
| 16887 |
.SS qtop |
| 16888 |
.sp |
| 16889 |
print the name of the current patch: |
| 16890 |
.sp |
| 16891 |
.nf |
| 16892 |
.ft C |
| 16893 |
hg qtop [\-s] |
| 16894 |
.ft P |
| 16895 |
.fi |
| 16896 |
.sp |
| 16897 |
Returns 0 on success. |
| 16898 |
.sp |
| 16899 |
Options: |
| 16900 |
.INDENT 0.0 |
| 16901 |
.TP |
| 16902 |
.B \-s, \-\-summary |
| 16903 |
. |
| 16904 |
print first line of patch header |
| 16905 |
.UNINDENT |
| 16906 |
.SS qunapplied |
| 16907 |
.sp |
| 16908 |
print the patches not yet applied: |
| 16909 |
.sp |
| 16910 |
.nf |
| 16911 |
.ft C |
| 16912 |
hg qunapplied [\-1] [\-s] [PATCH] |
| 16913 |
.ft P |
| 16914 |
.fi |
| 16915 |
.sp |
| 16916 |
Returns 0 on success. |
| 16917 |
.sp |
| 16918 |
Options: |
| 16919 |
.INDENT 0.0 |
| 16920 |
.TP |
| 16921 |
.B \-1, \-\-first |
| 16922 |
. |
| 16923 |
show only the first patch |
| 16924 |
.TP |
| 16925 |
.B \-s, \-\-summary |
| 16926 |
. |
| 16927 |
print first line of patch header |
| 16928 |
.UNINDENT |
| 16929 |
.SS File content management |
| 16930 |
.SS qdiff |
| 16931 |
.sp |
| 16932 |
diff of the current patch and subsequent modifications: |
| 16933 |
.sp |
| 16934 |
.nf |
| 16935 |
.ft C |
| 16936 |
hg qdiff [OPTION]... [FILE]... |
| 16937 |
.ft P |
| 16938 |
.fi |
| 16939 |
.sp |
| 16940 |
Shows a diff which includes the current patch as well as any |
| 16941 |
changes which have been made in the working directory since the |
| 16942 |
last refresh (thus showing what the current patch would become |
| 16943 |
after a qrefresh). |
| 16944 |
.sp |
| 16945 |
Use \%\fBhg diff\fP\: if you only want to see the changes made since the |
| 16946 |
last qrefresh, or \%\fBhg export qtip\fP\: if you want to see changes |
| 16947 |
made by the current patch without including changes made since the |
| 16948 |
qrefresh. |
| 16949 |
.sp |
| 16950 |
Returns 0 on success. |
| 16951 |
.sp |
| 16952 |
Options: |
| 16953 |
.INDENT 0.0 |
| 16954 |
.TP |
| 16955 |
.B \-a, \-\-text |
| 16956 |
. |
| 16957 |
treat all files as text |
| 16958 |
.TP |
| 16959 |
.B \-g, \-\-git |
| 16960 |
. |
| 16961 |
use git extended diff format (DEFAULT: diff.git) |
| 16962 |
.TP |
| 16963 |
.B \-\-binary |
| 16964 |
. |
| 16965 |
generate binary diffs in git mode (default) |
| 16966 |
.TP |
| 16967 |
.B \-\-nodates |
| 16968 |
. |
| 16969 |
omit dates from diff headers |
| 16970 |
.TP |
| 16971 |
.B \-\-noprefix |
| 16972 |
. |
| 16973 |
omit a/ and b/ prefixes from filenames |
| 16974 |
.TP |
| 16975 |
.B \-p, \-\-show\-function |
| 16976 |
. |
| 16977 |
show which function each change is in (DEFAULT: diff.showfunc) |
| 16978 |
.TP |
| 16979 |
.B \-\-reverse |
| 16980 |
. |
| 16981 |
produce a diff that undoes the changes |
| 16982 |
.TP |
| 16983 |
.B \-w, \-\-ignore\-all\-space |
| 16984 |
. |
| 16985 |
ignore white space when comparing lines |
| 16986 |
.TP |
| 16987 |
.B \-b, \-\-ignore\-space\-change |
| 16988 |
. |
| 16989 |
ignore changes in the amount of white space |
| 16990 |
.TP |
| 16991 |
.B \-B, \-\-ignore\-blank\-lines |
| 16992 |
. |
| 16993 |
ignore changes whose lines are all blank |
| 16994 |
.TP |
| 16995 |
.B \-Z, \-\-ignore\-space\-at\-eol |
| 16996 |
. |
| 16997 |
ignore changes in whitespace at EOL |
| 16998 |
.TP |
| 16999 |
.BI \-U, \-\-unified \ <NUM> |
| 17000 |
. |
| 17001 |
number of lines of context to show |
| 17002 |
.TP |
| 17003 |
.B \-\-stat |
| 17004 |
. |
| 17005 |
output diffstat\-style summary of changes |
| 17006 |
.TP |
| 17007 |
.BI \-\-root \ <DIR> |
| 17008 |
. |
| 17009 |
produce diffs relative to subdirectory |
| 17010 |
.TP |
| 17011 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 17012 |
. |
| 17013 |
include names matching the given patterns |
| 17014 |
.TP |
| 17015 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 17016 |
. |
| 17017 |
exclude names matching the given patterns |
| 17018 |
.UNINDENT |
| 17019 |
.sp |
| 17020 |
[+] marked option can be specified multiple times |
| 17021 |
.SS Change import/export |
| 17022 |
.SS qimport |
| 17023 |
.sp |
| 17024 |
import a patch or existing changeset: |
| 17025 |
.sp |
| 17026 |
.nf |
| 17027 |
.ft C |
| 17028 |
hg qimport [\-e] [\-n NAME] [\-f] [\-g] [\-P] [\-r REV]... [FILE]... |
| 17029 |
.ft P |
| 17030 |
.fi |
| 17031 |
.sp |
| 17032 |
The patch is inserted into the series after the last applied |
| 17033 |
patch. If no patches have been applied, qimport prepends the patch |
| 17034 |
to the series. |
| 17035 |
.sp |
| 17036 |
The patch will have the same name as its source file unless you |
| 17037 |
give it a new one with \-n/\-\-name. |
| 17038 |
.sp |
| 17039 |
You can register an existing patch inside the patch directory with |
| 17040 |
the \-e/\-\-existing flag. |
| 17041 |
.sp |
| 17042 |
With \-f/\-\-force, an existing patch of the same name will be |
| 17043 |
overwritten. |
| 17044 |
.sp |
| 17045 |
An existing changeset may be placed under mq control with \-r/\-\-rev |
| 17046 |
(e.g. qimport \-\-rev . \-n patch will place the current revision |
| 17047 |
under mq control). With \-g/\-\-git, patches imported with \-\-rev will |
| 17048 |
use the git diff format. See the diffs help topic for information |
| 17049 |
on why this is important for preserving rename/copy information |
| 17050 |
and permission changes. Use \%\fBhg qfinish\fP\: to remove changesets |
| 17051 |
from mq control. |
| 17052 |
.sp |
| 17053 |
To import a patch from standard input, pass \- as the patch file. |
| 17054 |
When importing from standard input, a patch name must be specified |
| 17055 |
using the \-\-name flag. |
| 17056 |
.sp |
| 17057 |
To import an existing patch while renaming it: |
| 17058 |
.sp |
| 17059 |
.nf |
| 17060 |
.ft C |
| 17061 |
hg qimport \-e existing\-patch \-n new\-name |
| 17062 |
.ft P |
| 17063 |
.fi |
| 17064 |
.sp |
| 17065 |
Returns 0 if import succeeded. |
| 17066 |
.sp |
| 17067 |
Options: |
| 17068 |
.INDENT 0.0 |
| 17069 |
.TP |
| 17070 |
.B \-e, \-\-existing |
| 17071 |
. |
| 17072 |
import file in patch directory |
| 17073 |
.TP |
| 17074 |
.BI \-n, \-\-name \ <NAME> |
| 17075 |
. |
| 17076 |
name of patch file |
| 17077 |
.TP |
| 17078 |
.B \-f, \-\-force |
| 17079 |
. |
| 17080 |
overwrite existing files |
| 17081 |
.TP |
| 17082 |
.BI \-r, \-\-rev \ <REV[+]> |
| 17083 |
. |
| 17084 |
place existing revisions under mq control |
| 17085 |
.TP |
| 17086 |
.B \-g, \-\-git |
| 17087 |
. |
| 17088 |
use git extended diff format |
| 17089 |
.TP |
| 17090 |
.B \-P, \-\-push |
| 17091 |
. |
| 17092 |
qpush after importing |
| 17093 |
.UNINDENT |
| 17094 |
.sp |
| 17095 |
[+] marked option can be specified multiple times |
| 17096 |
.SS narrow |
| 17097 |
.sp |
| 17098 |
create clones which fetch history data for subsets of files (EXPERIMENTAL) |
| 17099 |
.sp |
| 17100 |
Only the server holds the full store: narrow clones will have the full history |
| 17101 |
of fewer files in their store. |
| 17102 |
.SS Concepts |
| 17103 |
.sp |
| 17104 |
The narrow extension introduces a number of concepts that are detailed below. |
| 17105 |
.SS Shape (experimental) |
| 17106 |
.sp |
| 17107 |
A shape is used to define a set of paths to consider for clients of the narrow |
| 17108 |
server. And it does so through the entire history, regardless the state of these |
| 17109 |
files in the heads of the repository (deleted, for example). |
| 17110 |
.sp |
| 17111 |
As of Mercurial 7.2, only a limited scope of all planned shape\-related features |
| 17112 |
have been implemented. Shapes are only directly interacted with by server |
| 17113 |
administrators. They can be used to generate narrowspecs (used by clients) and |
| 17114 |
to create narrow streaming clonebundles. |
| 17115 |
.sp |
| 17116 |
This means that as of Mercurial 7.2, clients have no knowledge of shapes and |
| 17117 |
must be given the set of narrow patterns by server administrators in order to |
| 17118 |
use a streaming clonebundle for a given shape: |
| 17119 |
.sp |
| 17120 |
.nf |
| 17121 |
.ft C |
| 17122 |
$ hg clone server \-\-narrow \-\-narrowspec NARROW_SPEC_FILE |
| 17123 |
.ft P |
| 17124 |
.fi |
| 17125 |
.SS Fingerprint |
| 17126 |
.sp |
| 17127 |
Every shape corresponds to a normalized and minimal set of included and excluded |
| 17128 |
paths in a repository\(aqs store. This normalization ensures that we can derive a |
| 17129 |
fingerprint, meaning that two shapes with the same fingerprint mean they match |
| 17130 |
the same set of paths. |
| 17131 |
.sp |
| 17132 |
Checking the fingerprint of a narrow clone can be done by running: |
| 17133 |
.sp |
| 17134 |
.nf |
| 17135 |
.ft C |
| 17136 |
$ hg admin::narrow\-client \-\-store\-fingerprint |
| 17137 |
.ft P |
| 17138 |
.fi |
| 17139 |
.sp |
| 17140 |
For now, we guarantee no stability of the fingerprints. Before we take shapes |
| 17141 |
out of experimental, we will have a fingerprint versioning scheme, to allow |
| 17142 |
for future changes with no confusion. |
| 17143 |
.SS Shards |
| 17144 |
.sp |
| 17145 |
Shards are used server\-side to slice the store. Each shard is defined as a set |
| 17146 |
of paths it contains: files or directories matching each path will be included |
| 17147 |
in that shard. Moreover shards are mutually exclusive, meaning that a given file |
| 17148 |
can only ever be in one shard and one shard only. When a shard\(aqs path matches a |
| 17149 |
directory, the shard contains all files in that directory\(aqs tree, except for |
| 17150 |
those matched by a more deeply nested shard. |
| 17151 |
.SS Example |
| 17152 |
.sp |
| 17153 |
Given the following store, representing all files ever known to the repository: |
| 17154 |
.sp |
| 17155 |
.nf |
| 17156 |
.ft C |
| 17157 |
\&. |
| 17158 |
├── file1 |
| 17159 |
├── file2 |
| 17160 |
└── foo |
| 17161 |
└── bar |
| 17162 |
├── baz |
| 17163 |
│ ├── file1 |
| 17164 |
│ └── file2 |
| 17165 |
└── confidential |
| 17166 |
├── confidential\-file1 |
| 17167 |
└── confidential\-file2 |
| 17168 |
.ft P |
| 17169 |
.fi |
| 17170 |
.sp |
| 17171 |
One could define the following shards: |
| 17172 |
.sp |
| 17173 |
.nf |
| 17174 |
.ft C |
| 17175 |
* \(ga\(gafoo\(ga\(ga, that includes \(ga\(gafoo\(ga\(ga |
| 17176 |
* \(ga\(gafoo.confidential\(ga\(ga, that includes \(ga\(gafoo/bar/confidential\(ga\(ga |
| 17177 |
.ft P |
| 17178 |
.fi |
| 17179 |
.sp |
| 17180 |
This would mean that shard \fBfoo\fP contains: |
| 17181 |
.sp |
| 17182 |
.nf |
| 17183 |
.ft C |
| 17184 |
* \(ga\(gafoo/bar/baz/file1\(ga\(ga |
| 17185 |
* \(ga\(gafoo/bar/baz/file2\(ga\(ga |
| 17186 |
.ft P |
| 17187 |
.fi |
| 17188 |
.sp |
| 17189 |
And shard \fBfoo.confidential\fP contains: |
| 17190 |
.sp |
| 17191 |
.nf |
| 17192 |
.ft C |
| 17193 |
* \(ga\(gafoo/bar/confidential/confidential\-file1\(ga\(ga |
| 17194 |
* \(ga\(gafoo/bar/confidential/confidential\-file2\(ga\(ga |
| 17195 |
.ft P |
| 17196 |
.fi |
| 17197 |
.sp |
| 17198 |
In this example, \fBfile1\fP and \fBfile2\fP are not contained in any explicitly |
| 17199 |
defined shard. As a result, they are contained by the implicit \fBbase\fP shard. |
| 17200 |
.sp |
| 17201 |
It is important to note that adding a new shard (e.g. that includes \fIfile1\fP and |
| 17202 |
\fBfile2\fP) would remove its paths from any shard that previously contained them |
| 17203 |
(in this case, only \fBbase\fP). |
| 17204 |
.sp |
| 17205 |
Server\-side, shards are used to define shapes, which are sets of shards. Each |
| 17206 |
shape defines the shards it includes, hence excluding the contents of all other |
| 17207 |
shards. |
| 17208 |
.sp |
| 17209 |
To simplify the creation of shapes, we can compose shards together by defining |
| 17210 |
explicit dependencies between shards. In our above example, we could define a |
| 17211 |
\fBfoo.full\fP (that does not itself have to define any paths), but requires both |
| 17212 |
\fBfoo\fP and \fBfoo.confidential\fP, giving us a shard with the full \fBfoo\fP store |
| 17213 |
subtree. |
| 17214 |
.sp |
| 17215 |
Note that the set of paths in the current working copy may only be a subset of |
| 17216 |
the the store. In our example, we can imagine that |
| 17217 |
\fBfoo/bar/confidential\-module\fP has been split into the files in |
| 17218 |
\fBfoo/bar/confidential\fP and removed from the working copy. |
| 17219 |
.sp |
| 17220 |
In addition to the implicit \fBbase\fP shard, there is also the implicit |
| 17221 |
\fB.hg\-files\fP shard, which contains special paths used by Mercurial: |
| 17222 |
.sp |
| 17223 |
.nf |
| 17224 |
.ft C |
| 17225 |
* \(ga\(ga.hgignore\(ga\(ga |
| 17226 |
* \(ga\(ga.hgtags\(ga\(ga |
| 17227 |
* \(ga\(ga.hgsub\(ga\(ga |
| 17228 |
* \(ga\(ga.hgsubstate\(ga\(ga |
| 17229 |
.ft P |
| 17230 |
.fi |
| 17231 |
.sp |
| 17232 |
This shard will be automatically included in every \fBShape\fP to make sure |
| 17233 |
Mercurial has the data it needs to operate on each revision. |
| 17234 |
.SS Narrowspec (legacy) |
| 17235 |
.sp |
| 17236 |
Note: the narrowspec in its current form will be phased out in favor of the |
| 17237 |
\fBShape\fP system within the next few versions of Mercurial, as of Mercurial 7.2. |
| 17238 |
See the \fBShapes vs narrowspec\fP section below. |
| 17239 |
.sp |
| 17240 |
The \fBnarrowspec\fP is a client\-side configuration that consists of expressions |
| 17241 |
to match remote files and/or directories that should be pulled |
| 17242 |
into a client. The \fBnarrowspec\fP has \fIinclude\fP and \fIexclude\fP expressions, |
| 17243 |
with excludes always trumping includes: that is, if a file matches an exclude |
| 17244 |
expression, it will be excluded even if it also matches an include expression. |
| 17245 |
Excluding files that were never included has no effect. |
| 17246 |
.sp |
| 17247 |
Each included or excluded entry is in the format described by |
| 17248 |
\%\fBhg help patterns\fP\:, but can only use \fBpath:\fP or \fBrootfilesin:\fP, except |
| 17249 |
when using \fBShard\fP and \fBShape\fP where you can only use \fBpath:\fP. |
| 17250 |
.SS Shapes vs narrowspec |
| 17251 |
.sp |
| 17252 |
The \fBnarrowspec\fP was introduced alongside the experimental narrow extension |
| 17253 |
back in 2018. It enabled the client to chose exactly what it cares about from |
| 17254 |
the server, with the server merely cooperating with the patterns that the |
| 17255 |
client asks for. |
| 17256 |
.sp |
| 17257 |
Unless this flexibility becomes really important for someone in the future, |
| 17258 |
the current direction is to deprecate the narrowspec usage and remove its |
| 17259 |
support entirely in later versions in favor of store shapes. |
| 17260 |
.sp |
| 17261 |
Here the advantages of store shapes: |
| 17262 |
.sp |
| 17263 |
.nf |
| 17264 |
.ft C |
| 17265 |
* We can define clonebundles for usual patterns |
| 17266 |
* We can nest and generally compose includes and excludes |
| 17267 |
* We can generate a fingerprint for equivalent patterns |
| 17268 |
* We can require that the server and the client agree on patterns |
| 17269 |
* Client are made aware of changes on the server, invalidating their patterns |
| 17270 |
* A solid permissions system could be built on top of store shapes |
| 17271 |
* Some legacy problems (e.g. CLI parsing) will be solved |
| 17272 |
.ft P |
| 17273 |
.fi |
| 17274 |
.sp |
| 17275 |
Some of these points could be (and have been) bolted on top of the original |
| 17276 |
implementation, but we would not go very far. |
| 17277 |
.SS Usage |
| 17278 |
.SS Server configuration |
| 17279 |
.sp |
| 17280 |
For Mercurial 7.2, the \fB.hg/store/server\-shapes\fP file is a TOML file, to be |
| 17281 |
created and modified directly by the narrow server\(aqs administrators. |
| 17282 |
.sp |
| 17283 |
\fBWarning\fP: using dedicated \fBhg\fP command to modify the shapes config will |
| 17284 |
become mandatory in future releases, once such a command exists, |
| 17285 |
as changing shapes can lead to (sometimes surprising) client breakage. |
| 17286 |
.sp |
| 17287 |
The current (experimental!) format is the following: |
| 17288 |
.sp |
| 17289 |
.nf |
| 17290 |
.ft C |
| 17291 |
* \(ga\(gaversion\(ga\(ga (required): its value must be \(ga\(ga0\(ga\(ga |
| 17292 |
* \(ga\(gashards\(ga\(ga (required): a list of <shardconfig> |
| 17293 |
* <shardconfig>: |
| 17294 |
|
| 17295 |
* \(ga\(ganame\(ga\(ga (required): canonical name for this shard. |
| 17296 |
* \(ga\(gapaths\(ga\(ga (optional): A list of UTF8 paths that this shard concerns, |
| 17297 |
relative to the repo root. |
| 17298 |
* \(ga\(garequires\(ga\(ga (optional): A list of the names of the shards that this |
| 17299 |
shard depends on. |
| 17300 |
* \(ga\(gashape\(ga\(ga (optional): If \(ga\(gatrue\(ga\(ga, this as a user\-accessible shape. |
| 17301 |
.ft P |
| 17302 |
.fi |
| 17303 |
.sp |
| 17304 |
Constraints: |
| 17305 |
.sp |
| 17306 |
.nf |
| 17307 |
.ft C |
| 17308 |
* Shard names must be unique within the config |
| 17309 |
* Shard names must only contain bytes that are either lowercase alphanumeric |
| 17310 |
ascii, dot or hyphen |
| 17311 |
* \(ga\(gafull\(ga\(ga, \(ga\(gabase\(ga\(ga and \(ga\(ga.hg\-files\(ga\(ga are reserved shard names |
| 17312 |
* Each <shardconfig> must define one of \(ga\(garequires\(ga\(ga or \(ga\(gapaths\(ga\(ga, or both |
| 17313 |
* Shard requirements cannot form a cycle |
| 17314 |
* A given path cannot be in more than one shard |
| 17315 |
* \(ga\(gapaths\(ga\(ga must be a list of UTF8 paths. Support for non\-UTF8 paths will be |
| 17316 |
added in an upcoming version, via an \(ga\(gaencoded_paths\(ga\(ga field |
| 17317 |
* \(ga\(gapaths\(ga\(ga must be a list of syntactically valid paths relative to the |
| 17318 |
repository root (no \(ga\(ga\en\(ga\(ga, \(ga\(ga\er\(ga\(ga or \(ga\(ga\ex00\(ga\(ga, no consecutive slash, no |
| 17319 |
slashes at the start or end, etc.) |
| 17320 |
.ft P |
| 17321 |
.fi |
| 17322 |
.sp |
| 17323 |
Example: |
| 17324 |
.sp |
| 17325 |
.nf |
| 17326 |
.ft C |
| 17327 |
version = 0 |
| 17328 |
|
| 17329 |
[[shards]] |
| 17330 |
name = "foo" |
| 17331 |
paths = ["foo", "bar.txt", "baz/nested"] |
| 17332 |
shape = true |
| 17333 |
|
| 17334 |
[[shards]] |
| 17335 |
name = "subproject1" |
| 17336 |
paths = ["subproject1", "utils/only\-this\-dir"] |
| 17337 |
|
| 17338 |
[[shards]] |
| 17339 |
name = "backend" |
| 17340 |
paths = ["subproject2"] |
| 17341 |
requires = ["subproject1"] |
| 17342 |
shape = true |
| 17343 |
|
| 17344 |
[[shards]] |
| 17345 |
name = "full\-stack" |
| 17346 |
requires = ["backend", "foo"] |
| 17347 |
shape = true |
| 17348 |
.ft P |
| 17349 |
.fi |
| 17350 |
.SS Bundle generation |
| 17351 |
.sp |
| 17352 |
Server administrators manually (and likely frequently) create streaming |
| 17353 |
clonebundles for every shape and expose them in the server clonebundle manifest |
| 17354 |
with their fingerprint. In future versions, non\-streaming clonebundles will |
| 17355 |
be supported and their generations more automated. |
| 17356 |
.sp |
| 17357 |
You may generate the bundles with the following: |
| 17358 |
.sp |
| 17359 |
.nf |
| 17360 |
.ft C |
| 17361 |
$ hg bundle \-\-all \-\-type"none\-v2;stream\-v2;shape=my\-shape" ../bundle.hg |
| 17362 |
$ bundlespec="$(hg debugbundle \-\-spec ../bundle.hg)" |
| 17363 |
$ # [move bundle to static server or to \(ga.hg/bundle\-cache\(ga for inline serving] |
| 17364 |
$ bundleentry="https://static.com/bundle.hg BUNDLESPEC=$bundlespec" |
| 17365 |
$ # [or use inline SSH clonebundles] |
| 17366 |
$ bundleentry="peer\-bundle\-cache://bundle.hg BUNDLESPEC=$bundlespec" |
| 17367 |
$ echo $bundleentry >> .hg/clonebundles.manifest |
| 17368 |
.ft P |
| 17369 |
.fi |
| 17370 |
.sp |
| 17371 |
You can export the includes and exclude patterns for every shape and give |
| 17372 |
them manually to clients: |
| 17373 |
.sp |
| 17374 |
.nf |
| 17375 |
.ft C |
| 17376 |
$ hg admin::narrow\-server \-\-shape\-narrow\-patterns my\-shape |
| 17377 |
[exclude] |
| 17378 |
path:foo |
| 17379 |
path:bar |
| 17380 |
.ft P |
| 17381 |
.fi |
| 17382 |
.sp |
| 17383 |
Clients can then use said patterns when doing a narrow stream clone, which |
| 17384 |
matches the fingerprint from the patterns with that of the server clonebundles: |
| 17385 |
.sp |
| 17386 |
.nf |
| 17387 |
.ft C |
| 17388 |
$ hg clone \-\-narrow \-\-narrowspec $NARROWSPECFILE |
| 17389 |
.ft P |
| 17390 |
.fi |
| 17391 |
.SS Client |
| 17392 |
.sp |
| 17393 |
TODO explain current client\-side config and how it might evolve (storing the |
| 17394 |
shape, fingerprint, etc.). |
| 17395 |
.SS Commands |
| 17396 |
.SS Repository maintenance |
| 17397 |
.SS tracked |
| 17398 |
.sp |
| 17399 |
show or change the current narrowspec: |
| 17400 |
.sp |
| 17401 |
.nf |
| 17402 |
.ft C |
| 17403 |
hg tracked [OPTIONS]... [REMOTE] |
| 17404 |
.ft P |
| 17405 |
.fi |
| 17406 |
.sp |
| 17407 |
With no argument, shows the current narrowspec entries, one per line. Each |
| 17408 |
line will be prefixed with \(aqI\(aq or \(aqX\(aq for included or excluded patterns, |
| 17409 |
respectively. |
| 17410 |
.sp |
| 17411 |
The narrowspec is comprised of expressions to match remote files and/or |
| 17412 |
directories that should be pulled into your client. |
| 17413 |
The narrowspec has \fIinclude\fP and \fIexclude\fP expressions, with excludes always |
| 17414 |
trumping includes: that is, if a file matches an exclude expression, it will |
| 17415 |
be excluded even if it also matches an include expression. |
| 17416 |
Excluding files that were never included has no effect. |
| 17417 |
.sp |
| 17418 |
Each included or excluded entry is in the format described by |
| 17419 |
\(aqhg help patterns\(aq. |
| 17420 |
.sp |
| 17421 |
The options allow you to add or remove included and excluded expressions. |
| 17422 |
.sp |
| 17423 |
If \-\-clear is specified, then all previous includes and excludes are DROPPED |
| 17424 |
and replaced by the new ones specified to \-\-addinclude and \-\-addexclude. |
| 17425 |
If \-\-clear is specified without any further options, the narrowspec will be |
| 17426 |
empty and will not match any files. |
| 17427 |
.sp |
| 17428 |
If \-\-auto\-remove\-includes is specified, then those includes that don\(aqt match |
| 17429 |
any files modified by currently visible local commits (those not shared by |
| 17430 |
the remote) will be added to the set of explicitly specified includes to |
| 17431 |
remove. |
| 17432 |
.sp |
| 17433 |
\-\-import\-rules accepts a path to a file containing rules, allowing you to |
| 17434 |
add \-\-addinclude, \-\-addexclude rules in bulk. Like the other include and |
| 17435 |
exclude switches, the changes are applied immediately. |
| 17436 |
.sp |
| 17437 |
Options: |
| 17438 |
.INDENT 0.0 |
| 17439 |
.TP |
| 17440 |
.BI \-\-addinclude \ <VALUE[+]> |
| 17441 |
. |
| 17442 |
new paths to include |
| 17443 |
.TP |
| 17444 |
.BI \-\-removeinclude \ <VALUE[+]> |
| 17445 |
. |
| 17446 |
old paths to no longer include |
| 17447 |
.TP |
| 17448 |
.B \-\-auto\-remove\-includes |
| 17449 |
. |
| 17450 |
automatically choose unused includes to remove |
| 17451 |
.TP |
| 17452 |
.BI \-\-addexclude \ <VALUE[+]> |
| 17453 |
. |
| 17454 |
new paths to exclude |
| 17455 |
.TP |
| 17456 |
.BI \-\-import\-rules \ <VALUE> |
| 17457 |
. |
| 17458 |
import narrowspecs from a file |
| 17459 |
.TP |
| 17460 |
.BI \-\-removeexclude \ <VALUE[+]> |
| 17461 |
. |
| 17462 |
old paths to no longer exclude |
| 17463 |
.TP |
| 17464 |
.B \-\-clear |
| 17465 |
. |
| 17466 |
whether to replace the existing narrowspec |
| 17467 |
.TP |
| 17468 |
.B \-\-force\-delete\-local\-changes |
| 17469 |
. |
| 17470 |
forces deletion of local changes when narrowing |
| 17471 |
.TP |
| 17472 |
.B \-\-backup |
| 17473 |
. |
| 17474 |
back up local changes when narrowing (default: True) |
| 17475 |
.TP |
| 17476 |
.B \-\-update\-working\-copy |
| 17477 |
. |
| 17478 |
update working copy when the store has changed |
| 17479 |
.TP |
| 17480 |
.BI \-e, \-\-ssh \ <CMD> |
| 17481 |
. |
| 17482 |
specify ssh command to use |
| 17483 |
.TP |
| 17484 |
.BI \-\-remotecmd \ <CMD> |
| 17485 |
. |
| 17486 |
specify hg command to run on the remote side |
| 17487 |
.TP |
| 17488 |
.B \-\-insecure |
| 17489 |
. |
| 17490 |
do not verify server certificate (ignoring web.cacerts config) |
| 17491 |
.UNINDENT |
| 17492 |
.sp |
| 17493 |
[+] marked option can be specified multiple times |
| 17494 |
.SS notify |
| 17495 |
.sp |
| 17496 |
hooks for sending email push notifications |
| 17497 |
.sp |
| 17498 |
This extension implements hooks to send email notifications when |
| 17499 |
changesets are sent from or received by the local repository. |
| 17500 |
.sp |
| 17501 |
First, enable the extension as explained in \%\fBhg help extensions\fP\:, and |
| 17502 |
register the hook you want to run. \fBincoming\fP and \fBchangegroup\fP hooks |
| 17503 |
are run when changesets are received, while \fBoutgoing\fP hooks are for |
| 17504 |
changesets sent to another repository: |
| 17505 |
.sp |
| 17506 |
.nf |
| 17507 |
.ft C |
| 17508 |
[hooks] |
| 17509 |
# one email for each incoming changeset |
| 17510 |
incoming.notify = python:hgext.notify.hook |
| 17511 |
# one email for all incoming changesets |
| 17512 |
changegroup.notify = python:hgext.notify.hook |
| 17513 |
|
| 17514 |
# one email for all outgoing changesets |
| 17515 |
outgoing.notify = python:hgext.notify.hook |
| 17516 |
.ft P |
| 17517 |
.fi |
| 17518 |
.sp |
| 17519 |
This registers the hooks. To enable notification, subscribers must |
| 17520 |
be assigned to repositories. The \fB[usersubs]\fP section maps multiple |
| 17521 |
repositories to a given recipient. The \fB[reposubs]\fP section maps |
| 17522 |
multiple recipients to a single repository: |
| 17523 |
.sp |
| 17524 |
.nf |
| 17525 |
.ft C |
| 17526 |
[usersubs] |
| 17527 |
# key is subscriber email, value is a comma\-separated list of repo patterns |
| 17528 |
user@host = pattern |
| 17529 |
|
| 17530 |
[reposubs] |
| 17531 |
# key is repo pattern, value is a comma\-separated list of subscriber emails |
| 17532 |
pattern = user@host |
| 17533 |
.ft P |
| 17534 |
.fi |
| 17535 |
.sp |
| 17536 |
A \fBpattern\fP is a \fBglob\fP matching the absolute path to a repository, |
| 17537 |
optionally combined with a revset expression. A revset expression, if |
| 17538 |
present, is separated from the glob by a hash. Example: |
| 17539 |
.sp |
| 17540 |
.nf |
| 17541 |
.ft C |
| 17542 |
[reposubs] |
| 17543 |
*/widgets#branch(release) = qa\[email protected] |
| 17544 |
.ft P |
| 17545 |
.fi |
| 17546 |
.sp |
| 17547 |
This sends to \fBqa\[email protected]\fP whenever a changeset on the \fBrelease\fP |
| 17548 |
branch triggers a notification in any repository ending in \fBwidgets\fP. |
| 17549 |
.sp |
| 17550 |
In order to place them under direct user management, \fB[usersubs]\fP and |
| 17551 |
\fB[reposubs]\fP sections may be placed in a separate \fBhgrc\fP file and |
| 17552 |
incorporated by reference: |
| 17553 |
.sp |
| 17554 |
.nf |
| 17555 |
.ft C |
| 17556 |
[notify] |
| 17557 |
config = /path/to/subscriptionsfile |
| 17558 |
.ft P |
| 17559 |
.fi |
| 17560 |
.sp |
| 17561 |
Notifications will not be sent until the \fBnotify.test\fP value is set |
| 17562 |
to \fBFalse\fP; see below. |
| 17563 |
.sp |
| 17564 |
Notifications content can be tweaked with the following configuration entries: |
| 17565 |
.INDENT 0.0 |
| 17566 |
.TP |
| 17567 |
.B notify.test |
| 17568 |
. |
| 17569 |
If \fBTrue\fP, print messages to stdout instead of sending them. Default: True. |
| 17570 |
.TP |
| 17571 |
.B notify.sources |
| 17572 |
. |
| 17573 |
Space\-separated list of change sources. Notifications are activated only |
| 17574 |
when a changeset\(aqs source is in this list. Sources may be: |
| 17575 |
.INDENT 7.0 |
| 17576 |
.TP |
| 17577 |
.B \fBserve\fP |
| 17578 |
.sp |
| 17579 |
changesets received via http or ssh |
| 17580 |
.TP |
| 17581 |
.B \fBpull\fP |
| 17582 |
.sp |
| 17583 |
changesets received via \fBhg pull\fP |
| 17584 |
.TP |
| 17585 |
.B \fBunbundle\fP |
| 17586 |
.sp |
| 17587 |
changesets received via \fBhg unbundle\fP |
| 17588 |
.TP |
| 17589 |
.B \fBpush\fP |
| 17590 |
.sp |
| 17591 |
changesets sent or received via \fBhg push\fP |
| 17592 |
.TP |
| 17593 |
.B \fBbundle\fP |
| 17594 |
.sp |
| 17595 |
changesets sent via \fBhg unbundle\fP |
| 17596 |
.UNINDENT |
| 17597 |
.sp |
| 17598 |
Default: serve. |
| 17599 |
.TP |
| 17600 |
.B notify.strip |
| 17601 |
. |
| 17602 |
Number of leading slashes to strip from url paths. By default, notifications |
| 17603 |
reference repositories with their absolute path. \fBnotify.strip\fP lets you |
| 17604 |
turn them into relative paths. For example, \fBnotify.strip=3\fP will change |
| 17605 |
\fB/long/path/repository\fP into \fBrepository\fP. Default: 0. |
| 17606 |
.TP |
| 17607 |
.B notify.domain |
| 17608 |
. |
| 17609 |
Default email domain for sender or recipients with no explicit domain. |
| 17610 |
It is also used for the domain part of the \fBMessage\-Id\fP when using |
| 17611 |
\fBnotify.messageidseed\fP. |
| 17612 |
.TP |
| 17613 |
.B notify.messageidseed |
| 17614 |
. |
| 17615 |
Create deterministic \fBMessage\-Id\fP headers for the mails based on the seed |
| 17616 |
and the revision identifier of the first commit in the changeset. |
| 17617 |
.TP |
| 17618 |
.B notify.style |
| 17619 |
. |
| 17620 |
Style file to use when formatting emails. |
| 17621 |
.TP |
| 17622 |
.B notify.template |
| 17623 |
. |
| 17624 |
Template to use when formatting emails. |
| 17625 |
.TP |
| 17626 |
.B notify.incoming |
| 17627 |
. |
| 17628 |
Template to use when run as an incoming hook, overriding \fBnotify.template\fP. |
| 17629 |
.TP |
| 17630 |
.B notify.outgoing |
| 17631 |
. |
| 17632 |
Template to use when run as an outgoing hook, overriding \fBnotify.template\fP. |
| 17633 |
.TP |
| 17634 |
.B notify.changegroup |
| 17635 |
. |
| 17636 |
Template to use when running as a changegroup hook, overriding |
| 17637 |
\fBnotify.template\fP. |
| 17638 |
.TP |
| 17639 |
.B notify.maxdiff |
| 17640 |
. |
| 17641 |
Maximum number of diff lines to include in notification email. Set to 0 |
| 17642 |
to disable the diff, or \-1 to include all of it. Default: 300. |
| 17643 |
.TP |
| 17644 |
.B notify.maxdiffstat |
| 17645 |
. |
| 17646 |
Maximum number of diffstat lines to include in notification email. Set to \-1 |
| 17647 |
to include all of it. Default: \-1. |
| 17648 |
.TP |
| 17649 |
.B notify.maxsubject |
| 17650 |
. |
| 17651 |
Maximum number of characters in email\(aqs subject line. Default: 67. |
| 17652 |
.TP |
| 17653 |
.B notify.diffstat |
| 17654 |
. |
| 17655 |
Set to True to include a diffstat before diff content. Default: True. |
| 17656 |
.TP |
| 17657 |
.B notify.showfunc |
| 17658 |
. |
| 17659 |
If set, override \fBdiff.showfunc\fP for the diff content. Default: None. |
| 17660 |
.TP |
| 17661 |
.B notify.merge |
| 17662 |
. |
| 17663 |
If True, send notifications for merge changesets. Default: True. |
| 17664 |
.TP |
| 17665 |
.B notify.mbox |
| 17666 |
. |
| 17667 |
If set, append mails to this mbox file instead of sending. Default: None. |
| 17668 |
.TP |
| 17669 |
.B notify.fromauthor |
| 17670 |
. |
| 17671 |
If set, use the committer of the first changeset in a changegroup for |
| 17672 |
the "From" field of the notification mail. If not set, take the user |
| 17673 |
from the pushing repo. Default: False. |
| 17674 |
.TP |
| 17675 |
.B notify.reply\-to\-predecessor (EXPERIMENTAL) |
| 17676 |
. |
| 17677 |
If set and the changeset has a predecessor in the repository, try to thread |
| 17678 |
the notification mail with the predecessor. This adds the "In\-Reply\-To" header |
| 17679 |
to the notification mail with a reference to the predecessor with the smallest |
| 17680 |
revision number. Mail threads can still be torn, especially when changesets |
| 17681 |
are folded. |
| 17682 |
.sp |
| 17683 |
This option must be used in combination with \fBnotify.messageidseed\fP. |
| 17684 |
.UNINDENT |
| 17685 |
.sp |
| 17686 |
If set, the following entries will also be used to customize the |
| 17687 |
notifications: |
| 17688 |
.INDENT 0.0 |
| 17689 |
.TP |
| 17690 |
.B email.from |
| 17691 |
. |
| 17692 |
Email \fBFrom\fP address to use if none can be found in the generated |
| 17693 |
email content. |
| 17694 |
.TP |
| 17695 |
.B web.baseurl |
| 17696 |
. |
| 17697 |
Root repository URL to combine with repository paths when making |
| 17698 |
references. See also \fBnotify.strip\fP. |
| 17699 |
.UNINDENT |
| 17700 |
.SS pager |
| 17701 |
.sp |
| 17702 |
browse command output with an external pager (DEPRECATED) |
| 17703 |
.sp |
| 17704 |
Forcibly enable paging for individual commands that don\(aqt typically |
| 17705 |
request pagination with the attend\-<command> option. This setting |
| 17706 |
takes precedence over ignore options and defaults: |
| 17707 |
.sp |
| 17708 |
.nf |
| 17709 |
.ft C |
| 17710 |
[pager] |
| 17711 |
attend\-cat = false |
| 17712 |
.ft P |
| 17713 |
.fi |
| 17714 |
.SS patchbomb |
| 17715 |
.sp |
| 17716 |
command to send changesets as (a series of) patch emails |
| 17717 |
.sp |
| 17718 |
The series is started off with a "[PATCH 0 of N]" introduction, which |
| 17719 |
describes the series as a whole. |
| 17720 |
.sp |
| 17721 |
Each patch email has a Subject line of "[PATCH M of N] ...", using the |
| 17722 |
first line of the changeset description as the subject text. The |
| 17723 |
message contains two or three body parts: |
| 17724 |
.INDENT 0.0 |
| 17725 |
.IP \(bu 2 |
| 17726 |
. |
| 17727 |
The changeset description. |
| 17728 |
.IP \(bu 2 |
| 17729 |
. |
| 17730 |
[Optional] The result of running diffstat on the patch. |
| 17731 |
.IP \(bu 2 |
| 17732 |
. |
| 17733 |
The patch itself, as generated by \%\fBhg export\fP\:. |
| 17734 |
.UNINDENT |
| 17735 |
.sp |
| 17736 |
Each message refers to the first in the series using the In\-Reply\-To |
| 17737 |
and References headers, so they will show up as a sequence in threaded |
| 17738 |
mail and news readers, and in mail archives. |
| 17739 |
.sp |
| 17740 |
To configure other defaults, add a section like this to your |
| 17741 |
configuration file: |
| 17742 |
.sp |
| 17743 |
.nf |
| 17744 |
.ft C |
| 17745 |
[email] |
| 17746 |
from = My Name <my@email> |
| 17747 |
to = recipient1, recipient2, ... |
| 17748 |
cc = cc1, cc2, ... |
| 17749 |
bcc = bcc1, bcc2, ... |
| 17750 |
reply\-to = address1, address2, ... |
| 17751 |
.ft P |
| 17752 |
.fi |
| 17753 |
.sp |
| 17754 |
Use \fB[patchbomb]\fP as configuration section name if you need to |
| 17755 |
override global \fB[email]\fP address settings. |
| 17756 |
.sp |
| 17757 |
Then you can use the \%\fBhg email\fP\: command to mail a series of |
| 17758 |
changesets as a patchbomb. |
| 17759 |
.sp |
| 17760 |
You can also either configure the method option in the email section |
| 17761 |
to be a sendmail compatible mailer or fill out the [smtp] section so |
| 17762 |
that the patchbomb extension can automatically send patchbombs |
| 17763 |
directly from the commandline. See the [email] and [smtp] sections in |
| 17764 |
hgrc(5) for details. |
| 17765 |
.sp |
| 17766 |
By default, \%\fBhg email\fP\: will prompt for a \fBTo\fP or \fBCC\fP header if |
| 17767 |
you do not supply one via configuration or the command line. You can |
| 17768 |
override this to never prompt by configuring an empty value: |
| 17769 |
.sp |
| 17770 |
.nf |
| 17771 |
.ft C |
| 17772 |
[email] |
| 17773 |
cc = |
| 17774 |
.ft P |
| 17775 |
.fi |
| 17776 |
.sp |
| 17777 |
You can control the default inclusion of an introduction message with the |
| 17778 |
\fBpatchbomb.intro\fP configuration option. The configuration is always |
| 17779 |
overwritten by command line flags like \-\-intro and \-\-desc: |
| 17780 |
.sp |
| 17781 |
.nf |
| 17782 |
.ft C |
| 17783 |
[patchbomb] |
| 17784 |
intro=auto # include introduction message if more than 1 patch (default) |
| 17785 |
intro=never # never include an introduction message |
| 17786 |
intro=always # always include an introduction message |
| 17787 |
.ft P |
| 17788 |
.fi |
| 17789 |
.sp |
| 17790 |
You can specify a template for flags to be added in subject prefixes. Flags |
| 17791 |
specified by \-\-flag option are exported as \fB{flags}\fP keyword: |
| 17792 |
.sp |
| 17793 |
.nf |
| 17794 |
.ft C |
| 17795 |
[patchbomb] |
| 17796 |
flagtemplate = "{separate(\(aq \(aq, |
| 17797 |
ifeq(branch, \(aqdefault\(aq, \(aq\(aq, branch|upper), |
| 17798 |
flags)}" |
| 17799 |
.ft P |
| 17800 |
.fi |
| 17801 |
.sp |
| 17802 |
You can set patchbomb to always ask for confirmation by setting |
| 17803 |
\fBpatchbomb.confirm\fP to true. |
| 17804 |
.SS Commands |
| 17805 |
.SS Change import/export |
| 17806 |
.SS email |
| 17807 |
.sp |
| 17808 |
send changesets by email: |
| 17809 |
.sp |
| 17810 |
.nf |
| 17811 |
.ft C |
| 17812 |
hg email [OPTION]... [DEST]... |
| 17813 |
.ft P |
| 17814 |
.fi |
| 17815 |
.sp |
| 17816 |
By default, diffs are sent in the format generated by |
| 17817 |
\%\fBhg export\fP\:, one per message. The series starts with a "[PATCH 0 |
| 17818 |
of N]" introduction, which describes the series as a whole. |
| 17819 |
.sp |
| 17820 |
Each patch email has a Subject line of "[PATCH M of N] ...", using |
| 17821 |
the first line of the changeset description as the subject text. |
| 17822 |
The message contains two or three parts. First, the changeset |
| 17823 |
description. |
| 17824 |
.sp |
| 17825 |
With the \-d/\-\-diffstat option, if the diffstat program is |
| 17826 |
installed, the result of running diffstat on the patch is inserted. |
| 17827 |
.sp |
| 17828 |
Finally, the patch itself, as generated by \%\fBhg export\fP\:. |
| 17829 |
.sp |
| 17830 |
With the \-d/\-\-diffstat or \-\-confirm options, you will be presented |
| 17831 |
with a final summary of all messages and asked for confirmation before |
| 17832 |
the messages are sent. |
| 17833 |
.sp |
| 17834 |
By default the patch is included as text in the email body for |
| 17835 |
easy reviewing. Using the \-a/\-\-attach option will instead create |
| 17836 |
an attachment for the patch. With \-i/\-\-inline an inline attachment |
| 17837 |
will be created. You can include a patch both as text in the email |
| 17838 |
body and as a regular or an inline attachment by combining the |
| 17839 |
\-a/\-\-attach or \-i/\-\-inline with the \-\-body option. |
| 17840 |
.sp |
| 17841 |
With \-B/\-\-bookmark changesets reachable by the given bookmark are |
| 17842 |
selected. |
| 17843 |
.sp |
| 17844 |
With \-o/\-\-outgoing, emails will be generated for patches not found |
| 17845 |
in the destination repository (or only those which are ancestors |
| 17846 |
of the specified revisions if any are provided) |
| 17847 |
.sp |
| 17848 |
With \-b/\-\-bundle, changesets are selected as for \-\-outgoing, but a |
| 17849 |
single email containing a binary Mercurial bundle as an attachment |
| 17850 |
will be sent. Use the \fBpatchbomb.bundletype\fP config option to |
| 17851 |
control the bundle type as with \%\fBhg bundle \-\-type\fP\:. |
| 17852 |
.sp |
| 17853 |
With \-m/\-\-mbox, instead of previewing each patchbomb message in a |
| 17854 |
pager or sending the messages directly, it will create a UNIX |
| 17855 |
mailbox file with the patch emails. This mailbox file can be |
| 17856 |
previewed with any mail user agent which supports UNIX mbox |
| 17857 |
files. |
| 17858 |
.sp |
| 17859 |
With \-n/\-\-test, all steps will run, but mail will not be sent. |
| 17860 |
You will be prompted for an email recipient address, a subject and |
| 17861 |
an introductory message describing the patches of your patchbomb. |
| 17862 |
Then when all is done, patchbomb messages are displayed. |
| 17863 |
.sp |
| 17864 |
In case email sending fails, you will find a backup of your series |
| 17865 |
introductory message in \fB.hg/last\-email.txt\fP. |
| 17866 |
.sp |
| 17867 |
The default behavior of this command can be customized through |
| 17868 |
configuration. (See \%\fBhg help patchbomb\fP\: for details) |
| 17869 |
.sp |
| 17870 |
Examples: |
| 17871 |
.sp |
| 17872 |
.nf |
| 17873 |
.ft C |
| 17874 |
hg email \-r 3000 # send patch 3000 only |
| 17875 |
hg email \-r 3000 \-r 3001 # send patches 3000 and 3001 |
| 17876 |
hg email \-r 3000:3005 # send patches 3000 through 3005 |
| 17877 |
hg email 3000 # send patch 3000 (deprecated) |
| 17878 |
|
| 17879 |
hg email \-o # send all patches not in default |
| 17880 |
hg email \-o DEST # send all patches not in DEST |
| 17881 |
hg email \-o \-r 3000 # send all ancestors of 3000 not in default |
| 17882 |
hg email \-o \-r 3000 DEST # send all ancestors of 3000 not in DEST |
| 17883 |
|
| 17884 |
hg email \-B feature # send all ancestors of feature bookmark |
| 17885 |
|
| 17886 |
hg email \-b # send bundle of all patches not in default |
| 17887 |
hg email \-b DEST # send bundle of all patches not in DEST |
| 17888 |
hg email \-b \-r 3000 # bundle of all ancestors of 3000 not in default |
| 17889 |
hg email \-b \-r 3000 DEST # bundle of all ancestors of 3000 not in DEST |
| 17890 |
|
| 17891 |
hg email \-o \-m mbox && # generate an mbox file... |
| 17892 |
mutt \-R \-f mbox # ... and view it with mutt |
| 17893 |
hg email \-o \-m mbox && # generate an mbox file ... |
| 17894 |
formail \-s sendmail \e # ... and use formail to send from the mbox |
| 17895 |
\-bm \-t < mbox # ... using sendmail |
| 17896 |
.ft P |
| 17897 |
.fi |
| 17898 |
.sp |
| 17899 |
Before using this command, you will need to enable email in your |
| 17900 |
hgrc. See the [email] section in hgrc(5) for details. |
| 17901 |
.sp |
| 17902 |
Options: |
| 17903 |
.INDENT 0.0 |
| 17904 |
.TP |
| 17905 |
.B \-g, \-\-git |
| 17906 |
. |
| 17907 |
use git extended diff format |
| 17908 |
.TP |
| 17909 |
.B \-\-plain |
| 17910 |
. |
| 17911 |
omit hg patch header |
| 17912 |
.TP |
| 17913 |
.B \-o, \-\-outgoing |
| 17914 |
. |
| 17915 |
send changes not found in the target repository |
| 17916 |
.TP |
| 17917 |
.B \-b, \-\-bundle |
| 17918 |
. |
| 17919 |
send changes not in target as a binary bundle |
| 17920 |
.TP |
| 17921 |
.BI \-B, \-\-bookmark \ <BOOKMARK> |
| 17922 |
. |
| 17923 |
send changes only reachable by given bookmark |
| 17924 |
.TP |
| 17925 |
.BI \-\-bundlename \ <NAME> |
| 17926 |
. |
| 17927 |
name of the bundle attachment file (default: bundle) |
| 17928 |
.TP |
| 17929 |
.BI \-r, \-\-rev \ <REV[+]> |
| 17930 |
. |
| 17931 |
a revision to send |
| 17932 |
.TP |
| 17933 |
.B \-\-force |
| 17934 |
. |
| 17935 |
run even when remote repository is unrelated (with \-b/\-\-bundle) |
| 17936 |
.TP |
| 17937 |
.BI \-\-base \ <REV[+]> |
| 17938 |
. |
| 17939 |
a base changeset to specify instead of a destination (with \-b/\-\-bundle) |
| 17940 |
.TP |
| 17941 |
.B \-\-intro |
| 17942 |
. |
| 17943 |
send an introduction email for a single patch |
| 17944 |
.TP |
| 17945 |
.B \-\-body |
| 17946 |
. |
| 17947 |
send patches as inline message text (default) |
| 17948 |
.TP |
| 17949 |
.B \-a, \-\-attach |
| 17950 |
. |
| 17951 |
send patches as attachments |
| 17952 |
.TP |
| 17953 |
.B \-i, \-\-inline |
| 17954 |
. |
| 17955 |
send patches as inline attachments |
| 17956 |
.TP |
| 17957 |
.BI \-\-bcc \ <EMAIL[+]> |
| 17958 |
. |
| 17959 |
email addresses of blind carbon copy recipients |
| 17960 |
.TP |
| 17961 |
.BI \-c, \-\-cc \ <EMAIL[+]> |
| 17962 |
. |
| 17963 |
email addresses of copy recipients |
| 17964 |
.TP |
| 17965 |
.B \-\-confirm |
| 17966 |
. |
| 17967 |
ask for confirmation before sending |
| 17968 |
.TP |
| 17969 |
.B \-d, \-\-diffstat |
| 17970 |
. |
| 17971 |
add diffstat output to messages |
| 17972 |
.TP |
| 17973 |
.BI \-\-date \ <DATE> |
| 17974 |
. |
| 17975 |
use the given date as the sending date |
| 17976 |
.TP |
| 17977 |
.BI \-\-desc \ <FILE> |
| 17978 |
. |
| 17979 |
use the given file as the series description |
| 17980 |
.TP |
| 17981 |
.BI \-f, \-\-from \ <EMAIL> |
| 17982 |
. |
| 17983 |
email address of sender |
| 17984 |
.TP |
| 17985 |
.B \-n, \-\-test |
| 17986 |
. |
| 17987 |
print messages that would be sent |
| 17988 |
.TP |
| 17989 |
.BI \-m, \-\-mbox \ <FILE> |
| 17990 |
. |
| 17991 |
write messages to mbox file instead of sending them |
| 17992 |
.TP |
| 17993 |
.BI \-\-reply\-to \ <EMAIL[+]> |
| 17994 |
. |
| 17995 |
email addresses replies should be sent to |
| 17996 |
.TP |
| 17997 |
.BI \-s, \-\-subject \ <TEXT> |
| 17998 |
. |
| 17999 |
subject of first message (intro or single patch) |
| 18000 |
.TP |
| 18001 |
.BI \-\-in\-reply\-to \ <MSGID> |
| 18002 |
. |
| 18003 |
message identifier to reply to |
| 18004 |
.TP |
| 18005 |
.BI \-\-flag \ <FLAG[+]> |
| 18006 |
. |
| 18007 |
flags to add in subject prefixes |
| 18008 |
.TP |
| 18009 |
.BI \-t, \-\-to \ <EMAIL[+]> |
| 18010 |
. |
| 18011 |
email addresses of recipients |
| 18012 |
.TP |
| 18013 |
.BI \-e, \-\-ssh \ <CMD> |
| 18014 |
. |
| 18015 |
specify ssh command to use |
| 18016 |
.TP |
| 18017 |
.BI \-\-remotecmd \ <CMD> |
| 18018 |
. |
| 18019 |
specify hg command to run on the remote side |
| 18020 |
.TP |
| 18021 |
.B \-\-insecure |
| 18022 |
. |
| 18023 |
do not verify server certificate (ignoring web.cacerts config) |
| 18024 |
.UNINDENT |
| 18025 |
.sp |
| 18026 |
[+] marked option can be specified multiple times |
| 18027 |
.SS phabricator |
| 18028 |
.sp |
| 18029 |
simple Phabricator integration (EXPERIMENTAL) |
| 18030 |
.sp |
| 18031 |
This extension provides a \fBphabsend\fP command which sends a stack of |
| 18032 |
changesets to Phabricator, and a \fBphabread\fP command which prints a stack of |
| 18033 |
revisions in a format suitable for \%\fBhg import\fP\:, and a \fBphabupdate\fP command |
| 18034 |
to update statuses in batch. |
| 18035 |
.sp |
| 18036 |
A "phabstatus" view for \%\fBhg show\fP\: is also provided; it displays status |
| 18037 |
information of Phabricator differentials associated with unfinished |
| 18038 |
changesets. |
| 18039 |
.sp |
| 18040 |
By default, Phabricator requires \fBTest Plan\fP which might prevent some |
| 18041 |
changeset from being sent. The requirement could be disabled by changing |
| 18042 |
\fBdifferential.require\-test\-plan\-field\fP config server side. |
| 18043 |
.sp |
| 18044 |
Config: |
| 18045 |
.sp |
| 18046 |
.nf |
| 18047 |
.ft C |
| 18048 |
[phabricator] |
| 18049 |
# Phabricator URL |
| 18050 |
url = https://phab.example.com/ |
| 18051 |
|
| 18052 |
# Repo callsign. If a repo has a URL https://$HOST/diffusion/FOO, then its |
| 18053 |
# callsign is "FOO". |
| 18054 |
callsign = FOO |
| 18055 |
|
| 18056 |
# curl command to use. If not set (default), use builtin HTTP library to |
| 18057 |
# communicate. If set, use the specified curl command. This could be useful |
| 18058 |
# if you need to specify advanced options that is not easily supported by |
| 18059 |
# the internal library. |
| 18060 |
curlcmd = curl \-\-connect\-timeout 2 \-\-retry 3 \-\-silent |
| 18061 |
|
| 18062 |
# retry failed command N time (default 0). Useful when using the extension |
| 18063 |
# over flakly connection. |
| 18064 |
# |
| 18065 |
# We wait \(garetry.interval\(ga between each retry, in seconds. |
| 18066 |
# (default 1 second). |
| 18067 |
retry = 3 |
| 18068 |
retry.interval = 10 |
| 18069 |
|
| 18070 |
# the retry option can combine well with the http.timeout one. |
| 18071 |
# |
| 18072 |
# For example to give up on http request after 20 seconds: |
| 18073 |
[http] |
| 18074 |
timeout=20 |
| 18075 |
|
| 18076 |
[auth] |
| 18077 |
example.schemes = https |
| 18078 |
example.prefix = phab.example.com |
| 18079 |
|
| 18080 |
# API token. Get it from https://$HOST/conduit/login/ |
| 18081 |
example.phabtoken = cli\-xxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 18082 |
.ft P |
| 18083 |
.fi |
| 18084 |
.SS Commands |
| 18085 |
.SS Change import/export |
| 18086 |
.SS phabimport |
| 18087 |
.sp |
| 18088 |
import patches from Phabricator for the specified Differential Revisions: |
| 18089 |
.sp |
| 18090 |
.nf |
| 18091 |
.ft C |
| 18092 |
hg phabimport DREVSPEC... [OPTIONS] |
| 18093 |
.ft P |
| 18094 |
.fi |
| 18095 |
.sp |
| 18096 |
The patches are read and applied starting at the parent of the working |
| 18097 |
directory. |
| 18098 |
.sp |
| 18099 |
See \fBhg help phabread\fP for how to specify DREVSPEC. |
| 18100 |
.sp |
| 18101 |
Options: |
| 18102 |
.INDENT 0.0 |
| 18103 |
.TP |
| 18104 |
.B \-\-stack |
| 18105 |
. |
| 18106 |
import dependencies as well |
| 18107 |
.TP |
| 18108 |
.BI \-\-test\-vcr \ <VALUE> |
| 18109 |
. |
| 18110 |
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED) |
| 18111 |
.UNINDENT |
| 18112 |
.SS phabread |
| 18113 |
.sp |
| 18114 |
print patches from Phabricator suitable for importing: |
| 18115 |
.sp |
| 18116 |
.nf |
| 18117 |
.ft C |
| 18118 |
hg phabread DREVSPEC... [OPTIONS] |
| 18119 |
.ft P |
| 18120 |
.fi |
| 18121 |
.sp |
| 18122 |
DREVSPEC could be a Differential Revision identity, like \fBD123\fP, or just |
| 18123 |
the number \fB123\fP. It could also have common operators like \fB+\fP, \fB\-\fP, |
| 18124 |
\fB&\fP, \fB(\fP, \fB)\fP for complex queries. Prefix \fB:\fP could be used to |
| 18125 |
select a stack. If multiple DREVSPEC values are given, the result is the |
| 18126 |
union of each individually evaluated value. No attempt is currently made |
| 18127 |
to reorder the values to run from parent to child. |
| 18128 |
.sp |
| 18129 |
\fBabandoned\fP, \fBaccepted\fP, \fBclosed\fP, \fBneedsreview\fP, \fBneedsrevision\fP |
| 18130 |
could be used to filter patches by status. For performance reason, they |
| 18131 |
only represent a subset of non\-status selections and cannot be used alone. |
| 18132 |
.sp |
| 18133 |
For example, \fB:D6+8\-(2+D4)\fP selects a stack up to D6, plus D8 and exclude |
| 18134 |
D2 and D4. \fB:D9 & needsreview\fP selects "Needs Review" revisions in a |
| 18135 |
stack up to D9. |
| 18136 |
.sp |
| 18137 |
If \-\-stack is given, follow dependencies information and read all patches. |
| 18138 |
It is equivalent to the \fB:\fP operator. |
| 18139 |
.sp |
| 18140 |
Options: |
| 18141 |
.INDENT 0.0 |
| 18142 |
.TP |
| 18143 |
.B \-\-stack |
| 18144 |
. |
| 18145 |
read dependencies |
| 18146 |
.TP |
| 18147 |
.BI \-\-test\-vcr \ <VALUE> |
| 18148 |
. |
| 18149 |
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED) |
| 18150 |
.UNINDENT |
| 18151 |
.SS phabsend |
| 18152 |
.sp |
| 18153 |
upload changesets to Phabricator: |
| 18154 |
.sp |
| 18155 |
.nf |
| 18156 |
.ft C |
| 18157 |
hg phabsend REV [OPTIONS] |
| 18158 |
.ft P |
| 18159 |
.fi |
| 18160 |
.sp |
| 18161 |
If there are multiple revisions specified, they will be send as a stack |
| 18162 |
with a linear dependencies relationship using the order specified by the |
| 18163 |
revset. |
| 18164 |
.sp |
| 18165 |
For the first time uploading changesets, local tags will be created to |
| 18166 |
maintain the association. After the first time, phabsend will check |
| 18167 |
obsstore and tags information so it can figure out whether to update an |
| 18168 |
existing Differential Revision, or create a new one. |
| 18169 |
.sp |
| 18170 |
If \-\-amend is set, update commit messages so they have the |
| 18171 |
\fBDifferential Revision\fP URL, remove related tags. This is similar to what |
| 18172 |
arcanist will do, and is more desired in author\-push workflows. Otherwise, |
| 18173 |
use local tags to record the \fBDifferential Revision\fP association. |
| 18174 |
.sp |
| 18175 |
The \-\-confirm option lets you confirm changesets before sending them. You |
| 18176 |
can also add following to your configuration file to make it default |
| 18177 |
behaviour: |
| 18178 |
.sp |
| 18179 |
.nf |
| 18180 |
.ft C |
| 18181 |
[phabsend] |
| 18182 |
confirm = true |
| 18183 |
.ft P |
| 18184 |
.fi |
| 18185 |
.sp |
| 18186 |
By default, a separate review will be created for each commit that is |
| 18187 |
selected, and will have the same parent/child relationship in Phabricator. |
| 18188 |
If \fB\-\-fold\fP is set, multiple commits are rolled up into a single review |
| 18189 |
as if diffed from the parent of the first revision to the last. The commit |
| 18190 |
messages are concatenated in the summary field on Phabricator. |
| 18191 |
.sp |
| 18192 |
phabsend will check obsstore and the above association to decide whether to |
| 18193 |
update an existing Differential Revision, or create a new one. |
| 18194 |
.sp |
| 18195 |
Options: |
| 18196 |
.INDENT 0.0 |
| 18197 |
.TP |
| 18198 |
.BI \-r, \-\-rev \ <REV[+]> |
| 18199 |
. |
| 18200 |
revisions to send |
| 18201 |
.TP |
| 18202 |
.B \-\-amend |
| 18203 |
. |
| 18204 |
update commit messages (default: True) |
| 18205 |
.TP |
| 18206 |
.BI \-\-reviewer \ <VALUE[+]> |
| 18207 |
. |
| 18208 |
specify reviewers |
| 18209 |
.TP |
| 18210 |
.BI \-\-blocker \ <VALUE[+]> |
| 18211 |
. |
| 18212 |
specify blocking reviewers |
| 18213 |
.TP |
| 18214 |
.BI \-m, \-\-comment \ <VALUE> |
| 18215 |
. |
| 18216 |
add a comment to Revisions with new/updated Diffs |
| 18217 |
.TP |
| 18218 |
.B \-\-confirm |
| 18219 |
. |
| 18220 |
ask for confirmation before sending |
| 18221 |
.TP |
| 18222 |
.B \-\-fold |
| 18223 |
. |
| 18224 |
combine the revisions into one review |
| 18225 |
.TP |
| 18226 |
.BI \-\-test\-vcr \ <VALUE> |
| 18227 |
. |
| 18228 |
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED) |
| 18229 |
.UNINDENT |
| 18230 |
.sp |
| 18231 |
[+] marked option can be specified multiple times |
| 18232 |
.SS phabupdate |
| 18233 |
.sp |
| 18234 |
update Differential Revision in batch: |
| 18235 |
.sp |
| 18236 |
.nf |
| 18237 |
.ft C |
| 18238 |
hg phabupdate [DREVSPEC...| \-r REV...] [OPTIONS] |
| 18239 |
.ft P |
| 18240 |
.fi |
| 18241 |
.sp |
| 18242 |
DREVSPEC selects revisions. See \%\fBhg help phabread\fP\: for its usage. |
| 18243 |
.sp |
| 18244 |
Options: |
| 18245 |
.INDENT 0.0 |
| 18246 |
.TP |
| 18247 |
.B \-\-accept |
| 18248 |
. |
| 18249 |
accept revisions |
| 18250 |
.TP |
| 18251 |
.B \-\-reject |
| 18252 |
. |
| 18253 |
reject revisions |
| 18254 |
.TP |
| 18255 |
.B \-\-request\-review |
| 18256 |
. |
| 18257 |
request review on revisions |
| 18258 |
.TP |
| 18259 |
.B \-\-abandon |
| 18260 |
. |
| 18261 |
abandon revisions |
| 18262 |
.TP |
| 18263 |
.B \-\-reclaim |
| 18264 |
. |
| 18265 |
reclaim revisions |
| 18266 |
.TP |
| 18267 |
.B \-\-close |
| 18268 |
. |
| 18269 |
close revisions |
| 18270 |
.TP |
| 18271 |
.B \-\-reopen |
| 18272 |
. |
| 18273 |
reopen revisions |
| 18274 |
.TP |
| 18275 |
.B \-\-plan\-changes |
| 18276 |
. |
| 18277 |
plan changes for revisions |
| 18278 |
.TP |
| 18279 |
.B \-\-resign |
| 18280 |
. |
| 18281 |
resign as a reviewer from revisions |
| 18282 |
.TP |
| 18283 |
.B \-\-commandeer |
| 18284 |
. |
| 18285 |
commandeer revisions |
| 18286 |
.TP |
| 18287 |
.BI \-m, \-\-comment \ <VALUE> |
| 18288 |
. |
| 18289 |
comment on the last revision |
| 18290 |
.TP |
| 18291 |
.BI \-r, \-\-rev \ <REV> |
| 18292 |
. |
| 18293 |
local revision to update |
| 18294 |
.TP |
| 18295 |
.BI \-\-test\-vcr \ <VALUE> |
| 18296 |
. |
| 18297 |
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED) |
| 18298 |
.UNINDENT |
| 18299 |
.SS purge |
| 18300 |
.sp |
| 18301 |
command to delete untracked files from the working directory (DEPRECATED) |
| 18302 |
.sp |
| 18303 |
The functionality of this extension has been included in core Mercurial since |
| 18304 |
version 5.7. Please use \%\fBhg purge ...\fP\: instead. \%\fBhg purge \-\-confirm\fP\: is now |
| 18305 |
the default, unless the extension is enabled for backward compatibility. |
| 18306 |
.SS rebase |
| 18307 |
.sp |
| 18308 |
command to move sets of revisions to a different ancestor |
| 18309 |
.sp |
| 18310 |
This extension lets you rebase changesets in an existing Mercurial |
| 18311 |
repository. |
| 18312 |
.sp |
| 18313 |
For more information: |
| 18314 |
\%https://mercurial\-scm.org/wiki/RebaseExtension\: |
| 18315 |
.SS Commands |
| 18316 |
.SS Change manipulation |
| 18317 |
.SS rebase |
| 18318 |
.sp |
| 18319 |
move changeset (and descendants) to a different branch: |
| 18320 |
.sp |
| 18321 |
.nf |
| 18322 |
.ft C |
| 18323 |
hg rebase [[\-s REV]... | [\-b REV]... | [\-r REV]...] [\-d REV] [OPTION]... |
| 18324 |
.ft P |
| 18325 |
.fi |
| 18326 |
.sp |
| 18327 |
Rebase uses repeated merging to graft changesets from one part of |
| 18328 |
history (the source) onto another (the destination). This can be |
| 18329 |
useful for linearizing \fIlocal\fP changes relative to a master |
| 18330 |
development tree. |
| 18331 |
.sp |
| 18332 |
Published commits cannot be rebased (see \%\fBhg help phases\fP\:). |
| 18333 |
To copy commits, see \%\fBhg help graft\fP\:. |
| 18334 |
.sp |
| 18335 |
If you don\(aqt specify a destination changeset (\fB\-d/\-\-dest\fP), rebase |
| 18336 |
will use the same logic as \%\fBhg merge\fP\: to pick a destination. if |
| 18337 |
the current branch contains exactly one other head, the other head |
| 18338 |
is merged with by default. Otherwise, an explicit revision with |
| 18339 |
which to merge with must be provided. (destination changeset is not |
| 18340 |
modified by rebasing, but new changesets are added as its |
| 18341 |
descendants.) |
| 18342 |
.sp |
| 18343 |
Here are the ways to select changesets: |
| 18344 |
.INDENT 0.0 |
| 18345 |
.INDENT 3.5 |
| 18346 |
.INDENT 0.0 |
| 18347 |
.IP 1. 3 |
| 18348 |
. |
| 18349 |
Explicitly select them using \fB\-\-rev\fP. |
| 18350 |
.IP 2. 3 |
| 18351 |
. |
| 18352 |
Use \fB\-\-source\fP to select a root changeset and include all of its |
| 18353 |
descendants. |
| 18354 |
.IP 3. 3 |
| 18355 |
. |
| 18356 |
Use \fB\-\-base\fP to select a changeset; rebase will find ancestors |
| 18357 |
and their descendants which are not also ancestors of the destination. |
| 18358 |
.IP 4. 3 |
| 18359 |
. |
| 18360 |
If you do not specify any of \fB\-\-rev\fP, \fB\-\-source\fP, or \fB\-\-base\fP, |
| 18361 |
rebase will use \fB\-\-base .\fP as above. |
| 18362 |
.UNINDENT |
| 18363 |
.UNINDENT |
| 18364 |
.UNINDENT |
| 18365 |
.sp |
| 18366 |
If \fB\-\-source\fP or \fB\-\-rev\fP is used, special names \fBSRC\fP and \fBALLSRC\fP |
| 18367 |
can be used in \fB\-\-dest\fP. Destination would be calculated per source |
| 18368 |
revision with \fBSRC\fP substituted by that single source revision and |
| 18369 |
\fBALLSRC\fP substituted by all source revisions. |
| 18370 |
.sp |
| 18371 |
Rebase will destroy original changesets unless you use \fB\-\-keep\fP. |
| 18372 |
It will also move your bookmarks (even if you do). |
| 18373 |
.sp |
| 18374 |
Some changesets may be dropped if they do not contribute changes |
| 18375 |
(e.g. merges from the destination branch). |
| 18376 |
.sp |
| 18377 |
Unlike \fBmerge\fP, rebase will do nothing if you are at the branch tip of |
| 18378 |
a named branch with two heads. You will need to explicitly specify source |
| 18379 |
and/or destination. |
| 18380 |
.sp |
| 18381 |
If you need to use a tool to automate merge/conflict decisions, you |
| 18382 |
can specify one with \fB\-\-tool\fP, see \%\fBhg help merge\-tools\fP\:. |
| 18383 |
As a caveat: the tool will not be used to mediate when a file was |
| 18384 |
deleted, there is no hook presently available for this. |
| 18385 |
.sp |
| 18386 |
If a rebase is interrupted to manually resolve a conflict, it can be |
| 18387 |
continued with \-\-continue/\-c, aborted with \-\-abort/\-a, or stopped with |
| 18388 |
\-\-stop. |
| 18389 |
.sp |
| 18390 |
Examples: |
| 18391 |
.INDENT 0.0 |
| 18392 |
.IP \(bu 2 |
| 18393 |
. |
| 18394 |
move "local changes" (current commit back to branching point) |
| 18395 |
to the current branch tip after a pull: |
| 18396 |
.sp |
| 18397 |
.nf |
| 18398 |
.ft C |
| 18399 |
hg rebase |
| 18400 |
.ft P |
| 18401 |
.fi |
| 18402 |
.IP \(bu 2 |
| 18403 |
. |
| 18404 |
move a single changeset to the stable branch: |
| 18405 |
.sp |
| 18406 |
.nf |
| 18407 |
.ft C |
| 18408 |
hg rebase \-r 5f493448 \-d stable |
| 18409 |
.ft P |
| 18410 |
.fi |
| 18411 |
.IP \(bu 2 |
| 18412 |
. |
| 18413 |
splice a commit and all its descendants onto another part of history: |
| 18414 |
.sp |
| 18415 |
.nf |
| 18416 |
.ft C |
| 18417 |
hg rebase \-\-source c0c3 \-\-dest 4cf9 |
| 18418 |
.ft P |
| 18419 |
.fi |
| 18420 |
.IP \(bu 2 |
| 18421 |
. |
| 18422 |
rebase everything on a branch marked by a bookmark onto the |
| 18423 |
default branch: |
| 18424 |
.sp |
| 18425 |
.nf |
| 18426 |
.ft C |
| 18427 |
hg rebase \-\-base myfeature \-\-dest default |
| 18428 |
.ft P |
| 18429 |
.fi |
| 18430 |
.IP \(bu 2 |
| 18431 |
. |
| 18432 |
collapse a sequence of changes into a single commit: |
| 18433 |
.sp |
| 18434 |
.nf |
| 18435 |
.ft C |
| 18436 |
hg rebase \-\-collapse \-r 1520:1525 \-d . |
| 18437 |
.ft P |
| 18438 |
.fi |
| 18439 |
.IP \(bu 2 |
| 18440 |
. |
| 18441 |
move a named branch while preserving its name: |
| 18442 |
.sp |
| 18443 |
.nf |
| 18444 |
.ft C |
| 18445 |
hg rebase \-r "branch(featureX)" \-d 1.3 \-\-keepbranches |
| 18446 |
.ft P |
| 18447 |
.fi |
| 18448 |
.IP \(bu 2 |
| 18449 |
. |
| 18450 |
stabilize orphaned changesets so history looks linear: |
| 18451 |
.sp |
| 18452 |
.nf |
| 18453 |
.ft C |
| 18454 |
hg rebase \-r \(aqorphan()\-obsolete()\(aq \-d \(aqfirst(max((successors(max(roots(ALLSRC) & ::SRC)^)\-obsolete())::) + max(::((roots(ALLSRC) & ::SRC)^)\-obsolete()))\(aq |
| 18455 |
.ft P |
| 18456 |
.fi |
| 18457 |
.UNINDENT |
| 18458 |
.sp |
| 18459 |
Configuration Options: |
| 18460 |
.sp |
| 18461 |
You can make rebase require a destination if you set the following config |
| 18462 |
option: |
| 18463 |
.sp |
| 18464 |
.nf |
| 18465 |
.ft C |
| 18466 |
[commands] |
| 18467 |
rebase.requiredest = True |
| 18468 |
.ft P |
| 18469 |
.fi |
| 18470 |
.sp |
| 18471 |
By default, rebase will close the transaction after each commit. For |
| 18472 |
performance purposes, you can configure rebase to use a single transaction |
| 18473 |
across the entire rebase. WARNING: This setting introduces a significant |
| 18474 |
risk of losing the work you\(aqve done in a rebase if the rebase aborts |
| 18475 |
unexpectedly: |
| 18476 |
.sp |
| 18477 |
.nf |
| 18478 |
.ft C |
| 18479 |
[rebase] |
| 18480 |
singletransaction = True |
| 18481 |
.ft P |
| 18482 |
.fi |
| 18483 |
.sp |
| 18484 |
By default, rebase writes to the working copy, but you can configure it to |
| 18485 |
run in\-memory for better performance. When the rebase is not moving the |
| 18486 |
parent(s) of the working copy (AKA the "currently checked out changesets"), |
| 18487 |
this may also allow it to run even if the working copy is dirty: |
| 18488 |
.sp |
| 18489 |
.nf |
| 18490 |
.ft C |
| 18491 |
[rebase] |
| 18492 |
experimental.inmemory = True |
| 18493 |
.ft P |
| 18494 |
.fi |
| 18495 |
.sp |
| 18496 |
Return Values: |
| 18497 |
.sp |
| 18498 |
Returns 0 on success, 1 if nothing to rebase or there are |
| 18499 |
unresolved conflicts. |
| 18500 |
.sp |
| 18501 |
Options: |
| 18502 |
.INDENT 0.0 |
| 18503 |
.TP |
| 18504 |
.BI \-s, \-\-source \ <REV[+]> |
| 18505 |
. |
| 18506 |
rebase the specified changesets and their descendants |
| 18507 |
.TP |
| 18508 |
.BI \-b, \-\-base \ <REV[+]> |
| 18509 |
. |
| 18510 |
rebase everything from branching point of specified changeset |
| 18511 |
.TP |
| 18512 |
.BI \-r, \-\-rev \ <REV[+]> |
| 18513 |
. |
| 18514 |
rebase these revisions |
| 18515 |
.TP |
| 18516 |
.BI \-d, \-\-dest \ <REV> |
| 18517 |
. |
| 18518 |
rebase onto the specified changeset |
| 18519 |
.TP |
| 18520 |
.B \-\-collapse |
| 18521 |
. |
| 18522 |
collapse the rebased changesets |
| 18523 |
.TP |
| 18524 |
.BI \-m, \-\-message \ <TEXT> |
| 18525 |
. |
| 18526 |
use text as collapse commit message |
| 18527 |
.TP |
| 18528 |
.B \-e, \-\-edit |
| 18529 |
. |
| 18530 |
invoke editor on commit messages |
| 18531 |
.TP |
| 18532 |
.BI \-l, \-\-logfile \ <FILE> |
| 18533 |
. |
| 18534 |
read collapse commit message from file |
| 18535 |
.TP |
| 18536 |
.B \-k, \-\-keep |
| 18537 |
. |
| 18538 |
keep original changesets |
| 18539 |
.TP |
| 18540 |
.B \-\-keepbranches |
| 18541 |
. |
| 18542 |
keep original branch names |
| 18543 |
.TP |
| 18544 |
.B \-D, \-\-detach |
| 18545 |
. |
| 18546 |
(DEPRECATED) |
| 18547 |
.TP |
| 18548 |
.B \-i, \-\-interactive |
| 18549 |
. |
| 18550 |
(DEPRECATED) |
| 18551 |
.TP |
| 18552 |
.BI \-t, \-\-tool \ <VALUE> |
| 18553 |
. |
| 18554 |
specify merge tool |
| 18555 |
.TP |
| 18556 |
.B \-\-stop |
| 18557 |
. |
| 18558 |
stop interrupted rebase |
| 18559 |
.TP |
| 18560 |
.B \-c, \-\-continue |
| 18561 |
. |
| 18562 |
continue an interrupted rebase |
| 18563 |
.TP |
| 18564 |
.B \-a, \-\-abort |
| 18565 |
. |
| 18566 |
abort an interrupted rebase |
| 18567 |
.TP |
| 18568 |
.BI \-\-auto\-orphans \ <VALUE> |
| 18569 |
. |
| 18570 |
automatically rebase orphan revisions in the specified revset (EXPERIMENTAL) |
| 18571 |
.TP |
| 18572 |
.B \-n, \-\-dry\-run |
| 18573 |
. |
| 18574 |
do not perform actions, just print output |
| 18575 |
.TP |
| 18576 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 18577 |
. |
| 18578 |
display with template |
| 18579 |
.TP |
| 18580 |
.B \-\-confirm |
| 18581 |
. |
| 18582 |
ask before applying actions |
| 18583 |
.UNINDENT |
| 18584 |
.sp |
| 18585 |
[+] marked option can be specified multiple times |
| 18586 |
.SS record |
| 18587 |
.sp |
| 18588 |
commands to interactively select changes for commit/qrefresh (DEPRECATED) |
| 18589 |
.sp |
| 18590 |
The feature provided by this extension has been moved into core Mercurial as |
| 18591 |
\%\fBhg commit \-\-interactive\fP\:. |
| 18592 |
.SS Commands |
| 18593 |
.SS Change creation |
| 18594 |
.SS qrecord |
| 18595 |
.sp |
| 18596 |
interactively record a new patch: |
| 18597 |
.sp |
| 18598 |
.nf |
| 18599 |
.ft C |
| 18600 |
hg qrecord [OPTION]... PATCH [FILE]... |
| 18601 |
.ft P |
| 18602 |
.fi |
| 18603 |
.sp |
| 18604 |
See \%\fBhg help qnew\fP\: & \%\fBhg help record\fP\: for more information and |
| 18605 |
usage. |
| 18606 |
.SS record |
| 18607 |
.sp |
| 18608 |
interactively select changes to commit: |
| 18609 |
.sp |
| 18610 |
.nf |
| 18611 |
.ft C |
| 18612 |
hg record [OPTION]... [FILE]... |
| 18613 |
.ft P |
| 18614 |
.fi |
| 18615 |
.sp |
| 18616 |
If a list of files is omitted, all changes reported by \%\fBhg status\fP\: |
| 18617 |
will be candidates for recording. |
| 18618 |
.sp |
| 18619 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 18620 |
.sp |
| 18621 |
If using the text interface (see \%\fBhg help config\fP\:), |
| 18622 |
you will be prompted for whether to record changes to each |
| 18623 |
modified file, and for files with multiple changes, for each |
| 18624 |
change to use. For each query, the following responses are |
| 18625 |
possible: |
| 18626 |
.sp |
| 18627 |
.nf |
| 18628 |
.ft C |
| 18629 |
y \- record this change |
| 18630 |
n \- skip this change |
| 18631 |
e \- edit this change manually |
| 18632 |
|
| 18633 |
s \- skip remaining changes to this file |
| 18634 |
f \- record remaining changes to this file |
| 18635 |
|
| 18636 |
d \- done, skip remaining changes and files |
| 18637 |
a \- record all changes to all remaining files |
| 18638 |
q \- quit, recording no changes |
| 18639 |
|
| 18640 |
? \- display help |
| 18641 |
.ft P |
| 18642 |
.fi |
| 18643 |
.sp |
| 18644 |
This command is not available when committing a merge. |
| 18645 |
.sp |
| 18646 |
Options: |
| 18647 |
.INDENT 0.0 |
| 18648 |
.TP |
| 18649 |
.B \-A, \-\-addremove |
| 18650 |
. |
| 18651 |
mark new/missing files as added/removed before committing |
| 18652 |
.TP |
| 18653 |
.B \-\-close\-branch |
| 18654 |
. |
| 18655 |
mark a branch head as closed |
| 18656 |
.TP |
| 18657 |
.B \-\-amend |
| 18658 |
. |
| 18659 |
amend the parent of the working directory |
| 18660 |
.TP |
| 18661 |
.B \-s, \-\-secret |
| 18662 |
. |
| 18663 |
use the secret phase for committing |
| 18664 |
.TP |
| 18665 |
.B \-\-draft |
| 18666 |
. |
| 18667 |
use the draft phase for committing |
| 18668 |
.TP |
| 18669 |
.B \-e, \-\-edit |
| 18670 |
. |
| 18671 |
invoke editor on commit messages |
| 18672 |
.TP |
| 18673 |
.B \-\-force\-close\-branch |
| 18674 |
. |
| 18675 |
forcibly close branch from a non\-head changeset (ADVANCED) |
| 18676 |
.TP |
| 18677 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 18678 |
. |
| 18679 |
include names matching the given patterns |
| 18680 |
.TP |
| 18681 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 18682 |
. |
| 18683 |
exclude names matching the given patterns |
| 18684 |
.TP |
| 18685 |
.BI \-m, \-\-message \ <TEXT> |
| 18686 |
. |
| 18687 |
use text as commit message |
| 18688 |
.TP |
| 18689 |
.BI \-l, \-\-logfile \ <FILE> |
| 18690 |
. |
| 18691 |
read commit message from file |
| 18692 |
.TP |
| 18693 |
.BI \-d, \-\-date \ <DATE> |
| 18694 |
. |
| 18695 |
record the specified date as commit date |
| 18696 |
.TP |
| 18697 |
.BI \-u, \-\-user \ <USER> |
| 18698 |
. |
| 18699 |
record the specified user as committer |
| 18700 |
.TP |
| 18701 |
.B \-S, \-\-subrepos |
| 18702 |
. |
| 18703 |
recurse into subrepositories |
| 18704 |
.TP |
| 18705 |
.B \-w, \-\-ignore\-all\-space |
| 18706 |
. |
| 18707 |
ignore white space when comparing lines |
| 18708 |
.TP |
| 18709 |
.B \-b, \-\-ignore\-space\-change |
| 18710 |
. |
| 18711 |
ignore changes in the amount of white space |
| 18712 |
.TP |
| 18713 |
.B \-B, \-\-ignore\-blank\-lines |
| 18714 |
. |
| 18715 |
ignore changes whose lines are all blank |
| 18716 |
.TP |
| 18717 |
.B \-Z, \-\-ignore\-space\-at\-eol |
| 18718 |
. |
| 18719 |
ignore changes in whitespace at EOL |
| 18720 |
.UNINDENT |
| 18721 |
.sp |
| 18722 |
[+] marked option can be specified multiple times |
| 18723 |
.SS releasenotes |
| 18724 |
.sp |
| 18725 |
generate release notes from commit messages (EXPERIMENTAL) |
| 18726 |
.sp |
| 18727 |
It is common to maintain files detailing changes in a project between |
| 18728 |
releases. Maintaining these files can be difficult and time consuming. |
| 18729 |
The \%\fBhg releasenotes\fP\: command provided by this extension makes the |
| 18730 |
process simpler by automating it. |
| 18731 |
.SS Commands |
| 18732 |
.SS Change navigation |
| 18733 |
.SS releasenotes |
| 18734 |
.sp |
| 18735 |
parse release notes from commit messages into an output file: |
| 18736 |
.sp |
| 18737 |
.nf |
| 18738 |
.ft C |
| 18739 |
hg releasenotes [\-r REV] [\-c] FILE |
| 18740 |
.ft P |
| 18741 |
.fi |
| 18742 |
.sp |
| 18743 |
Given an output file and set of revisions, this command will parse commit |
| 18744 |
messages for release notes then add them to the output file. |
| 18745 |
.sp |
| 18746 |
Release notes are defined in commit messages as ReStructuredText |
| 18747 |
directives. These have the form: |
| 18748 |
.sp |
| 18749 |
.nf |
| 18750 |
.ft C |
| 18751 |
\&.. directive:: title |
| 18752 |
|
| 18753 |
content |
| 18754 |
.ft P |
| 18755 |
.fi |
| 18756 |
.sp |
| 18757 |
Each \fBdirective\fP maps to an output section in a generated release notes |
| 18758 |
file, which itself is ReStructuredText. For example, the \fB.. feature::\fP |
| 18759 |
directive would map to a \fBNew Features\fP section. |
| 18760 |
.sp |
| 18761 |
Release note directives can be either short\-form or long\-form. In short\- |
| 18762 |
form, \fBtitle\fP is omitted and the release note is rendered as a bullet |
| 18763 |
list. In long form, a sub\-section with the title \fBtitle\fP is added to the |
| 18764 |
section. |
| 18765 |
.sp |
| 18766 |
The \fBFILE\fP argument controls the output file to write gathered release |
| 18767 |
notes to. The format of the file is: |
| 18768 |
.sp |
| 18769 |
.nf |
| 18770 |
.ft C |
| 18771 |
Section 1 |
| 18772 |
========= |
| 18773 |
|
| 18774 |
\&... |
| 18775 |
|
| 18776 |
Section 2 |
| 18777 |
========= |
| 18778 |
|
| 18779 |
\&... |
| 18780 |
.ft P |
| 18781 |
.fi |
| 18782 |
.sp |
| 18783 |
Only sections with defined release notes are emitted. |
| 18784 |
.sp |
| 18785 |
If a section only has short\-form notes, it will consist of bullet list: |
| 18786 |
.sp |
| 18787 |
.nf |
| 18788 |
.ft C |
| 18789 |
Section |
| 18790 |
======= |
| 18791 |
|
| 18792 |
* Release note 1 |
| 18793 |
* Release note 2 |
| 18794 |
.ft P |
| 18795 |
.fi |
| 18796 |
.sp |
| 18797 |
If a section has long\-form notes, sub\-sections will be emitted: |
| 18798 |
.sp |
| 18799 |
.nf |
| 18800 |
.ft C |
| 18801 |
Section |
| 18802 |
======= |
| 18803 |
|
| 18804 |
Note 1 Title |
| 18805 |
\-\-\-\-\-\-\-\-\-\-\-\- |
| 18806 |
|
| 18807 |
Description of the first long\-form note. |
| 18808 |
|
| 18809 |
Note 2 Title |
| 18810 |
\-\-\-\-\-\-\-\-\-\-\-\- |
| 18811 |
|
| 18812 |
Description of the second long\-form note. |
| 18813 |
.ft P |
| 18814 |
.fi |
| 18815 |
.sp |
| 18816 |
If the \fBFILE\fP argument points to an existing file, that file will be |
| 18817 |
parsed for release notes having the format that would be generated by this |
| 18818 |
command. The notes from the processed commit messages will be \fImerged\fP |
| 18819 |
into this parsed set. |
| 18820 |
.sp |
| 18821 |
During release notes merging: |
| 18822 |
.INDENT 0.0 |
| 18823 |
.IP \(bu 2 |
| 18824 |
. |
| 18825 |
Duplicate items are automatically ignored |
| 18826 |
.IP \(bu 2 |
| 18827 |
. |
| 18828 |
Items that are different are automatically ignored if the similarity is |
| 18829 |
greater than a threshold. |
| 18830 |
.UNINDENT |
| 18831 |
.sp |
| 18832 |
This means that the release notes file can be updated independently from |
| 18833 |
this command and changes should not be lost when running this command on |
| 18834 |
that file. A particular use case for this is to tweak the wording of a |
| 18835 |
release note after it has been added to the release notes file. |
| 18836 |
.sp |
| 18837 |
The \-c/\-\-check option checks the commit message for invalid admonitions. |
| 18838 |
.sp |
| 18839 |
The \-l/\-\-list option, presents the user with a list of existing available |
| 18840 |
admonitions along with their title. This also includes the custom |
| 18841 |
admonitions (if any). |
| 18842 |
.sp |
| 18843 |
Options: |
| 18844 |
.INDENT 0.0 |
| 18845 |
.TP |
| 18846 |
.BI \-r, \-\-rev \ <REV> |
| 18847 |
. |
| 18848 |
revisions to process for release notes |
| 18849 |
.TP |
| 18850 |
.B \-c, \-\-check |
| 18851 |
. |
| 18852 |
checks for validity of admonitions (if any) |
| 18853 |
.TP |
| 18854 |
.B \-l, \-\-list |
| 18855 |
. |
| 18856 |
list the available admonitions with their title |
| 18857 |
.UNINDENT |
| 18858 |
.SS relink |
| 18859 |
.sp |
| 18860 |
recreates hardlinks between repository clones |
| 18861 |
.SS Commands |
| 18862 |
.SS Repository maintenance |
| 18863 |
.SS relink |
| 18864 |
.sp |
| 18865 |
recreate hardlinks between two repositories: |
| 18866 |
.sp |
| 18867 |
.nf |
| 18868 |
.ft C |
| 18869 |
hg relink [ORIGIN] |
| 18870 |
.ft P |
| 18871 |
.fi |
| 18872 |
.sp |
| 18873 |
When repositories are cloned locally, their data files will be |
| 18874 |
hardlinked so that they only use the space of a single repository. |
| 18875 |
.sp |
| 18876 |
Unfortunately, subsequent pulls into either repository will break |
| 18877 |
hardlinks for any files touched by the new changesets, even if |
| 18878 |
both repositories end up pulling the same changes. |
| 18879 |
.sp |
| 18880 |
Similarly, passing \-\-rev to "hg clone" will fail to use any |
| 18881 |
hardlinks, falling back to a complete copy of the source |
| 18882 |
repository. |
| 18883 |
.sp |
| 18884 |
This command lets you recreate those hardlinks and reclaim that |
| 18885 |
wasted space. |
| 18886 |
.sp |
| 18887 |
This repository will be relinked to share space with ORIGIN, which |
| 18888 |
must be on the same local disk. If ORIGIN is omitted, looks for |
| 18889 |
"default\-relink", then "default", in [paths]. |
| 18890 |
.sp |
| 18891 |
Do not attempt any read operations on this repository while the |
| 18892 |
command is running. (Both repositories will be locked against |
| 18893 |
writes.) |
| 18894 |
.SS remotefilelog |
| 18895 |
.sp |
| 18896 |
remotefilelog causes Mercurial to lazilly fetch file contents (EXPERIMENTAL) |
| 18897 |
.sp |
| 18898 |
This extension is HIGHLY EXPERIMENTAL. There are NO BACKWARDS COMPATIBILITY |
| 18899 |
GUARANTEES. This means that repositories created with this extension may |
| 18900 |
only be usable with the exact version of this extension/Mercurial that was |
| 18901 |
used. The extension attempts to enforce this in order to prevent repository |
| 18902 |
corruption. |
| 18903 |
.sp |
| 18904 |
remotefilelog works by fetching file contents lazily and storing them |
| 18905 |
in a cache on the client rather than in revlogs. This allows enormous |
| 18906 |
histories to be transferred only partially, making them easier to |
| 18907 |
operate on. |
| 18908 |
.sp |
| 18909 |
Configs: |
| 18910 |
.INDENT 0.0 |
| 18911 |
.INDENT 3.5 |
| 18912 |
.sp |
| 18913 |
\fBpacks.maxchainlen\fP specifies the maximum delta chain length in pack files |
| 18914 |
.sp |
| 18915 |
\fBpacks.maxpacksize\fP specifies the maximum pack file size |
| 18916 |
.INDENT 0.0 |
| 18917 |
.TP |
| 18918 |
.B \fBpacks.maxpackfilecount\fP specifies the maximum number of packs in the |
| 18919 |
.sp |
| 18920 |
shared cache (trees only for now) |
| 18921 |
.UNINDENT |
| 18922 |
.sp |
| 18923 |
\fBremotefilelog.backgroundprefetch\fP runs prefetch in background when True |
| 18924 |
.INDENT 0.0 |
| 18925 |
.TP |
| 18926 |
.B \fBremotefilelog.bgprefetchrevs\fP specifies revisions to fetch on commit and |
| 18927 |
.sp |
| 18928 |
update, and on other commands that use them. Different from pullprefetch. |
| 18929 |
.UNINDENT |
| 18930 |
.sp |
| 18931 |
\fBremotefilelog.gcrepack\fP does garbage collection during repack when True |
| 18932 |
.INDENT 0.0 |
| 18933 |
.TP |
| 18934 |
.B \fBremotefilelog.nodettl\fP specifies maximum TTL of a node in seconds before |
| 18935 |
.sp |
| 18936 |
it is garbage collected |
| 18937 |
.UNINDENT |
| 18938 |
.sp |
| 18939 |
\fBremotefilelog.repackonhggc\fP runs repack on hg gc when True |
| 18940 |
.INDENT 0.0 |
| 18941 |
.TP |
| 18942 |
.B \fBremotefilelog.prefetchdays\fP specifies the maximum age of a commit in |
| 18943 |
.sp |
| 18944 |
days after which it is no longer prefetched. |
| 18945 |
.TP |
| 18946 |
.B \fBremotefilelog.prefetchdelay\fP specifies delay between background |
| 18947 |
.sp |
| 18948 |
prefetches in seconds after operations that change the working copy parent |
| 18949 |
.TP |
| 18950 |
.B \fBremotefilelog.data.gencountlimit\fP constraints the minimum number of data |
| 18951 |
.sp |
| 18952 |
pack files required to be considered part of a generation. In particular, |
| 18953 |
minimum number of packs files > gencountlimit. |
| 18954 |
.TP |
| 18955 |
.B \fBremotefilelog.data.generations\fP list for specifying the lower bound of |
| 18956 |
.sp |
| 18957 |
each generation of the data pack files. For example, list [\(aq100MB\(aq,\(aq1MB\(aq] |
| 18958 |
or [\(aq1MB\(aq, \(aq100MB\(aq] will lead to three generations: [0, 1MB), [ |
| 18959 |
1MB, 100MB) and [100MB, infinity). |
| 18960 |
.TP |
| 18961 |
.B \fBremotefilelog.data.maxrepackpacks\fP the maximum number of pack files to |
| 18962 |
.sp |
| 18963 |
include in an incremental data repack. |
| 18964 |
.TP |
| 18965 |
.B \fBremotefilelog.data.repackmaxpacksize\fP the maximum size of a pack file for |
| 18966 |
.sp |
| 18967 |
it to be considered for an incremental data repack. |
| 18968 |
.TP |
| 18969 |
.B \fBremotefilelog.data.repacksizelimit\fP the maximum total size of pack files |
| 18970 |
.sp |
| 18971 |
to include in an incremental data repack. |
| 18972 |
.TP |
| 18973 |
.B \fBremotefilelog.history.gencountlimit\fP constraints the minimum number of |
| 18974 |
.sp |
| 18975 |
history pack files required to be considered part of a generation. In |
| 18976 |
particular, minimum number of packs files > gencountlimit. |
| 18977 |
.TP |
| 18978 |
.B \fBremotefilelog.history.generations\fP list for specifying the lower bound of |
| 18979 |
.sp |
| 18980 |
each generation of the history pack files. For example, list [ |
| 18981 |
\(aq100MB\(aq, \(aq1MB\(aq] or [\(aq1MB\(aq, \(aq100MB\(aq] will lead to three generations: [ |
| 18982 |
0, 1MB), [1MB, 100MB) and [100MB, infinity). |
| 18983 |
.TP |
| 18984 |
.B \fBremotefilelog.history.maxrepackpacks\fP the maximum number of pack files to |
| 18985 |
.sp |
| 18986 |
include in an incremental history repack. |
| 18987 |
.TP |
| 18988 |
.B \fBremotefilelog.history.repackmaxpacksize\fP the maximum size of a pack file |
| 18989 |
.sp |
| 18990 |
for it to be considered for an incremental history repack. |
| 18991 |
.TP |
| 18992 |
.B \fBremotefilelog.history.repacksizelimit\fP the maximum total size of pack |
| 18993 |
.sp |
| 18994 |
files to include in an incremental history repack. |
| 18995 |
.TP |
| 18996 |
.B \fBremotefilelog.backgroundrepack\fP automatically consolidate packs in the |
| 18997 |
.sp |
| 18998 |
background |
| 18999 |
.UNINDENT |
| 19000 |
.sp |
| 19001 |
\fBremotefilelog.cachepath\fP path to cache |
| 19002 |
.INDENT 0.0 |
| 19003 |
.TP |
| 19004 |
.B \fBremotefilelog.cachegroup\fP if set, make cache directory sgid to this |
| 19005 |
.sp |
| 19006 |
group |
| 19007 |
.UNINDENT |
| 19008 |
.sp |
| 19009 |
\fBremotefilelog.cacheprocess\fP binary to invoke for fetching file data |
| 19010 |
.sp |
| 19011 |
\fBremotefilelog.debug\fP turn on remotefilelog\-specific debug output |
| 19012 |
.sp |
| 19013 |
\fBremotefilelog.excludepattern\fP pattern of files to exclude from pulls |
| 19014 |
.sp |
| 19015 |
\fBremotefilelog.includepattern\fP pattern of files to include in pulls |
| 19016 |
.INDENT 0.0 |
| 19017 |
.TP |
| 19018 |
.B \fBremotefilelog.fetchwarning\fP: message to print when too many |
| 19019 |
.sp |
| 19020 |
single\-file fetches occur |
| 19021 |
.UNINDENT |
| 19022 |
.sp |
| 19023 |
\fBremotefilelog.getfilesstep\fP number of files to request in a single RPC |
| 19024 |
.INDENT 0.0 |
| 19025 |
.TP |
| 19026 |
.B \fBremotefilelog.getfilestype\fP if set to \(aqthreaded\(aq use threads to fetch |
| 19027 |
.sp |
| 19028 |
files, otherwise use optimistic fetching |
| 19029 |
.TP |
| 19030 |
.B \fBremotefilelog.pullprefetch\fP revset for selecting files that should be |
| 19031 |
.sp |
| 19032 |
eagerly downloaded rather than lazily |
| 19033 |
.TP |
| 19034 |
.B \fBremotefilelog.reponame\fP name of the repo. If set, used to partition |
| 19035 |
.sp |
| 19036 |
data from other repos in a shared store. |
| 19037 |
.UNINDENT |
| 19038 |
.sp |
| 19039 |
\fBremotefilelog.server\fP if true, enable server\-side functionality |
| 19040 |
.sp |
| 19041 |
\fBremotefilelog.servercachepath\fP path for caching blobs on the server |
| 19042 |
.INDENT 0.0 |
| 19043 |
.TP |
| 19044 |
.B \fBremotefilelog.serverexpiration\fP number of days to keep cached server |
| 19045 |
.sp |
| 19046 |
blobs |
| 19047 |
.TP |
| 19048 |
.B \fBremotefilelog.validatecache\fP if set, check cache entries for corruption |
| 19049 |
.sp |
| 19050 |
before returning blobs |
| 19051 |
.TP |
| 19052 |
.B \fBremotefilelog.validatecachelog\fP if set, check cache entries for |
| 19053 |
.sp |
| 19054 |
corruption before returning metadata |
| 19055 |
.UNINDENT |
| 19056 |
.UNINDENT |
| 19057 |
.UNINDENT |
| 19058 |
.SS Commands |
| 19059 |
.SS Repository maintenance |
| 19060 |
.SS prefetch |
| 19061 |
.sp |
| 19062 |
prefetch file revisions from the server: |
| 19063 |
.sp |
| 19064 |
.nf |
| 19065 |
.ft C |
| 19066 |
hg prefetch [OPTIONS] [FILE...] |
| 19067 |
.ft P |
| 19068 |
.fi |
| 19069 |
.sp |
| 19070 |
Prefetchs file revisions for the specified revs and stores them in the |
| 19071 |
local remotefilelog cache. If no rev is specified, the default rev is |
| 19072 |
used which is the union of dot, draft, pullprefetch and bgprefetchrev. |
| 19073 |
File names or patterns can be used to limit which files are downloaded. |
| 19074 |
.sp |
| 19075 |
Return 0 on success. |
| 19076 |
.sp |
| 19077 |
Options: |
| 19078 |
.INDENT 0.0 |
| 19079 |
.TP |
| 19080 |
.BI \-r, \-\-rev \ <REV[+]> |
| 19081 |
. |
| 19082 |
prefetch the specified revisions |
| 19083 |
.TP |
| 19084 |
.B \-\-repack |
| 19085 |
. |
| 19086 |
run repack after prefetch |
| 19087 |
.TP |
| 19088 |
.BI \-b, \-\-base \ <VALUE> |
| 19089 |
. |
| 19090 |
rev that is assumed to already be local |
| 19091 |
.TP |
| 19092 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 19093 |
. |
| 19094 |
include names matching the given patterns |
| 19095 |
.TP |
| 19096 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 19097 |
. |
| 19098 |
exclude names matching the given patterns |
| 19099 |
.UNINDENT |
| 19100 |
.sp |
| 19101 |
[+] marked option can be specified multiple times |
| 19102 |
.SS Uncategorized commands |
| 19103 |
.SS gc |
| 19104 |
.sp |
| 19105 |
garbage collect the client and server filelog caches: |
| 19106 |
.sp |
| 19107 |
.nf |
| 19108 |
.ft C |
| 19109 |
hg gc [REPO...] |
| 19110 |
.ft P |
| 19111 |
.fi |
| 19112 |
.sp |
| 19113 |
garbage collect the client and server filelog caches |
| 19114 |
.SS repack |
| 19115 |
.sp |
| 19116 |
.nf |
| 19117 |
.ft C |
| 19118 |
hg repack [OPTIONS] |
| 19119 |
.ft P |
| 19120 |
.fi |
| 19121 |
.sp |
| 19122 |
Options: |
| 19123 |
.INDENT 0.0 |
| 19124 |
.TP |
| 19125 |
.B \-\-background |
| 19126 |
. |
| 19127 |
run in a background process |
| 19128 |
.TP |
| 19129 |
.B \-\-incremental |
| 19130 |
. |
| 19131 |
do an incremental repack |
| 19132 |
.TP |
| 19133 |
.B \-\-packsonly |
| 19134 |
. |
| 19135 |
only repack packs (skip loose objects) |
| 19136 |
.UNINDENT |
| 19137 |
.SS verifyremotefilelog |
| 19138 |
.sp |
| 19139 |
.nf |
| 19140 |
.ft C |
| 19141 |
hg verifyremotefilelogs <directory> |
| 19142 |
.ft P |
| 19143 |
.fi |
| 19144 |
.sp |
| 19145 |
Options: |
| 19146 |
.INDENT 0.0 |
| 19147 |
.TP |
| 19148 |
.B \-d, \-\-decompress |
| 19149 |
. |
| 19150 |
decompress the filelogs first |
| 19151 |
.UNINDENT |
| 19152 |
.SS remotenames |
| 19153 |
.sp |
| 19154 |
showing remotebookmarks and remotebranches in UI (EXPERIMENTAL) |
| 19155 |
.sp |
| 19156 |
By default both remotebookmarks and remotebranches are turned on. Config knob to |
| 19157 |
control the individually are as follows. |
| 19158 |
.sp |
| 19159 |
Config options to tweak the default behaviour: |
| 19160 |
.INDENT 0.0 |
| 19161 |
.TP |
| 19162 |
.B remotenames.bookmarks |
| 19163 |
. |
| 19164 |
Boolean value to enable or disable showing of remotebookmarks (default: True) |
| 19165 |
.TP |
| 19166 |
.B remotenames.branches |
| 19167 |
. |
| 19168 |
Boolean value to enable or disable showing of remotebranches (default: True) |
| 19169 |
.TP |
| 19170 |
.B remotenames.hoistedpeer |
| 19171 |
. |
| 19172 |
Name of the peer whose remotebookmarks should be hoisted into the top\-level |
| 19173 |
namespace (default: \(aqdefault\(aq) |
| 19174 |
.UNINDENT |
| 19175 |
.SS schemes |
| 19176 |
.sp |
| 19177 |
extend schemes with shortcuts to repository swarms |
| 19178 |
.sp |
| 19179 |
This extension allows you to specify shortcuts for parent URLs with a |
| 19180 |
lot of repositories to act like a scheme, for example: |
| 19181 |
.sp |
| 19182 |
.nf |
| 19183 |
.ft C |
| 19184 |
[schemes] |
| 19185 |
py = http://code.python.org/hg/ |
| 19186 |
.ft P |
| 19187 |
.fi |
| 19188 |
.sp |
| 19189 |
After that you can use it like: |
| 19190 |
.sp |
| 19191 |
.nf |
| 19192 |
.ft C |
| 19193 |
hg clone py://trunk/ |
| 19194 |
.ft P |
| 19195 |
.fi |
| 19196 |
.sp |
| 19197 |
Additionally there is support for some more complex schemas, for |
| 19198 |
example used by Google Code: |
| 19199 |
.sp |
| 19200 |
.nf |
| 19201 |
.ft C |
| 19202 |
[schemes] |
| 19203 |
gcode = http://{1}.googlecode.com/hg/ |
| 19204 |
.ft P |
| 19205 |
.fi |
| 19206 |
.sp |
| 19207 |
The syntax is taken from Mercurial templates, and you have unlimited |
| 19208 |
number of variables, starting with \fB{1}\fP and continuing with |
| 19209 |
\fB{2}\fP, \fB{3}\fP and so on. This variables will receive parts of URL |
| 19210 |
supplied, split by \fB/\fP. Anything not specified as \fB{part}\fP will be |
| 19211 |
just appended to an URL. |
| 19212 |
.sp |
| 19213 |
For convenience, the extension adds these schemes by default: |
| 19214 |
.sp |
| 19215 |
.nf |
| 19216 |
.ft C |
| 19217 |
[schemes] |
| 19218 |
py = http://hg.python.org/ |
| 19219 |
bb = https://bitbucket.org/ |
| 19220 |
bb+ssh = ssh://[email protected]/ |
| 19221 |
gcode = https://{1}.googlecode.com/hg/ |
| 19222 |
kiln = https://{1}.kilnhg.com/Repo/ |
| 19223 |
.ft P |
| 19224 |
.fi |
| 19225 |
.sp |
| 19226 |
You can override a predefined scheme by defining a new scheme with the |
| 19227 |
same name. |
| 19228 |
.SS Commands |
| 19229 |
.SS share |
| 19230 |
.sp |
| 19231 |
share a common history between several working directories |
| 19232 |
.sp |
| 19233 |
The share extension introduces a new command \%\fBhg share\fP\: to create a new |
| 19234 |
working directory. This is similar to \%\fBhg clone\fP\:, but doesn\(aqt involve |
| 19235 |
copying or linking the storage of the repository. This allows working on |
| 19236 |
different branches or changes in parallel without the associated cost in |
| 19237 |
terms of disk space. |
| 19238 |
.sp |
| 19239 |
Note: destructive operations or extensions like \%\fBhg rollback\fP\: should be |
| 19240 |
used with care as they can result in confusing problems. |
| 19241 |
.SS Automatic Pooled Storage for Clones |
| 19242 |
.sp |
| 19243 |
When this extension is active, \%\fBhg clone\fP\: can be configured to |
| 19244 |
automatically share/pool storage across multiple clones. This |
| 19245 |
mode effectively converts \%\fBhg clone\fP\: to \%\fBhg clone\fP\: + \%\fBhg share\fP\:. |
| 19246 |
The benefit of using this mode is the automatic management of |
| 19247 |
store paths and intelligent pooling of related repositories. |
| 19248 |
.sp |
| 19249 |
The following \fBshare.\fP config options influence this feature: |
| 19250 |
.INDENT 0.0 |
| 19251 |
.TP |
| 19252 |
.B \fBshare.pool\fP |
| 19253 |
.sp |
| 19254 |
Filesystem path where shared repository data will be stored. When |
| 19255 |
defined, \%\fBhg clone\fP\: will automatically use shared repository |
| 19256 |
storage instead of creating a store inside each clone. |
| 19257 |
.TP |
| 19258 |
.B \fBshare.poolnaming\fP |
| 19259 |
.sp |
| 19260 |
How directory names in \fBshare.pool\fP are constructed. |
| 19261 |
.sp |
| 19262 |
"identity" means the name is derived from the first changeset in the |
| 19263 |
repository. In this mode, different remotes share storage if their |
| 19264 |
root/initial changeset is identical. In this mode, the local shared |
| 19265 |
repository is an aggregate of all encountered remote repositories. |
| 19266 |
.sp |
| 19267 |
"remote" means the name is derived from the source repository\(aqs |
| 19268 |
path or URL. In this mode, storage is only shared if the path or URL |
| 19269 |
requested in the \%\fBhg clone\fP\: command matches exactly to a repository |
| 19270 |
that was cloned before. |
| 19271 |
.sp |
| 19272 |
The default naming mode is "identity". |
| 19273 |
.UNINDENT |
| 19274 |
.sp |
| 19275 |
Sharing requirements and configs of source repository with shares: |
| 19276 |
.sp |
| 19277 |
By default creating a shared repository only enables sharing a common |
| 19278 |
history and does not share requirements and configs between them. This |
| 19279 |
may lead to problems in some cases, for example when you upgrade the |
| 19280 |
storage format from one repository but does not set related configs |
| 19281 |
in the shares. |
| 19282 |
.sp |
| 19283 |
Setting \fIformat.exp\-share\-safe = True\fP enables sharing configs and |
| 19284 |
requirements. This only applies to shares which are done after enabling |
| 19285 |
the config option. |
| 19286 |
.sp |
| 19287 |
For enabling this in existing shares, enable the config option and reshare. |
| 19288 |
.sp |
| 19289 |
For resharing existing shares, make sure your working directory is clean |
| 19290 |
and there are no untracked files, delete that share and create a new share. |
| 19291 |
.SS Commands |
| 19292 |
.SS Repository creation |
| 19293 |
.SS share |
| 19294 |
.sp |
| 19295 |
create a new shared repository: |
| 19296 |
.sp |
| 19297 |
.nf |
| 19298 |
.ft C |
| 19299 |
hg share [\-U] [\-B] SOURCE [DEST] |
| 19300 |
.ft P |
| 19301 |
.fi |
| 19302 |
.sp |
| 19303 |
Initialize a new repository and working directory that shares its |
| 19304 |
history (and optionally bookmarks) with another repository. |
| 19305 |
.IP Note |
| 19306 |
. |
| 19307 |
using rollback or extensions that destroy/modify history (mq, |
| 19308 |
rebase, etc.) can cause considerable confusion with shared |
| 19309 |
clones. In particular, if two shared clones are both updated to |
| 19310 |
the same changeset, and one of them destroys that changeset |
| 19311 |
with rollback, the other clone will suddenly stop working: all |
| 19312 |
operations will fail with "abort: working directory has unknown |
| 19313 |
parent". The only known workaround is to use debugsetparents on |
| 19314 |
the broken clone to reset it to a changeset that still exists. |
| 19315 |
.RE |
| 19316 |
.sp |
| 19317 |
Options: |
| 19318 |
.INDENT 0.0 |
| 19319 |
.TP |
| 19320 |
.B \-U, \-\-noupdate |
| 19321 |
. |
| 19322 |
do not create a working directory |
| 19323 |
.TP |
| 19324 |
.B \-B, \-\-bookmarks |
| 19325 |
. |
| 19326 |
also share bookmarks |
| 19327 |
.TP |
| 19328 |
.B \-\-relative |
| 19329 |
. |
| 19330 |
point to source using a relative path |
| 19331 |
.UNINDENT |
| 19332 |
.SS Repository maintenance |
| 19333 |
.SS unshare |
| 19334 |
.sp |
| 19335 |
convert a shared repository to a normal one: |
| 19336 |
.sp |
| 19337 |
.nf |
| 19338 |
.ft C |
| 19339 |
hg unshare |
| 19340 |
.ft P |
| 19341 |
.fi |
| 19342 |
.sp |
| 19343 |
Copy the store data to the repo and remove the sharedpath data. |
| 19344 |
.SS show |
| 19345 |
.sp |
| 19346 |
unified command to show various repository information (EXPERIMENTAL) |
| 19347 |
.sp |
| 19348 |
This extension provides the \%\fBhg show\fP\: command, which provides a central |
| 19349 |
command for displaying commonly\-accessed repository data and views of that |
| 19350 |
data. |
| 19351 |
.sp |
| 19352 |
The following config options can influence operation. |
| 19353 |
.SS \fBcommands\fP |
| 19354 |
.INDENT 0.0 |
| 19355 |
.TP |
| 19356 |
.B \fBshow.aliasprefix\fP |
| 19357 |
.sp |
| 19358 |
List of strings that will register aliases for views. e.g. \fBs\fP will |
| 19359 |
effectively set config options \fBalias.s<view> = show <view>\fP for all |
| 19360 |
views. i.e. \fIhg swork\fP would execute \fIhg show work\fP. |
| 19361 |
.sp |
| 19362 |
Aliases that would conflict with existing registrations will not be |
| 19363 |
performed. |
| 19364 |
.UNINDENT |
| 19365 |
.SS Commands |
| 19366 |
.SS Change navigation |
| 19367 |
.SS show |
| 19368 |
.sp |
| 19369 |
show various repository information: |
| 19370 |
.sp |
| 19371 |
.nf |
| 19372 |
.ft C |
| 19373 |
hg show VIEW |
| 19374 |
.ft P |
| 19375 |
.fi |
| 19376 |
.sp |
| 19377 |
A requested view of repository data is displayed. |
| 19378 |
.sp |
| 19379 |
If no view is requested, the list of available views is shown and the |
| 19380 |
command aborts. |
| 19381 |
.IP Note |
| 19382 |
. |
| 19383 |
There are no backwards compatibility guarantees for the output of this |
| 19384 |
command. Output may change in any future Mercurial release. |
| 19385 |
.sp |
| 19386 |
Consumers wanting stable command output should specify a template via |
| 19387 |
\fB\-T/\-\-template\fP. |
| 19388 |
.RE |
| 19389 |
.sp |
| 19390 |
List of available views: |
| 19391 |
.sp |
| 19392 |
bookmarks bookmarks and their associated changeset |
| 19393 |
.sp |
| 19394 |
stack current line of work |
| 19395 |
.sp |
| 19396 |
work changesets that aren\(aqt finished |
| 19397 |
.sp |
| 19398 |
Options: |
| 19399 |
.INDENT 0.0 |
| 19400 |
.TP |
| 19401 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 19402 |
. |
| 19403 |
display with template |
| 19404 |
.UNINDENT |
| 19405 |
.SS sparse |
| 19406 |
.sp |
| 19407 |
allow sparse checkouts of the working directory (EXPERIMENTAL) |
| 19408 |
.sp |
| 19409 |
(This extension is not yet protected by backwards compatibility |
| 19410 |
guarantees. Any aspect may break in future releases until this |
| 19411 |
notice is removed.) |
| 19412 |
.sp |
| 19413 |
This extension allows the working directory to only consist of a |
| 19414 |
subset of files for the revision. This allows specific files or |
| 19415 |
directories to be explicitly included or excluded. Many repository |
| 19416 |
operations have performance proportional to the number of files in |
| 19417 |
the working directory. So only realizing a subset of files in the |
| 19418 |
working directory can improve performance. |
| 19419 |
.SS Sparse Config Files |
| 19420 |
.sp |
| 19421 |
The set of files that are part of a sparse checkout are defined by |
| 19422 |
a sparse config file. The file defines 3 things: includes (files to |
| 19423 |
include in the sparse checkout), excludes (files to exclude from the |
| 19424 |
sparse checkout), and profiles (links to other config files). |
| 19425 |
.sp |
| 19426 |
The file format is newline delimited. Empty lines and lines beginning |
| 19427 |
with \fB#\fP are ignored. |
| 19428 |
.sp |
| 19429 |
Lines beginning with \fB%include \(ga\(ga denote another sparse config file |
| 19430 |
to include. e.g. \(ga\(ga%include tests.sparse\fP. The filename is relative |
| 19431 |
to the repository root. |
| 19432 |
.sp |
| 19433 |
The special lines \fB[include]\fP and \fB[exclude]\fP denote the section |
| 19434 |
for includes and excludes that follow, respectively. It is illegal to |
| 19435 |
have \fB[include]\fP after \fB[exclude]\fP. |
| 19436 |
.sp |
| 19437 |
Non\-special lines resemble file patterns to be added to either includes |
| 19438 |
or excludes. The syntax of these lines is documented by \%\fBhg help patterns\fP\:. |
| 19439 |
Patterns are interpreted as \fBglob:\fP by default and match against the |
| 19440 |
root of the repository. |
| 19441 |
.sp |
| 19442 |
Exclusion patterns take precedence over inclusion patterns. So even |
| 19443 |
if a file is explicitly included, an \fB[exclude]\fP entry can remove it. |
| 19444 |
.sp |
| 19445 |
For example, say you have a repository with 3 directories, \fBfrontend/\fP, |
| 19446 |
\fBbackend/\fP, and \fBtools/\fP. \fBfrontend/\fP and \fBbackend/\fP correspond |
| 19447 |
to different projects and it is uncommon for someone working on one |
| 19448 |
to need the files for the other. But \fBtools/\fP contains files shared |
| 19449 |
between both projects. Your sparse config files may resemble: |
| 19450 |
.sp |
| 19451 |
.nf |
| 19452 |
.ft C |
| 19453 |
# frontend.sparse |
| 19454 |
frontend/** |
| 19455 |
tools/** |
| 19456 |
|
| 19457 |
# backend.sparse |
| 19458 |
backend/** |
| 19459 |
tools/** |
| 19460 |
.ft P |
| 19461 |
.fi |
| 19462 |
.sp |
| 19463 |
Say the backend grows in size. Or there\(aqs a directory with thousands |
| 19464 |
of files you wish to exclude. You can modify the profile to exclude |
| 19465 |
certain files: |
| 19466 |
.sp |
| 19467 |
.nf |
| 19468 |
.ft C |
| 19469 |
[include] |
| 19470 |
backend/** |
| 19471 |
tools/** |
| 19472 |
|
| 19473 |
[exclude] |
| 19474 |
tools/tests/** |
| 19475 |
.ft P |
| 19476 |
.fi |
| 19477 |
.SS Commands |
| 19478 |
.SS split |
| 19479 |
.sp |
| 19480 |
command to split a changeset into smaller ones (EXPERIMENTAL) |
| 19481 |
.SS Commands |
| 19482 |
.SS Change manipulation |
| 19483 |
.SS split |
| 19484 |
.sp |
| 19485 |
split a changeset into smaller ones: |
| 19486 |
.sp |
| 19487 |
.nf |
| 19488 |
.ft C |
| 19489 |
hg split [\-\-no\-rebase] [[\-r] REV] |
| 19490 |
.ft P |
| 19491 |
.fi |
| 19492 |
.sp |
| 19493 |
Repeatedly prompt changes and commit message for new changesets until there |
| 19494 |
is nothing left in the original changeset. |
| 19495 |
.sp |
| 19496 |
If \-\-rev was not given, split the working directory parent. |
| 19497 |
.sp |
| 19498 |
By default, rebase connected non\-obsoleted descendants onto the new |
| 19499 |
changeset. Use \-\-no\-rebase to avoid the rebase. |
| 19500 |
.sp |
| 19501 |
Options: |
| 19502 |
.INDENT 0.0 |
| 19503 |
.TP |
| 19504 |
.BI \-r, \-\-rev \ <REV> |
| 19505 |
. |
| 19506 |
revision to split |
| 19507 |
.TP |
| 19508 |
.B \-\-rebase |
| 19509 |
. |
| 19510 |
rebase descendants after split (default: True) |
| 19511 |
.TP |
| 19512 |
.BI \-d, \-\-date \ <DATE> |
| 19513 |
. |
| 19514 |
record the specified date as commit date |
| 19515 |
.TP |
| 19516 |
.BI \-u, \-\-user \ <USER> |
| 19517 |
. |
| 19518 |
record the specified user as committer |
| 19519 |
.UNINDENT |
| 19520 |
.SS strip |
| 19521 |
.sp |
| 19522 |
strip changesets and their descendants from history (DEPRECATED) |
| 19523 |
.sp |
| 19524 |
The functionality of this extension has been included in core Mercurial |
| 19525 |
since version 5.7. Please use \%\fBhg debugstrip ...\fP\: instead. |
| 19526 |
.sp |
| 19527 |
This extension allows you to strip changesets and all their descendants from the |
| 19528 |
repository. See the command help for details. |
| 19529 |
.SS Commands |
| 19530 |
.SS Repository maintenance |
| 19531 |
.SS strip |
| 19532 |
.sp |
| 19533 |
.nf |
| 19534 |
.ft C |
| 19535 |
hg strip [\-k] [\-f] [\-B bookmark] [\-r] REV... |
| 19536 |
.ft P |
| 19537 |
.fi |
| 19538 |
.sp |
| 19539 |
Options: |
| 19540 |
.INDENT 0.0 |
| 19541 |
.TP |
| 19542 |
.BI \-r, \-\-rev \ <REV[+]> |
| 19543 |
. |
| 19544 |
strip specified revision (optional, can specify revisions without this option) |
| 19545 |
.TP |
| 19546 |
.B \-f, \-\-force |
| 19547 |
. |
| 19548 |
force removal of changesets, discard uncommitted changes (no backup) |
| 19549 |
.TP |
| 19550 |
.B \-\-no\-backup |
| 19551 |
. |
| 19552 |
do not save backup bundle |
| 19553 |
.TP |
| 19554 |
.B \-\-nobackup |
| 19555 |
. |
| 19556 |
do not save backup bundle (DEPRECATED) |
| 19557 |
.TP |
| 19558 |
.B \-n |
| 19559 |
. |
| 19560 |
ignored (DEPRECATED) |
| 19561 |
.TP |
| 19562 |
.B \-k, \-\-keep |
| 19563 |
. |
| 19564 |
do not modify working directory during strip |
| 19565 |
.TP |
| 19566 |
.BI \-B, \-\-bookmark \ <BOOKMARK[+]> |
| 19567 |
. |
| 19568 |
remove revs only reachable from given bookmark |
| 19569 |
.TP |
| 19570 |
.B \-\-soft |
| 19571 |
. |
| 19572 |
simply drop changesets from visible history (EXPERIMENTAL) |
| 19573 |
.TP |
| 19574 |
.B \-\-permit\-empty\-revset |
| 19575 |
. |
| 19576 |
return success even if no revision was stripped |
| 19577 |
.UNINDENT |
| 19578 |
.sp |
| 19579 |
[+] marked option can be specified multiple times |
| 19580 |
.SS transplant |
| 19581 |
.sp |
| 19582 |
command to transplant changesets from another branch |
| 19583 |
.sp |
| 19584 |
This extension allows you to transplant changes to another parent revision, |
| 19585 |
possibly in another repository. The transplant is done using \(aqdiff\(aq patches. |
| 19586 |
.sp |
| 19587 |
Transplanted patches are recorded in .hg/transplant/transplants, as a |
| 19588 |
map from a changeset hash to its hash in the source repository. |
| 19589 |
.SS Commands |
| 19590 |
.SS Change manipulation |
| 19591 |
.SS transplant |
| 19592 |
.sp |
| 19593 |
transplant changesets from another branch: |
| 19594 |
.sp |
| 19595 |
.nf |
| 19596 |
.ft C |
| 19597 |
hg transplant [\-s REPO] [\-b BRANCH [\-a]] [\-p REV] [\-m REV] [REV]... |
| 19598 |
.ft P |
| 19599 |
.fi |
| 19600 |
.sp |
| 19601 |
Selected changesets will be applied on top of the current working |
| 19602 |
directory with the log of the original changeset. The changesets |
| 19603 |
are copied and will thus appear twice in the history with different |
| 19604 |
identities. |
| 19605 |
.sp |
| 19606 |
Consider using the graft command if everything is inside the same |
| 19607 |
repository \- it will use merges and will usually give a better result. |
| 19608 |
Use the rebase extension if the changesets are unpublished and you want |
| 19609 |
to move them instead of copying them. |
| 19610 |
.sp |
| 19611 |
If \-\-log is specified, log messages will have a comment appended |
| 19612 |
of the form: |
| 19613 |
.sp |
| 19614 |
.nf |
| 19615 |
.ft C |
| 19616 |
(transplanted from CHANGESETHASH) |
| 19617 |
.ft P |
| 19618 |
.fi |
| 19619 |
.sp |
| 19620 |
You can rewrite the changelog message with the \-\-filter option. |
| 19621 |
Its argument will be invoked with the current changelog message as |
| 19622 |
$1 and the patch as $2. |
| 19623 |
.sp |
| 19624 |
\-\-source/\-s specifies another repository to use for selecting changesets, |
| 19625 |
just as if it temporarily had been pulled. |
| 19626 |
If \-\-branch/\-b is specified, these revisions will be used as |
| 19627 |
heads when deciding which changesets to transplant, just as if only |
| 19628 |
these revisions had been pulled. |
| 19629 |
If \-\-all/\-a is specified, all the revisions up to the heads specified |
| 19630 |
with \-\-branch will be transplanted. |
| 19631 |
.sp |
| 19632 |
Example: |
| 19633 |
.INDENT 0.0 |
| 19634 |
.IP \(bu 2 |
| 19635 |
. |
| 19636 |
transplant all changes up to REV on top of your current revision: |
| 19637 |
.sp |
| 19638 |
.nf |
| 19639 |
.ft C |
| 19640 |
hg transplant \-\-branch REV \-\-all |
| 19641 |
.ft P |
| 19642 |
.fi |
| 19643 |
.UNINDENT |
| 19644 |
.sp |
| 19645 |
You can optionally mark selected transplanted changesets as merge |
| 19646 |
changesets. You will not be prompted to transplant any ancestors |
| 19647 |
of a merged transplant, and you can merge descendants of them |
| 19648 |
normally instead of transplanting them. |
| 19649 |
.sp |
| 19650 |
Merge changesets may be transplanted directly by specifying the |
| 19651 |
proper parent changeset by calling \%\fBhg transplant \-\-parent\fP\:. |
| 19652 |
.sp |
| 19653 |
If no merges or revisions are provided, \%\fBhg transplant\fP\: will |
| 19654 |
start an interactive changeset browser. |
| 19655 |
.sp |
| 19656 |
If a changeset application fails, you can fix the merge by hand |
| 19657 |
and then resume where you left off by calling \%\fBhg transplant |
| 19658 |
\-\-continue/\-c\fP\:. |
| 19659 |
.sp |
| 19660 |
Options: |
| 19661 |
.INDENT 0.0 |
| 19662 |
.TP |
| 19663 |
.BI \-s, \-\-source \ <REPO> |
| 19664 |
. |
| 19665 |
transplant changesets from REPO |
| 19666 |
.TP |
| 19667 |
.BI \-b, \-\-branch \ <REV[+]> |
| 19668 |
. |
| 19669 |
use this source changeset as head |
| 19670 |
.TP |
| 19671 |
.B \-a, \-\-all |
| 19672 |
. |
| 19673 |
pull all changesets up to the \-\-branch revisions |
| 19674 |
.TP |
| 19675 |
.BI \-p, \-\-prune \ <REV[+]> |
| 19676 |
. |
| 19677 |
skip over REV |
| 19678 |
.TP |
| 19679 |
.BI \-m, \-\-merge \ <REV[+]> |
| 19680 |
. |
| 19681 |
merge at REV |
| 19682 |
.TP |
| 19683 |
.BI \-\-parent \ <REV> |
| 19684 |
. |
| 19685 |
parent to choose when transplanting merge |
| 19686 |
.TP |
| 19687 |
.B \-e, \-\-edit |
| 19688 |
. |
| 19689 |
invoke editor on commit messages |
| 19690 |
.TP |
| 19691 |
.B \-\-log |
| 19692 |
. |
| 19693 |
append transplant info to log message |
| 19694 |
.TP |
| 19695 |
.B \-\-stop |
| 19696 |
. |
| 19697 |
stop interrupted transplant |
| 19698 |
.TP |
| 19699 |
.B \-c, \-\-continue |
| 19700 |
. |
| 19701 |
continue last transplant session after fixing conflicts |
| 19702 |
.TP |
| 19703 |
.BI \-\-filter \ <CMD> |
| 19704 |
. |
| 19705 |
filter changesets through command |
| 19706 |
.UNINDENT |
| 19707 |
.sp |
| 19708 |
[+] marked option can be specified multiple times |
| 19709 |
.SS uncommit |
| 19710 |
.sp |
| 19711 |
uncommit part or all of a local changeset (EXPERIMENTAL) |
| 19712 |
.sp |
| 19713 |
This command undoes the effect of a local commit, returning the affected |
| 19714 |
files to their uncommitted state. This means that files modified, added or |
| 19715 |
removed in the changeset will be left unchanged, and so will remain modified, |
| 19716 |
added and removed in the working directory. |
| 19717 |
.SS Commands |
| 19718 |
.SS Change manipulation |
| 19719 |
.SS unamend |
| 19720 |
.sp |
| 19721 |
undo the most recent amend operation on a current changeset: |
| 19722 |
.sp |
| 19723 |
.nf |
| 19724 |
.ft C |
| 19725 |
hg unamend |
| 19726 |
.ft P |
| 19727 |
.fi |
| 19728 |
.sp |
| 19729 |
This command will roll back to the previous version of a changeset, |
| 19730 |
leaving working directory in state in which it was before running |
| 19731 |
\fIhg amend\fP (e.g. files modified as part of an amend will be |
| 19732 |
marked as modified \fIhg status\fP) |
| 19733 |
.SS uncommit |
| 19734 |
.sp |
| 19735 |
uncommit part or all of a local changeset: |
| 19736 |
.sp |
| 19737 |
.nf |
| 19738 |
.ft C |
| 19739 |
hg uncommit [OPTION]... [FILE]... |
| 19740 |
.ft P |
| 19741 |
.fi |
| 19742 |
.sp |
| 19743 |
This command undoes the effect of a local commit, returning the affected |
| 19744 |
files to their uncommitted state. This means that files modified or |
| 19745 |
deleted in the changeset will be left unchanged, and so will remain |
| 19746 |
modified in the working directory. |
| 19747 |
.sp |
| 19748 |
If no files are specified, the commit will be pruned, unless \-\-keep is |
| 19749 |
given. |
| 19750 |
.sp |
| 19751 |
Options: |
| 19752 |
.INDENT 0.0 |
| 19753 |
.TP |
| 19754 |
.B \-\-keep |
| 19755 |
. |
| 19756 |
allow an empty commit after uncommitting |
| 19757 |
.TP |
| 19758 |
.B \-\-allow\-dirty\-working\-copy |
| 19759 |
. |
| 19760 |
allow uncommit with outstanding changes |
| 19761 |
.TP |
| 19762 |
.BI \-n, \-\-note \ <TEXT> |
| 19763 |
. |
| 19764 |
store a note on uncommit |
| 19765 |
.TP |
| 19766 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 19767 |
. |
| 19768 |
include names matching the given patterns |
| 19769 |
.TP |
| 19770 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 19771 |
. |
| 19772 |
exclude names matching the given patterns |
| 19773 |
.TP |
| 19774 |
.BI \-m, \-\-message \ <TEXT> |
| 19775 |
. |
| 19776 |
use text as commit message |
| 19777 |
.TP |
| 19778 |
.BI \-l, \-\-logfile \ <FILE> |
| 19779 |
. |
| 19780 |
read commit message from file |
| 19781 |
.TP |
| 19782 |
.BI \-d, \-\-date \ <DATE> |
| 19783 |
. |
| 19784 |
record the specified date as commit date |
| 19785 |
.TP |
| 19786 |
.BI \-u, \-\-user \ <USER> |
| 19787 |
. |
| 19788 |
record the specified user as committer |
| 19789 |
.TP |
| 19790 |
.B \-D, \-\-currentdate |
| 19791 |
. |
| 19792 |
record the current date as commit date |
| 19793 |
.TP |
| 19794 |
.B \-U, \-\-currentuser |
| 19795 |
. |
| 19796 |
record the current user as committer |
| 19797 |
.UNINDENT |
| 19798 |
.sp |
| 19799 |
[+] marked option can be specified multiple times |
| 19800 |
.SS win32mbcs |
| 19801 |
.sp |
| 19802 |
allow the use of MBCS paths with problematic encodings |
| 19803 |
.sp |
| 19804 |
Some MBCS encodings are not good for some path operations (i.e. |
| 19805 |
splitting path, case conversion, etc.) with its encoded bytes. We call |
| 19806 |
such a encoding (i.e. shift_jis and big5) as "problematic encoding". |
| 19807 |
This extension can be used to fix the issue with those encodings by |
| 19808 |
wrapping some functions to convert to Unicode string before path |
| 19809 |
operation. |
| 19810 |
.sp |
| 19811 |
This extension is useful for: |
| 19812 |
.INDENT 0.0 |
| 19813 |
.IP \(bu 2 |
| 19814 |
. |
| 19815 |
Japanese Windows users using shift_jis encoding. |
| 19816 |
.IP \(bu 2 |
| 19817 |
. |
| 19818 |
Chinese Windows users using big5 encoding. |
| 19819 |
.IP \(bu 2 |
| 19820 |
. |
| 19821 |
All users who use a repository with one of problematic encodings on |
| 19822 |
case\-insensitive file system. |
| 19823 |
.UNINDENT |
| 19824 |
.sp |
| 19825 |
This extension is not needed for: |
| 19826 |
.INDENT 0.0 |
| 19827 |
.IP \(bu 2 |
| 19828 |
. |
| 19829 |
Any user who use only ASCII chars in path. |
| 19830 |
.IP \(bu 2 |
| 19831 |
. |
| 19832 |
Any user who do not use any of problematic encodings. |
| 19833 |
.UNINDENT |
| 19834 |
.sp |
| 19835 |
Note that there are some limitations on using this extension: |
| 19836 |
.INDENT 0.0 |
| 19837 |
.IP \(bu 2 |
| 19838 |
. |
| 19839 |
You should use single encoding in one repository. |
| 19840 |
.IP \(bu 2 |
| 19841 |
. |
| 19842 |
If the repository path ends with 0x5c, .hg/hgrc cannot be read. |
| 19843 |
.IP \(bu 2 |
| 19844 |
. |
| 19845 |
win32mbcs is not compatible with fixutf8 extension. |
| 19846 |
.UNINDENT |
| 19847 |
.sp |
| 19848 |
By default, win32mbcs uses encoding.encoding decided by Mercurial. |
| 19849 |
You can specify the encoding by config option: |
| 19850 |
.sp |
| 19851 |
.nf |
| 19852 |
.ft C |
| 19853 |
[win32mbcs] |
| 19854 |
encoding = sjis |
| 19855 |
.ft P |
| 19856 |
.fi |
| 19857 |
.sp |
| 19858 |
It is useful for the users who want to commit with UTF\-8 log message. |
| 19859 |
.SS win32text |
| 19860 |
.sp |
| 19861 |
perform automatic newline conversion (DEPRECATED) |
| 19862 |
.INDENT 0.0 |
| 19863 |
.INDENT 3.5 |
| 19864 |
.sp |
| 19865 |
Deprecation: The win32text extension requires each user to configure |
| 19866 |
the extension again and again for each clone since the configuration |
| 19867 |
is not copied when cloning. |
| 19868 |
.sp |
| 19869 |
We have therefore made the \fBeol\fP as an alternative. The \fBeol\fP |
| 19870 |
uses a version controlled file for its configuration and each clone |
| 19871 |
will therefore use the right settings from the start. |
| 19872 |
.UNINDENT |
| 19873 |
.UNINDENT |
| 19874 |
.sp |
| 19875 |
To perform automatic newline conversion, use: |
| 19876 |
.sp |
| 19877 |
.nf |
| 19878 |
.ft C |
| 19879 |
[extensions] |
| 19880 |
win32text = |
| 19881 |
[encode] |
| 19882 |
** = cleverencode: |
| 19883 |
# or ** = macencode: |
| 19884 |
|
| 19885 |
[decode] |
| 19886 |
** = cleverdecode: |
| 19887 |
# or ** = macdecode: |
| 19888 |
.ft P |
| 19889 |
.fi |
| 19890 |
.sp |
| 19891 |
If not doing conversion, to make sure you do not commit CRLF/CR by accident: |
| 19892 |
.sp |
| 19893 |
.nf |
| 19894 |
.ft C |
| 19895 |
[hooks] |
| 19896 |
pretxncommit.crlf = python:hgext.win32text.forbidcrlf |
| 19897 |
# or pretxncommit.cr = python:hgext.win32text.forbidcr |
| 19898 |
.ft P |
| 19899 |
.fi |
| 19900 |
.sp |
| 19901 |
To do the same check on a server to prevent CRLF/CR from being |
| 19902 |
pushed or pulled: |
| 19903 |
.sp |
| 19904 |
.nf |
| 19905 |
.ft C |
| 19906 |
[hooks] |
| 19907 |
pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf |
| 19908 |
# or pretxnchangegroup.cr = python:hgext.win32text.forbidcr |
| 19909 |
.ft P |
| 19910 |
.fi |
| 19911 |
.SS zeroconf |
| 19912 |
.sp |
| 19913 |
discover and advertise repositories on the local network |
| 19914 |
.sp |
| 19915 |
The zeroconf extension will advertise \%\fBhg serve\fP\: instances over |
| 19916 |
DNS\-SD so that they can be discovered using the \%\fBhg paths\fP\: command |
| 19917 |
without knowing the server\(aqs IP address. |
| 19918 |
.sp |
| 19919 |
To allow other people to discover your repository using run |
| 19920 |
\%\fBhg serve\fP\: in your repository: |
| 19921 |
.sp |
| 19922 |
.nf |
| 19923 |
.ft C |
| 19924 |
$ cd test |
| 19925 |
$ hg serve |
| 19926 |
.ft P |
| 19927 |
.fi |
| 19928 |
.sp |
| 19929 |
You can discover Zeroconf\-enabled repositories by running |
| 19930 |
\%\fBhg paths\fP\:: |
| 19931 |
.sp |
| 19932 |
.nf |
| 19933 |
.ft C |
| 19934 |
$ hg paths |
| 19935 |
zc\-test = http://example.com:8000/test |
| 19936 |
.ft P |
| 19937 |
.fi |
| 19938 |
.SH FILES |
| 19939 |
.INDENT 0.0 |
| 19940 |
.TP |
| 19941 |
.B \fB/etc/mercurial/hgrc\fP, \fB$HOME/.hgrc\fP, \fB.hg/hgrc\fP |
| 19942 |
.sp |
| 19943 |
This file contains defaults and configuration. Values in |
| 19944 |
\fB.hg/hgrc\fP override those in \fB$HOME/.hgrc\fP, and these override |
| 19945 |
settings made in the global \fB/etc/mercurial/hgrc\fP configuration. |
| 19946 |
See \%\fBhgrc\fP(5)\: for details of the contents and format of these |
| 19947 |
files. |
| 19948 |
.TP |
| 19949 |
.B \fB.hgignore\fP |
| 19950 |
.sp |
| 19951 |
This file contains regular expressions (one per line) that |
| 19952 |
describe file names that should be ignored by \fBhg\fP. For details, |
| 19953 |
see \%\fBhgignore\fP(5)\:. |
| 19954 |
.TP |
| 19955 |
.B \fB.hgsub\fP |
| 19956 |
.sp |
| 19957 |
This file defines the locations of all subrepositories, and |
| 19958 |
tells where the subrepository checkouts came from. For details, see |
| 19959 |
\%\fBhg help subrepos\fP\:. |
| 19960 |
.TP |
| 19961 |
.B \fB.hgsubstate\fP |
| 19962 |
.sp |
| 19963 |
This file is where Mercurial stores all nested repository states. \fINB: This |
| 19964 |
file should not be edited manually.\fP |
| 19965 |
.TP |
| 19966 |
.B \fB.hgtags\fP |
| 19967 |
.sp |
| 19968 |
This file contains changeset hash values and text tag names (one |
| 19969 |
of each separated by spaces) that correspond to tagged versions of |
| 19970 |
the repository contents. The file content is encoded using UTF\-8. |
| 19971 |
.TP |
| 19972 |
.B \fB.hg/last\-message.txt\fP |
| 19973 |
.sp |
| 19974 |
This file is used by \%\fBhg commit\fP\: to store a backup of the commit message |
| 19975 |
in case the commit fails. |
| 19976 |
.TP |
| 19977 |
.B \fB.hg/localtags\fP |
| 19978 |
.sp |
| 19979 |
This file can be used to define local tags which are not shared among |
| 19980 |
repositories. The file format is the same as for \fB.hgtags\fP, but it is |
| 19981 |
encoded using the local system encoding. |
| 19982 |
.UNINDENT |
| 19983 |
.sp |
| 19984 |
Some commands (e.g. revert) produce backup files ending in \fB.orig\fP, |
| 19985 |
if the \fB.orig\fP file already exists and is not tracked by Mercurial, |
| 19986 |
it will be overwritten. |
| 19987 |
.SH BUGS |
| 19988 |
.sp |
| 19989 |
Probably lots, please post them to the mailing list (see \%Resources\: |
| 19990 |
below) when you find them. |
| 19991 |
.SH SEE ALSO |
| 19992 |
.sp |
| 19993 |
\%\fBhgignore\fP(5)\:, \%\fBhgrc\fP(5)\: |
| 19994 |
.SH AUTHOR |
| 19995 |
.sp |
| 19996 |
Written by Olivia Mackall <\%[email protected]\:> |
| 19997 |
.SH RESOURCES |
| 19998 |
.sp |
| 19999 |
Main Web Site: \%https://mercurial\-scm.org/\: |
| 20000 |
.sp |
| 20001 |
Source code repository: \%https://www.mercurial\-scm.org/repo/hg\: |
| 20002 |
.sp |
| 20003 |
Mailing list: \%https://www.mercurial\-scm.org/mailman/listinfo/mercurial/\: |
| 20004 |
.SH COPYING |
| 20005 |
.sp |
| 20006 |
Copyright (C) 2005\-2026 Olivia Mackall. |
| 20007 |
Free use of this software is granted under the terms of the GNU General |
| 20008 |
Public License version 2 or any later version. |
| 20009 |
.\" Common link and substitution definitions. |
| 20010 |
. |
| 20011 |
.SH AUTHOR |
| 20012 |
Olivia Mackall <[email protected]> |
| 20013 |
|
| 20014 |
Organization: Mercurial |
| 20015 |
.\" Generated by docutils manpage writer. |
| 20016 |
.\" |
| 20017 |
. |