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

Martin Pool mbp at canonical.com
Fri Sep 1 11:37:54 BST 2006


On  1 Sep 2006, James Henstridge <james at jamesh.id.au> wrote:
> 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

+1 on the facility.

I don't think they should be called 'pending'.  From the PoV of the
working tree, they're just *the* revprops.  (Everything about the
working tree is in this sense pending.)

>    http://people.ubuntu.com/~jamesh/bzr/bzr.pending-revprops/

Haven't read that yet.

-- 
Martin




More information about the bazaar mailing list