[ann/rfc] bzr-diff-revid

Colin D Bennett colin at gibibit.com
Fri Jan 16 14:32:29 GMT 2009


On Fri, 16 Jan 2009 11:33:19 +0200
Alexander Belchenko <bialix at ukr.net> wrote:

> Benjamin Jansen пишет:
> > 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.
> 
> Why you don't want to use comments in the diff (i.e. line starting with ===)?

Good idea.

Also, I like Marius Kruger's suggestion of using --show-ids to cause
the revids to be output, like the 'log' command does.

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090116/30ac3240/attachment.pgp 


More information about the bazaar mailing list