[MERGE] tags in log output

John Arbash Meinel john at arbash-meinel.com
Thu Apr 12 16:13:45 BST 2007


Aaron Bentley wrote:
> Kent Gibson wrote:
>> Hi Alexander,
> 
>> I've got a comment that isn't specific to your patch, it's more about
>> plugin APIs in general, but your patch is a specific example.
> 
>> Rather than changing the LogFormatter API every time some new detail
>> is added to a revision (tags in this case, the delta for merge revs in
>> a recent patch from JAM), wouldn't it be better to make the tags an
>> attribute of the revision itself?
> 
> I don't think so.  Anything that is not part of the revision should not
> be added to it, because revisions are supposed to be immutable.
> 
> Therefore, revno and dotted revno should not be made attributes of
> revisions.  You might provide a supplemental dict, or maybe **kwargs,
> though.
> 
> Aaron

At one point we talked about making something like Revision or
RevisionTree have more functions on it (which would be lazily
evaluated). And then using something like that instead of passing around
revision_ids.

However, as different branches have a different view about tags, tags
can't really be a property of a Revision, though it could be a function
on Revision which is passed a Branch.

I think it might be better to change the LogFormatter api itself, so it
maintains a state of "this is what I'm logging", and that object can
gain more attributes when more information is available. Which is, in
essence, what Kent is talking about, only doing it on a helper object
rather than Revision.

John
=:->



More information about the bazaar mailing list