[bzr-email:MERGE/RFC] Include Message-Id to allow threading

John Arbash Meinel john at arbash-meinel.com
Tue Mar 18 17:24:14 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attached is a patch which implements Message-Id for bzr-email.

I implemented it as an optional feature which defaults to off.

I tested it out by sending stuff just to myself and it did indeed thread
the way I expected (at least in Thunderbird).

I decided to escape and then tack on an @bzr-email at the end.
I needed to ensure an @ anyway, and this also helps in case multiple
implementers want to do it differently.

So you end up with headers that look like:
 Message-Id:
<john_40arbash-meinel.com-20080318171613-k7jt6z34n92htgap at bzr-email>
 References:
<john_40arbash-meinel.com-20080318171512-r3k4ep5fmfu27z23 at bzr-email>
 In-Reply-To:
<john_40arbash-meinel.com-20080318171512-r3k4ep5fmfu27z23 at bzr-email>

We can decide whether to merge it or not, but I think it is useful and
the code is written.

I have the branch available at:
  lp:~jameinel/bzr-email/message_id

I also have a small bugfix in there. Specifically we were using:

self.assertEqual(True, sender.should_send())

However "should_send()" was returning

  return self.to() and self.from_address()

Which meant that "Address_to_send_to" != True

We could have changed it to:

self.assertTrue(sender.should_send())

But I thought that it made sense for "should_send()" to actually return
a boolean.

I'm not sure how the change made it in since the test suite was
failing... but whatever. The test suite passes with my changes now.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH3/q+JdeBCYSNAAMRApwrAJ4guGQZoasSFWufw/sH4mgD1pAXjQCfZKM5
Wju9C2DwQZFaimdVIz/NHIk=
=XmX7
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: message_id.patch
Type: text/x-diff
Size: 17862 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080318/ae498af4/attachment-0001.bin 


More information about the bazaar mailing list