patchbomb: wrapped docstrings at 78 characters
authorMartin Geisler <mg@lazybytes.net>
Tue, 07 Jul 2009 23:54:42 +0200
changeset 9071 141e3ef20d84
parent 9070 1933220e0284
child 9072 59e5437bbcdc
patchbomb: wrapped docstrings at 78 characters
hgext/patchbomb.py
--- a/hgext/patchbomb.py	Tue Jul 07 23:54:42 2009 +0200
+++ b/hgext/patchbomb.py	Tue Jul 07 23:54:42 2009 +0200
@@ -10,9 +10,9 @@
 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 changeset description.
 
@@ -20,16 +20,15 @@
 
   The patch itself, as generated by "hg export".
 
-Each message refers to the first in the series 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.
+Each message refers to the first in the series 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.
 
-With the -d/--diffstat option, you will be prompted for each changeset
-with a diffstat summary and the changeset summary, so you can be sure
-you are sending the right changes.
+With the -d/--diffstat option, you will be prompted for each changeset with a
+diffstat summary and the changeset summary, so you can be sure you are sending
+the right changes.
 
-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>
@@ -37,38 +36,36 @@
   cc = cc1, cc2, ...
   bcc = bcc1, bcc2, ...
 
-Then you can use the "hg email" command to mail a series of changesets
-as a patchbomb.
+Then you can use the "hg email" command to mail a series of changesets as a
+patchbomb.
 
-To avoid sending patches prematurely, it is a good idea to first run
-the "email" command with the "-n" option (test only). 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. If the PAGER environment
-variable is set, your pager will be fired up once for each patchbomb
-message, so you can verify everything is alright.
+To avoid sending patches prematurely, it is a good idea to first run the
+"email" command with the "-n" option (test only). 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. If the PAGER environment variable 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:
+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:
 
   % formail -s sendmail -bm -t < mbox
 
 That should be all. Now your patchbomb is on its way out.
 
-You can also either configure the method option in the email section
-to be a sendmail compatible 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.'''
+You can also either configure the method option in the email section to be a
+sendmail compatible 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.
+'''
 
 import os, errno, socket, tempfile, cStringIO, time
 import email.MIMEMultipart, email.MIMEBase
@@ -176,30 +173,27 @@
 def patchbomb(ui, repo, *revs, **opts):
     '''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.
+    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. Next, (optionally) if the diffstat program is
-    installed and -d/--diffstat is used, the result of running
-    diffstat on the patch. Finally, the patch itself, as generated by
-    "hg export".
+    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. Next,
+    (optionally) if the diffstat program is installed and -d/--diffstat is
+    used, the result of running diffstat on the patch. Finally, the patch
+    itself, as generated by "hg export".
 
-    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.
+    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.
 
-    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 -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.
+    With -b/--bundle, changesets are selected as for --outgoing, but a single
+    email containing a binary Mercurial bundle as an attachment will be sent.
 
     Examples:
 
@@ -218,8 +212,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)