merge with crew.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Thu, 27 Jul 2006 12:36:17 -0700
changeset 2705 030d0abdf91b
parent 2704 99e7cf6bd2f7 (diff)
parent 2701 f12d2e5b97fe (current diff)
child 2706 146fef06e188
child 2707 4af7b178976a
merge with crew.
hgext/patchbomb.py
tests/run-tests.py
--- a/hgext/patchbomb.py	Thu Jul 27 18:53:31 2006 +0200
+++ b/hgext/patchbomb.py	Thu Jul 27 12:36:17 2006 -0700
@@ -193,8 +193,7 @@
     if len(patches) > 1:
         ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
 
-        msg = email.MIMEMultipart.MIMEMultipart()
-        msg['Subject'] = '[PATCH 0 of %d] %s' % (
+        subj = '[PATCH 0 of %d] %s' % (
             len(patches),
             opts['subject'] or
             prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
@@ -209,11 +208,14 @@
             if l == '.': break
             body.append(l)
 
-        msg.attach(email.MIMEText.MIMEText('\n'.join(body) + '\n'))
-
         if opts['diffstat']:
             d = cdiffstat(_('Final summary:\n'), jumbo)
-            if d: msg.attach(email.MIMEText.MIMEText(d))
+            if d: body.append('\n' + d)
+
+        body = '\n'.join(body) + '\n'
+
+        msg = email.MIMEText.MIMEText(body)
+        msg['Subject'] = subj
 
         msgs.insert(0, msg)
 
--- a/tests/run-tests.py	Thu Jul 27 18:53:31 2006 +0200
+++ b/tests/run-tests.py	Thu Jul 27 12:36:17 2006 -0700
@@ -244,7 +244,7 @@
         ref_out = splitnewlines(f.read())
         f.close()
     else:
-        ref_out = ['']
+        ref_out = []
     if out != ref_out:
         diffret = 1
         print "\nERROR: %s output changed" % (test)
@@ -334,7 +334,9 @@
         if len(args) == 0:
             args = os.listdir(".")
         for test in args:
-            if test.startswith("test-") and not '~' in test and not '.' in test:
+            if (test.startswith("test-") and '~' not in test and
+                ('.' not in test or test.endswith('.py') or 
+                 test.endswith('.bat'))):
                 if not run_one(test):
                     failed += 1
                 tests += 1