Possible bug in bzr diff
Goffredo Baroncelli
kreijack at alice.it
Tue Mar 21 19:48:32 GMT 2006
Hi all,
during the develop of the command "bzr patch", I found what I think a bug in
the 'bzr diff' command.
If a file is changed _AND_ is moved or an entry of its path is renamed,
the diff is wrong:
example
ghigo at venice:~/bazaar/test2$ bzr init
ghigo at venice:~/bazaar/test2$ mkdir dir
ghigo at venice:~/bazaar/test2$ echo 2 >>dir/file
ghigo at venice:~/bazaar/test2$ bzr add *
added dir
added dir/file
ghigo at venice:~/bazaar/test2$ bzr ci -m "commit"
Committed revision 1.
ghigo at venice:~/bazaar/test2$ echo 2 >>dir/file
ghigo at venice:~/bazaar/test2$ bzr mv dir new-dir
dir => new-dir
ghigo at venice:~/bazaar/test2$ bzr diff
=== renamed directory 'a/dir' => 'b/new-dir'
=== modified file 'a/new-dir/file'
--- a/new-dir/file <-------------- the error is there
+++ b/new-dir/file
@@ -1,1 +1,2 @@
2
+2
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
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: 6781 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060321/5a7572c9/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/20060321/5a7572c9/attachment.pgp
More information about the bazaar
mailing list