Possible bug in bzr diff

Goffredo Baroncelli kreijack at alice.it
Tue Mar 21 21:36:38 GMT 2006


Hi Aron,

On Tuesday 21 March 2006 21:46, you (Aaron Bentley) wrote:
> Goffredo Baroncelli wrote:
[...]
> 
> I agree that the above is wrong, but I'm not certain your fix is right.
>    Diff cannot detect renames.  So it emits a file move as a
> delete/create pair.


Sorry, my patch isn't intended to add support for renaming/moving to the 
*unix* patch command. The aim of the my patch is to make coherent the bzr diff
command with itself. If you rename and modify a file you get

ghigo at venice:~/bazaar/test3$ bzr init
ghigo at venice:~/bazaar/test3$ echo 1 >file
ghigo at venice:~/bazaar/test3$ bzr add file
added file
ghigo at venice:~/bazaar/test3$ bzr ci -m "commit"
Committed revision 1.
ghigo at venice:~/bazaar/test3$ echo 2 >>file
ghigo at venice:~/bazaar/test3$ bzr mv file file2
file => file2
ghigo at venice:~/bazaar/test3$ bzr diff
=== renamed file 'a/file' => 'b/file2'
--- a/file
+++ b/file2
@@ -1,1 +1,2 @@
 1
+2


the renaming of a directory is equivalent ( more or less ) to the renaming of 
every contained files...

I think that a more powerfoul solution, is to add an option to the "bzr diff" command
in order to translate the renaming/moving in a file delete and a file creation. But this
is not ( nor was ) the aim of my patch

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




More information about the bazaar mailing list