Possible bug in bzr diff

Goffredo Baroncelli kreijack at alice.it
Fri Apr 21 22:19:37 BST 2006


On Friday 21 April 2006 06:21, you (Martin Pool) wrote:
> On 22/03/2006, at 6:48 AM, Goffredo Baroncelli wrote:
> 
> > Hi all,
> >
> > during the develop of the command "bzr patch", I found what I think  
> > a bug in
> > the 'bzr diff' command.
[...]
> > The output of the diff command should be
> > 	--- a/dir/file
> > instead
> > 	--- a/new-dir/file
> >
> > The patch attached should solve the problem. A test case is added
> 
> I agree this is a better behaviour.  I disagree with Aaron that "the  
> primary target for diff is patch"; for me it is far more common to  
> read the output.  (I do it at least before every commit, and  
> presumably am not alone.)  In any case the current behaviour does not  
> support renames through patch properly anyhow.
> 
> This is +1 from me to merge for 0.8.
> 
> By way of feedback it may be better to have a collection of smaller  
> tests, rather than one that checks so much output - then if one of  
> them fails it may be easier to track down.  I'm not sure it would be  
> simpler here -- this is just something to think about.
> 

I agree, so in the enclosed patch I split the "big" test in 5 tests:

- check the bzr diff output for added file/dir/link
- check the bzr diff output for changed file/link
- check the bzr diff output for changed and moved file/link
- check the bzr diff output for deleted file/link/dir
- check the bzr diff output for moved file/link/dir

Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 8097 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060421/215a5a87/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060421/215a5a87/attachment.pgp 


More information about the bazaar mailing list