[BUG][0.15] merging a removed directory unversions children
John Arbash Meinel
john at arbash-meinel.com
Mon Mar 19 16:50:52 GMT 2007
I was trying to debug: https://launchpad.net/bzr/+bug/93681
And in doing so, I came across a different problem. Specifically, if I
have 2 branches, and one of them deletes a directory, and the other one
adds a new file in that directory.
Then when you merge the deleted directory, it properly gives a path
conflict and doesn't unversion the directory. But for some reason it
*does* mark the files in that directory as unversioned.
Here are the steps:
% bzr init a
% cd a
% bzr
% mkdir foo; echo bar > foo/bar
% bzr add
added foo
added foo/bar
% bzr commit -m "init"
added foo
added foo/bar
Committed revision 1.
% cd ..
% bzr branch a b
cd b
Branched 1 revision(s).
% cd b
% echo baz > foo/baz
% bzr add
added foo/baz
% bzr commit -m "foo/baz"
added foo/baz
Committed revision 2.
% cd ../a
% rm -rf fo
% bzr rm foo; rm -rf foo
% bzr commit -m "rm foo"
deleted foo
deleted foo/bar
Committed revision 2.
% cd ../b
% bzr merge ../a
-D foo/bar
Conflict: can't delete foo because it is not empty. Not deleting.
Conflict because foo is not versioned, but has versioned children.
Versioned directory.
2 conflicts encountered.
% bzr st
removed:
foo/bar
foo/baz
conflicts:
Conflict: can't delete foo because it is not empty. Not deleting.
Conflict because foo is not versioned, but has versioned children.
Versioned directory.
pending merges:
John Arbash Meinel 2007-03-19 rm foo
My feeling is that foo/baz should still be versioned after the merge,
and that foo/ should be conflicted (as it already is).
Now, I just tested with bzr-0.11, and my intuition seems to be
incorrect. Since bzr-0.11 (with a --knit working tree) reports almost
the same thing.
There is one (important) difference, though. In that bzr11 gives:
removed:
foo/bar
foo/baz
unknown:
foo/baz
...
While dirstate isn't reporting the unknown "foo/baz" file.
So while not leaving the children versioned seems to be a bug, not
reporting "unknown" is *definitely* a bug.
John
=:->
More information about the bazaar
mailing list