[MERGE] tags in log output

Alexander Belchenko bialix at ukr.net
Fri Apr 13 10:18:06 BST 2007


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

Kent Gibson пишет:
> 
> 
> 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.
> 
> Actually I was thinking of a wrapper class - LogRevision which would
> contain the attributes to be logged - including the revision, revno,
> delta, tags, ...
> I guess kwargs would serve the same purpose, but a class can be
> documented so you know what attributes to expect.
> 
> I agree we don't want to change revision itself, for the reasons you
> mention.

I'd like to use kwargs, because creating new object for each revision
could leads to slowdown without any real benefit. We can document all new
parameters (expected in kwargs) for log formatter in the API docstrings.

And I agree with your point about log.start()/log.end().

[µ]

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

iD8DBQFGH0rNzYr338mxwCURAu+gAJ4lfEfX20/4F+XOq8P2ItNB1Ez9YwCfd/nc
3Koo9KCCl4zcDt0+L1viNPc=
=lw5P
-----END PGP SIGNATURE-----



More information about the bazaar mailing list