hg email#
send changesets by email#
hg email [OPTION]... [DEST]...
This command is provided by the patchbomb extension.
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
Every command accepts the global options.
|
|
use git extended diff format |
|
omit hg patch header |
|
|
|
send changes not found in the target repository |
|
|
send changes not in target as a binary bundle |
|
|
send changes only reachable by given bookmark |
|
name of the bundle attachment file (default: bundle) |
|
|
|
a revision to send |
|
run even when remote repository is unrelated (with -b/--bundle) |
|
|
a base changeset to specify instead of a destination (with -b/--bundle) |
|
|
send an introduction email for a single patch |
|
|
send patches as inline message text (default) |
|
|
|
send patches as attachments |
|
|
send patches as inline attachments |
|
email addresses of blind carbon copy recipients |
|
|
|
email addresses of copy recipients |
|
ask for confirmation before sending |
|
|
|
add diffstat output to messages |
|
use the given date as the sending date |
|
|
use the given file as the series description |
|
|
|
email address of sender |
|
|
print messages that would be sent |
|
|
write messages to mbox file instead of sending them |
|
email addresses replies should be sent to |
|
|
|
subject of first message (intro or single patch) |
|
message identifier to reply to |
|
|
flags to add in subject prefixes |
|
|
|
email addresses of recipients |
|
|
specify ssh command to use |
|
specify hg command to run on the remote side |
|
|
do not verify server certificate (ignoring web.cacerts config) |
|
|
operate on patch repository |
Options marked [+] can be repeated.