Rev 4294: (Jelmer) Use -- before recipient address in mutt command-line. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Apr 15 18:26:05 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4294
revision-id: pqm at pqm.ubuntu.com-20090415172601-buxpv8kc1qf9uork
parent: pqm at pqm.ubuntu.com-20090415162451-bmgy1sh0fgs1cv7p
parent: jelmer at samba.org-20090415132323-mhh0jisdupml4s1e
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-04-15 18:26:01 +0100
message:
  (Jelmer) Use -- before recipient address in mutt command-line.
modified:
  bzrlib/mail_client.py          mail_client.py-20070809192806-vuxt3t19srtpjpdn-1
  bzrlib/tests/test_mail_client.py test_mail_client.py-20070809192806-vuxt3t19srtpjpdn-2
    ------------------------------------------------------------
    revno: 4292.1.1
    revision-id: jelmer at samba.org-20090415132323-mhh0jisdupml4s1e
    parent: pqm at pqm.ubuntu.com-20090415082033-tds4zs962x6kwc2c
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: mutt-send
    timestamp: Wed 2009-04-15 15:23:23 +0200
    message:
      Mutt requires -- before the recipient address if -a is being used.
    modified:
      bzrlib/mail_client.py          mail_client.py-20070809192806-vuxt3t19srtpjpdn-1
      bzrlib/tests/test_mail_client.py test_mail_client.py-20070809192806-vuxt3t19srtpjpdn-2
=== modified file 'bzrlib/mail_client.py'
--- a/bzrlib/mail_client.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/mail_client.py	2009-04-15 13:23:23 +0000
@@ -267,7 +267,7 @@
             message_options.extend(['-a',
                 self._encode_path(attach_path, 'attachment')])
         if to is not None:
-            message_options.append(self._encode_safe(to))
+            message_options.extend(['--', self._encode_safe(to)])
         return message_options
 mail_client_registry.register('mutt', Mutt,
                               help=Mutt.__doc__)

=== modified file 'bzrlib/tests/test_mail_client.py'
--- a/bzrlib/tests/test_mail_client.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_mail_client.py	2009-04-15 13:23:23 +0000
@@ -32,7 +32,7 @@
         self.assertEqual(['-a', 'file%'], commandline)
         commandline = mutt._get_compose_commandline('jrandom at example.org',
                                                      'Hi there!', None)
-        self.assertEqual(['-s', 'Hi there!', 'jrandom at example.org'],
+        self.assertEqual(['-s', 'Hi there!', '--', 'jrandom at example.org'],
                          commandline)
 
     def test_commandline_is_8bit(self):
@@ -40,7 +40,7 @@
         cmdline = mutt._get_compose_commandline(u'jrandom at example.org',
             u'Hi there!', u'file%')
         self.assertEqual(
-            ['-s', 'Hi there!', '-a', 'file%', 'jrandom at example.org'],
+            ['-s', 'Hi there!', '-a', 'file%', '--', 'jrandom at example.org'],
             cmdline)
         for item in cmdline:
             self.assertFalse(isinstance(item, unicode),




More information about the bazaar-commits mailing list