[RFC] provide an API to easily create commands that iterate over a range of revisions
Matthieu.Moy at imag.fr
Mon Jul 24 14:25:23 BST 2006
I wanted to implement a command "email-notify" in the email plugin, to
manually send emails for one or several revision.
The user-interface looks terribly like the one of "bzr log" (with a -r
option accepting either a revision or a range of revision, a LOCATION
argument), but instead of displaying each revision, it sends a mail
for each revision.
I've got a prototype working, but its implementation is dirty. I
cut-and-pasted huge amount of code from cmd_log and log.py.
Indeed, I think that "log" is just one instance of "iterate over a set
of revisions", and I think something more general than show_log can be
written, taking two revisions, a location, and a callback function.
show_log would be only a wrapper around this, defining the right
callback, and plugins could use this function too.
Any opinion ?
More information about the bazaar