Mercurial > hg-stable
changeset 7997:8eb9f495e150
patchbomb: word-wrap help texts at 70 characters
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sat, 04 Apr 2009 23:18:41 +0200 |
parents | a999dbc915f2 |
children | e2c55c4a25e2 |
files | hgext/patchbomb.py |
diffstat | 1 files changed, 31 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sat Apr 04 23:18:27 2009 +0200 +++ b/hgext/patchbomb.py Sat Apr 04 23:18:41 2009 +0200 @@ -1,11 +1,11 @@ '''sending Mercurial changesets as a series of patch emails -The series is started off with a "[PATCH 0 of N]" introduction, -which describes the series as a whole. +The series is started off 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 body parts: +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 body parts: The remainder of the changeset description. @@ -14,18 +14,20 @@ The patch itself, as generated by "hg export". Each message refers to all of its predecessors using the In-Reply-To -and References headers, so they will show up as a sequence in -threaded mail and news readers, and in mail archives. +and References headers, so they will show up as a sequence in threaded +mail and news readers, and in mail archives. For each changeset, you will be prompted with a diffstat summary and -the changeset summary, so you can be sure you are sending the right changes. +the changeset summary, so you can be sure you are sending the right +changes. To enable this extension: [extensions] hgext.patchbomb = -To configure other defaults, add a section like this to your hgrc file: +To configure other defaults, add a section like this to your hgrc +file: [email] from = My Name <my@email> @@ -41,20 +43,20 @@ prompted for an email recipient address, a subject an an introductory message describing the patches of your patchbomb. Then when all is done, patchbomb messages are displayed. If PAGER environment variable -is set, your pager will be fired up once for each patchbomb message, so -you can verify everything is alright. +is set, your pager will be fired up once for each patchbomb message, +so you can verify everything is alright. -The "-m" (mbox) option is also very useful. 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, e.g. with mutt: +The "-m" (mbox) option is also very useful. 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, e.g. with mutt: % mutt -R -f mbox When you are previewing the patchbomb messages, you can use `formail' -(a utility that is commonly installed as part of the procmail package), -to send each message out: +(a utility that is commonly installed as part of the procmail +package), to send each message out: % formail -s sendmail -bm -t < mbox @@ -62,9 +64,9 @@ You can also either configure the method option in the email section to be a sendmail compatable mailer or fill out the [smtp] section so -that the patchbomb extension can automatically send patchbombs directly -from the commandline. See the [email] and [smtp] sections in hgrc(5) -for details.''' +that the patchbomb extension can automatically send patchbombs +directly from the commandline. See the [email] and [smtp] sections in +hgrc(5) for details.''' import os, errno, socket, tempfile, cStringIO import email.MIMEMultipart, email.MIMEBase @@ -183,13 +185,13 @@ program is installed, the result of running diffstat on the patch. Finally, the patch itself, as generated by "hg export". - With --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 --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 --bundle, changesets are selected as for --outgoing, - but a single email containing a binary Mercurial bundle as an - attachment will be sent. + With --bundle, changesets are selected as for --outgoing, but a + single email containing a binary Mercurial bundle as an attachment + will be sent. Examples: @@ -208,8 +210,8 @@ 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 - Before using this command, you will need to enable email in your hgrc. - See the [email] section in hgrc(5) for details. + Before using this command, you will need to enable email in your + hgrc. See the [email] section in hgrc(5) for details. ''' _charsets = mail._charsets(ui)