[PATCH] patchbomb: make --bundle respect --desc

Steve Borho steve at borho.org
Thu Dec 27 22:40:16 CST 2007


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1198816807 21600
# Node ID 17bc21147572ba56c49276c2aede10b51fbe262d
# Parent  4cf5a4950fc92adcca7a67c03ba6bf3e0db3bfb2
patchbomb: make --bundle respect --desc

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -322,8 +322,13 @@ def patchbomb(ui, repo, *revs, **opts):
     def getbundlemsgs(bundle):
         subj = (opts['subject']
                 or prompt('Subject:', default='A bundle for your repository'))
-        ui.write(_('\nWrite the introductory message for the bundle.\n\n'))
-        body = ui.edit('', sender)
+
+        if opts['desc']:
+            body = open(opts['desc']).read()
+        else:
+            ui.write(_('\nWrite the introductory message for the '
+                       'bundle.\n\n'))
+            body = ui.edit('', sender)
 
         msg = email.MIMEMultipart.MIMEMultipart()
         if body:


More information about the Mercurial-devel mailing list