[ann/rfc] bzr-diff-revid
James Henstridge
james at jamesh.id.au
Fri Jan 16 08:36:11 GMT 2009
On Fri, Jan 16, 2009 at 4:30 PM, Benjamin Jansen <aogail at w007.org> wrote:
> Hello,
>
> I've recently been working to get Review Board's [1] bzr support up to
> snuff. One of the underlying problems is that ``bzr diff'' outputs only
> timestamps in the diff header. Since Review Board wants to get the full
> contents of the old file when it loads a diff, I was using a date: revspec
> to retrieve the file at a particular revision. Unfortunately, I soon ran
> into at least one revision in our currently small (~250 revisions)
> repository where passing a date: revspec did not retrieve the correct file
> contents. [2]
>
> I figured the easiest solution would be to make ``bzr diff'' output revids
> in the diff header, when a revid is available. Thus, bzr-diff-revid was
> born. [3] It's a simple hack, but it works for me and made our Review Board
> integration problems go away. ;)
>
> For example, with the plugin, ``bzr diff'' outputs diff headers like:
>
> === modified file 'NEWS'
> --- NEWS revid:pqm at pqm.ubuntu.com-20090115233242-4bxyn4zcj2a0ksfk
> +++ NEWS 2009-01-16 07:20:35 +0000
>
> If there is no revid available, the timestamp is used.
>
> I tagged this message [rfc] because I am interested in getting this
> functionality into bzr proper. Is this something that the bzr team would be
> interested in?
The diff output from CVS uses "filename date timezone revno", so
perhaps that would be a good model to follow (using either a dotted
revno or a revid).
That said, it might be more useful to focus on Bazaar's bundle format,
which provides enough information to reconstruct all the changes.
Bazaar has all the code you'd need to produce a working tree with the
proposed changes as a pending merge ready for inspection.
Furthermore, if review-board could accept reviews by email, the "bzr
send" command could be used for submission unchanged.
James.
More information about the bazaar
mailing list