[PATCH] patchbomb: use patch.diffopts instead of mdiff.diffopts to read [diff] section of hgrc

Bill Barry after.fallout at gmail.com
Sat Jan 24 11:36:37 CST 2009


# HG changeset patch
# User Bill Barry <after.fallout at gmail.com>
# Date 1232817511 25200
# Node ID 36ce14b163166ba07d87f8a530c9b7536e5507a9
# Parent  43cfbb21f04dad85faa977588b7597d74cacfc4b
patchbomb: use patch.diffopts instead of mdiff.diffopts to read [diff] section of hgrc

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -58,12 +58,18 @@
 
   % formail -s sendmail -bm -t < mbox
 
-That should be all. Now your patchbomb is on its way out.'''
+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 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.'''
 
 import os, errno, socket, tempfile, cStringIO
 import email.MIMEMultipart, email.MIMEBase
 import email.Utils, email.Encoders, email.Generator
-from mercurial import cmdutil, commands, hg, mail, mdiff, patch, util
+from mercurial import cmdutil, commands, hg, mail, patch, util
 from mercurial.i18n import _
 from mercurial.node import bin
 
@@ -225,7 +231,7 @@
         for r in cmdutil.revrange(repo, revs):
             output = cStringIO.StringIO()
             p = patch.export(repo, [r], fp=output,
-                             opts=mdiff.diffopts(git=opts.get('git')))
+                             opts=patch.diffopts(opts))
             yield output.getvalue().split('\n')
 
     def getbundle(dest):


More information about the Mercurial-devel mailing list