[MERGE] add a hook for Branch.set_last_revision_info()

John Arbash Meinel john at arbash-meinel.com
Wed Apr 9 08:34:03 BST 2008


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

James Henstridge wrote:
| One feature of the bzr-dbus plugin is to send a D-Bus signal over the
| session bus whenever the head revision of a branch changes.  It
| currently does this through the "set_rh" hook.
|
| Unfortunately, the current default branch formats do not call
| set_revision_history() during commits or pulls so the D-Bus signal
| doesn't get sent.  It seems that the set_last_revision_info() method
| is now the right place to hook to detect these changes, so that's what
| the attached bundle does.
|
| I realise that there are already hooks for commit, pull, push and
| uncommit, but I think this hook has value.  If I add hooks to the
| previous 4 operations, the plugin would need to be modified every time
| a new way to modify the branch head is added.  By adding a hook to the
| function that actually changes the branch, things should be a lot more
| robust.
|
| James.
|

BB:resubmit

I agree that I prefer Ian's hook and James's tests. So if we can get the two
merged I think we would have a great hook.

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

iD8DBQFH/HFrJdeBCYSNAAMRAi76AKCjfJlFqYU5A4rytQN4ijpxZHSpVQCaA9xf
FjxEwcujQNeZqi960aghWFI=
=PnCI
-----END PGP SIGNATURE-----




More information about the bazaar mailing list