Two developers are working together on a project. One of them doesn't have webspace to publish his branch, but he wants to send his changes to the other developer. Without the submit plugin he has two options:
Send the other developer a complete copy of his branch. Problem: Very much useless data has to be transfered.
Send the other developer a patch containing his work: Problems: All meta-data (revisions, names, log messages etc.) is lost and there might be difficulties merging this patch if the other branch has been modified after the creation of the patch.
Create a bundle and send this by email. Problem: You have to do several steps (creating bundle, signing, pulling/merging) by hand. The submit-by-email plugin automates it, do this instead:
Step by Step Solution
- In the following instruction developer A sends his changes to B.
Both developers download and install the submit-by-mail plugin.
The user without webspace (or both) configure the plugin by setting the following options in ~/.bazaar/bazaar.conf:
smtp_server = [default: localhost] smtp_user = [leave empty if no authentication is required] smtp_password = [leave empty if no authentication is required]
- Commit all changes that should be sent.
- Send the message with
bzr submit --address mailto:[EMAIL ADDRESS OF DEVELOPER B] --message [SUBJECT] --remember [LOCATION OF DEVELOPER B's BRANCH]and then type a short message for developer B describing the changes (never leave this empty!).Description of this command:
--address (required): The address for the To: header.
--message (optional): Subject. If this parameter is not given a default subject of '[PATCH] '+ the last commit message is used.
--remember (optional): Remember the address and location so you can simply use "bzr submit" without paramters next time.
- Developer B now should find a mail in his inbox, which has the following format:
From: Developer A To: Developer B Subject: [PATCH] Something changed. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Message text Bazaar testament -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) ... -----END PGP SIGNATURE----- Attachment: Bundle
Developer B now can take the bundle and apply it using "bzr merge BUNDLEFILE" or "bzr pull BUNDLEFILE" or he can use the automated mechanism provided by "bzr apply" to automatically verify the signature and select whether to merge or to pull.
bzr apply --keyring /location/of/the/allowed/keys /location/of/the/message/from/developerA
(Only if merge was required) You have to "bzr commit" the changes. Patches that require a merge are rejected if you pass the --no-merge parameter.