Mercurial > ms-int-types
Help: email
hg email [OPTION]... [DEST]...
send changesets by email
By default, diffs are sent in the format generated by 'hg export', one per message. The series starts with a "[PATCH 0 of N]" introduction, which describes the series as a whole.
Each patch email has a Subject line of "[PATCH M of N] ...", using the first line of the changeset description as the subject text. The message contains two or three parts. First, the changeset description.
With the -d/--diffstat option, if the diffstat program is installed, the result of running diffstat on the patch is inserted.
Finally, the patch itself, as generated by 'hg export'.
With the -d/--diffstat or --confirm options, you will be presented with a final summary of all messages and asked for confirmation before the messages are sent.
By default the patch is included as text in the email body for easy reviewing. Using the -a/--attach option will instead create an attachment for the patch. With -i/--inline an inline attachment will be created. You can include a patch both as text in the email body and as a regular or an inline attachment by combining the -a/--attach or -i/--inline with the --body option.
With -B/--bookmark changesets reachable by the given bookmark are selected.
With -o/--outgoing, emails will be generated for patches not found in the destination repository (or only those which are ancestors of the specified revisions if any are provided)
With -b/--bundle, changesets are selected as for --outgoing, but a single email containing a binary Mercurial bundle as an attachment will be sent. Use the "patchbomb.bundletype" config option to control the bundle type as with 'hg bundle --type'.
With -m/--mbox, instead of previewing each patchbomb message in a pager or sending the messages directly, it will create a UNIX mailbox file with the patch emails. This mailbox file can be previewed with any mail user agent which supports UNIX mbox files.
With -n/--test, all steps will run, but mail will not be sent. You will be prompted for an email recipient address, a subject and an introductory message describing the patches of your patchbomb. Then when all is done, patchbomb messages are displayed.
In case email sending fails, you will find a backup of your series introductory message in ".hg/last-email.txt".
The default behavior of this command can be customized through configuration. (See 'hg help patchbomb' for details)
Examples:
hg email -r 3000 # send patch 3000 only hg email -r 3000 -r 3001 # send patches 3000 and 3001 hg email -r 3000:3005 # send patches 3000 through 3005 hg email 3000 # send patch 3000 (deprecated)
hg email -o # send all patches not in default hg email -o DEST # send all patches not in DEST hg email -o -r 3000 # send all ancestors of 3000 not in default hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
hg email -B feature # send all ancestors of feature bookmark
hg email -b # send bundle of all patches not in default hg email -b DEST # send bundle of all patches not in DEST hg email -b -r 3000 # bundle of all ancestors of 3000 not in default hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
hg email -o -m mbox && # generate an mbox file... mutt -R -f mbox # ... and view it with mutt hg email -o -m mbox && # generate an mbox file ... formail -s sendmail \ # ... and use formail to send from the mbox -bm -t < mbox # ... using sendmail
Before using this command, you will need to enable email in your hgrc. See the [email] section in hgrc(5) for details.
options ([+] can be repeated):
-g | --git | use git extended diff format |
--plain | omit hg patch header | |
-o | --outgoing | send changes not found in the target repository |
-b | --bundle | send changes not in target as a binary bundle |
-B | --bookmark BOOKMARK | send changes only reachable by given bookmark |
--bundlename NAME | name of the bundle attachment file (default: bundle) | |
-r | --rev REV [+] | a revision to send |
--force | run even when remote repository is unrelated (with -b/--bundle) | |
--base REV [+] | a base changeset to specify instead of a destination (with -b/--bundle) | |
--intro | send an introduction email for a single patch | |
--body | send patches as inline message text (default) | |
-a | --attach | send patches as attachments |
-i | --inline | send patches as inline attachments |
--bcc EMAIL [+] | email addresses of blind carbon copy recipients | |
-c | --cc EMAIL [+] | email addresses of copy recipients |
--confirm | ask for confirmation before sending | |
-d | --diffstat | add diffstat output to messages |
--date DATE | use the given date as the sending date | |
--desc FILE | use the given file as the series description | |
-f | --from EMAIL | email address of sender |
-n | --test | print messages that would be sent |
-m | --mbox FILE | write messages to mbox file instead of sending them |
--reply-to EMAIL [+] | email addresses replies should be sent to | |
-s | --subject TEXT | subject of first message (intro or single patch) |
--in-reply-to MSGID | message identifier to reply to | |
--flag FLAG [+] | flags to add in subject prefixes | |
-t | --to EMAIL [+] | email addresses of recipients |
-e | --ssh CMD | specify ssh command to use |
--remotecmd CMD | specify hg command to run on the remote side | |
--insecure | do not verify server certificate (ignoring web.cacerts config) | |
--mq | operate on patch repository |
global options ([+] can be repeated):
-R | --repository REPO | repository root directory or name of overlay bundle file |
--cwd DIR | change working directory | |
-y | --noninteractive | do not prompt, automatically pick the first choice for all prompts |
-q | --quiet | suppress output |
-v | --verbose | enable additional output |
--color TYPE | when to colorize (boolean, always, auto, never, or debug) | |
--config CONFIG [+] | set/override config option (use 'section.name=value') | |
--debug | enable debugging output | |
--debugger | start debugger | |
--encoding ENCODE | set the charset encoding (default: UTF-8) | |
--encodingmode MODE | set the charset encoding mode (default: strict) | |
--traceback | always print a traceback on exception | |
--time | time how long the command takes | |
--profile | print command execution profile | |
--version | output version information and exit | |
-h | --help | display help and exit |
--hidden | consider hidden changesets | |
--pager TYPE | when to paginate (boolean, always, auto, or never) (default: auto) |