[MERGE] Updated gcommit window

John Arbash Meinel john at arbash-meinel.com
Fri Oct 26 16:31:13 BST 2007

Hash: SHA1

The attached patch enhances the "gcommit" window with a few new details.

First, it always shows the full tree diff in the right hand pane. When
selecting a specific file on the left hand side, it will show just the diff for
that change.

It also allows using ^N to jump to the Next file.

It also has some basic support for adding a per-file commit message. Which will
then be shown in "bzr viz" and "bzr gannotate".
To enable the per-file commit data, you need to set "per-file-commit = True" as
a branch config. (So you can set it globally in ~/.bazaar/bazaar.conf, or in
locations.conf for specific branches, or in branch.conf.)

As an added bonus, I found that you can indeed write simple unit tests for
pygtk. It seems you don't have to have the main loop running in order to
interact with the widgets and have them issue events.

So I'm able to create a tree, and then make sure the different boxes are
populated with the right data. As well as ensure that selecting a given item
updates the other widgets correctly.

This also adds some refactoring of the DiffDialog, to create a DiffView which
can be embedded in both "bzr gdiff" and "bzr gcommit" windows.

I'm happy to refine it a bit if people so desire. But overall I think it is a
genuine improvement over the previous gcommit window.

There are some other small things, like using Tree._iter_changes instead of
Tree.changes_from, which means things are sorted by path, rather than being
sorted by action. (changes_from sorts into 'added', 'removed', etc.)

Also, I pushed this branch up to Launchpad, it should be available at:

Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gtk-gcommit.patch
Url: https://lists.canonical.com/archives/bzr-gtk/attachments/20071026/5c14c1b0/attachment-0001.diff 

More information about the bzr-gtk mailing list