rename [patchbomb] section to [email] section in hgrc. old name still ok.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Thu, 04 May 2006 12:00:45 -0700
changeset 2198 564034552f7f
parent 2197 5de8b44f0446
child 2199 f1986a61ccff
rename [patchbomb] section to [email] section in hgrc. old name still ok.
hgext/patchbomb.py
--- a/hgext/patchbomb.py	Thu May 04 11:32:00 2006 -0700
+++ b/hgext/patchbomb.py	Thu May 04 12:00:45 2006 -0700
@@ -44,7 +44,7 @@
 # To configure other defaults, add a section like this to your hgrc
 # file:
 #
-# [patchbomb]
+# [email]
 # from = My Name <my@email>
 # to = recipient1, recipient2, ...
 # cc = cc1, cc2, ...
@@ -183,11 +183,13 @@
         jumbo.extend(p)
         msgs.append(makepatch(p, i + 1, len(patches)))
 
-    sender = (opts['from'] or ui.config('patchbomb', 'from') or
+    sender = (opts['from'] or ui.config('email', 'from') or
+              ui.config('patchbomb', 'from') or
               prompt('From', ui.username()))
 
     def getaddrs(opt, prpt, default = None):
-        addrs = opts[opt] or (ui.config('patchbomb', opt) or
+        addrs = opts[opt] or (ui.config('email', opt) or
+                              ui.config('patchbomb', opt) or
                               prompt(prpt, default = default)).split(',')
         return [a.strip() for a in addrs if a.strip()]
     to = getaddrs('to', 'To')