Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Differences between revisions 3 and 4
Revision 3 as of 2007-09-04 07:17:37
Size: 1575
Editor: KeirMierle
Comment:
Revision 4 as of 2007-09-04 17:14:45
Size: 2221
Editor: KeirMierle
Comment: Expanded muttrc section
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
# Most important line: (correct it to wherever gsend.py is on your machine)
set sendmail="~/wrk/gsend/gsendmail.py"

# These make the process of sending much faster (no prompting)
set autoedit
Line 22: Line 27:
set autoedit set confirmcreate=no

# Set return path (these are optional)
set use_envelope_from
set envelope_from_address="keir@cs.utoronto.ca"

# Add a From: header. This is editable per-message via edit_headrs
set use_from
set from="\"John Doe\" <john_doe83@gmail.com>"

# For vimmers: This puts the cursor on line 5 (Subject:) and starts insert.
# Depending on your mutt setup, you may have to change the 5 to something else
set editor="vim +5 +startinsert!"

Bzr Send with Gmail

It would be nice if it was possible to 'bzr send' and have a gmail compose window pop up in firefox complete with an attachment and subject. However, there is no easy way to automatically add an attachment to a gmail message from a command line. Instead, we can use mutt with the SMTP gmail backend to achieve almost the same thing.

Right now, this tutorial only works when gnome-keyring is present (any ubuntu, fedora, suse, etc), and your MUA is mutt. Making this work in more cases is obviously important because gmail is pervasive; if you have the time please jump in and extend this!

bzr send via mutt and gmail

  1. Get a copy of gsendmail: bzr branch http://bazaar.launchpad.net/~mierle/gsendmail/trunk gsendmail

  2. Run gsendmail.py --setup and enter your gmail user and password. They will be stored in the gnome keyring.

  3. Add set sendmail="~/path/to/gsendmail" to your ~/.muttrc.

  4. Download and apply this bundle to your local bzr: http://cache.gmane.org//gmane/comp/version-control/bazaar-ng/general/30639-001.bin. It adds support for mutt. It may be merged by the time you read this.

  5. Edit ~/.bazaar/bazaar.conf and add mail_client=mutt under DEFAULT.

You should now be able to hack away, run bzr send --mail-to=myproject@lists.project.org

Suggested muttrc additions

The following make the process of sending mail via mutt faster, because it avoids prompting you.

# Most important line: (correct it to wherever gsend.py is on your machine)
set sendmail="~/wrk/gsend/gsendmail.py"

# These make the process of sending much faster (no prompting)
set autoedit
set edit_headers
set confirmcreate=no

# Set return path (these are optional)
set use_envelope_from
set envelope_from_address="keir@cs.utoronto.ca"

# Add a From: header. This is editable per-message via edit_headrs
set use_from
set from="\"John Doe\" <john_doe83@gmail.com>"

# For vimmers: This puts the cursor on line 5 (Subject:) and starts insert.
# Depending on your mutt setup, you may have to change the 5 to something else
set editor="vim +5 +startinsert!"

If you have any problems, mail me; my gmail is my last name (mierle).