[PATCH] patchbomb: fix to and cc passing by command line.

Benoit Boissinot benoit.boissinot at ens-lyon.org
Fri Aug 26 11:15:39 CDT 2005


This patch fixes the following traceback:

Traceback (most recent call last):
  File "./patchbomb", line 249, in ?
    patchbomb(u, repo, *args, **options)
  File "./patchbomb", line 173, in patchbomb
    to = [t.strip() for t in to.split(',')]
AttributeError: 'list' object has no attribute 'split'


# HG changeset patch
# User tonfa at arakou
# Node ID 50e976d3e3ada4c0d5d9680f98a3074a37967a1f
# Parent  1cb566188526a76853c6e06f6cfc3e6fcf305e39
Fix to and cc passing by command line (it is already a list).

diff -r 1cb566188526 -r 50e976d3e3ad contrib/patchbomb
--- a/contrib/patchbomb	Fri Aug 26 10:49:53 2005
+++ b/contrib/patchbomb	Fri Aug 26 15:59:55 2005
@@ -169,11 +169,14 @@
         len(patches),
         opts['subject'] or
         prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
-    to = opts['to'] or ui.config('patchbomb', 'to') or prompt('To')
-    to = [t.strip() for t in to.split(',')]
-    cc = (opts['cc'] or ui.config('patchbomb', 'cc') or
-          prompt('Cc', default = ''))
-    cc = (cc and [c.strip() for c in cc.split(',')]) or []
+    to = opts['to']
+    if not to:
+        to = ui.config('patchbomb', 'to') or prompt('To')
+        to = [t.strip() for t in to.split(',')]
+    cc = opts['cc']
+    if not cc:
+        cc = ui.config('patchbomb', 'cc') or prompt('Cc', default = '')
+        cc = (cc and [c.strip() for c in cc.split(',')]) or []
 
     ui.write('Finish with ^D or a dot on a line by itself.\n\n')
 


More information about the Mercurial mailing list