[ann/rfc] bzr-diff-revid

Benjamin Jansen aogail at w007.org
Fri Jan 16 07:30:57 GMT 2009


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?

Thanks,
Ben

[1]
Review Board - http://review-board.org
My review-board patch that utilizes the revid: diff header - http://reviews.review-board.org/r/692/

[2]
In one specific case, the revision's date was "2008-12-30 13:24:25".  
To actually see the new file contents for the revision, I had to ask  
bzr for date:"2008-12-31 08:32:32".

[3]
https://launchpad.net/bzr-diff-revid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3914 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090115/b941a5c2/attachment.bin 


More information about the bazaar mailing list