file ids at the same path can be confusing when diff/merging
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Using bzr_loom v1.3, on Fedora 10 x86_64:
If an upper thread creates a new directory with a file, then a lower thread creates the same directory with a different, |bzr up-thread| will resolve the conflict by renaming the original directory. When the conflict is resolved, |bzr diff -r thread: dir/upper-file| will show *two* diffs, the first adding the file and the second removing it, even though the file still exists. This means that applying the diff will create and then delete the file, which is broken
To reproduce:
mkdir loom_test
cd loom_test
bzr init
# Need a checkin in the main branch else you hit bug 253476
echo bug > file
bzr add file
bzr ci -m 'First file'
# End bug workaround
bzr nick start
bzr loomify
bzr create-thread test1
mkdir dir
echo test > dir/topfile
bzr add dir
bzr ci -m 'add file to upper thread'
bzr down-thread
mkdir dir
echo test > dir/bottomfile
bzr add dir
bzr ci -m 'add file to bottom thread'
bzr up-thread
# Resolve conflicts
mv dir.moved/
rmdir dir.moved
bzr add dir
bzr resolve dir
bzr ci -m 'Merge from down-thread'
cat dir/bottomfile
bzr diff -r thread: dir/bottomfile
Actual diff:
=== added file 'dir/bottomfile'
--- dir/bottomfile 1970-01-01 00:00:00 +0000
+++ dir/bottomfile 2009-06-01 08:48:50 +0000
@@ -0,0 +1,1 @@
+test
=== removed file 'dir/bottomfile'
--- dir/bottomfile 2009-06-01 08:48:51 +0000
+++ dir/bottomfile 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-test
expected diff - just the first bit.
[bbaetz@plum src]$ bzr --version
Bazaar (bzr) 1.13.1
Python interpreter: /usr/bin/python 2.5.2
Python standard library: /usr/lib64/
bzrlib: /usr/lib64/
Bazaar configuration: /home/bbaetz/
Bazaar log file: /home/bbaetz/
Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
tags: | added: check-for-breezy |
Actually, the expected result is no output, since the top thread hasn't changed that file.