[PATCH] bzrlib API to add pending revision properties to a working tree

James Henstridge james at jamesh.id.au
Fri Sep 1 10:58:00 BST 2006


Revision properties are a useful way to add metadata to a commit, but
the current interface is not that nice for plugins.

If I want to set a revision property, I need to provide my own version
of "bzr commit" to the user that passes the revprops argument to
WorkingTree.commit().  It would be nice if I could just set a flag
telling the next commit() call to apply the given revision property.
This would allow a workflow like:

    # do some work
    bzr some_command_that_sets_a_revprop
    # dp some more work
    bzr commit -m 'log message'

The attached bundle provides a WorkingTree API to make this possible,
adding three methods:
 * get_pending_revprops() - returns a dictionary of pending revprops
 * set_pending_revprops(revprops) - set the pending revprops dict
(replacing any previous pending revprops).
 * add_pending_revprop(name, value) - add an individual pending revprop

The branch is also available here:
    http://people.ubuntu.com/~jamesh/bzr/bzr.pending-revprops/

What do you think of this API?

James.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending-revprops.bundle
Type: application/octet-stream
Size: 14609 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060901/64fd1650/attachment.obj 


More information about the bazaar mailing list