[RFI] Annotations cache & progressive display of annotations

Martin Pool mbp at canonical.com
Tue Feb 16 22:59:13 GMT 2010


On 17 February 2010 02:44, Stefan Monnier <monnier at iro.umontreal.ca> wrote:
>> bzr annotate --show-ids will give you the revision ids which introduced
>> a given line. (at the cost of annotating the whole file)
>
> Performance is the key problem.
>
>> I'm not really sure why you couldn't just do "bzr log -p FILE" and then
>> filter out the diffs that did not affect the lines you cared about.
>> (Given that that is all that --lines NN..MM would really be doing.)
>
> Yes, that's the way to do it, but you need to update the NN..MM range
> after every hunk.  It's again a performance problem: bzr could do it
> internally much more efficiently.
>
> I'm not saying it can't be done outside of Bzr.  I'm saying that I think
> it would be a great feature for Bzr to support and that by doing it
> within Bzr, it can be made a lot more efficient.
> Just like "annotate" could be implemented on top of "bzr log -p" but it's
> considered an important feature worth optimizing.

Yes, I think it would be great if there was a keystroke in emacs that
would tell you the origin of the line the cursor is on, or the region,
and such a command would be a good interface to it.  (M-x bzr-wtf?)

You could do a simple (inefficient) version of it fairly easily now by
calling the existing annotate code and the chopping down to the
region, then later change it to only annotate the region of interest.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list