the inventory must be updated as merge proceeds, not at the end

Denys Duchier duchier at ps.uni-sb.de
Thu Dec 29 02:16:17 GMT 2005


John A Meinel <john at arbash-meinel.com> writes:

> Also, since you aren't writing out the inventory, if you aren't careful
> and have 2 WorkingTree objects pointing to the same directory, one of
> them won't see the changes.

yes, that's a no-no.  It's never been safe to have another reader
while there is a writer.

> Well, there is a small difference. Specifically if the directory is in
> the working tree, you can version it. You can't version a directory in
> .bzr/.

I have no intention of "versioning" the tree, especially not as a
subdirectory of the working tree.  In fact, that was one reason I
chose to NOT have it in the working tree; that's why I chose
.bzr/limbo.

> For my idea, while you are doing the merge stuff, you add
> bzr-tree-change temporarily. Which means that you only have 1 inventory,
> the working inventory. And in the middle of a merge, you add a secret
> directory, which will then be removed when you are done.

yes, exactly.

> So that if
> something got interrupted, you would end up with 'bzr status' showing
> that bzr-tree-change was added, and that there were several files
> renamed to be underneath it.

If you get interrupted in the middle of merge, your working tree is
fucked.  It's no use trying to pretend otherwise... and it's not
especially useful either.  You can use "revert" to get back to the
previous revision - personally, I would prefer to see every operation
logged (with sufficient detail) so that they can be played backwards
so that you can not only revert versioned files, but all files.

"bzr status" (and other commands) can easily be updated to check that
we are not in a fucked up state.

> Well, I think the group decision was that 'a missing versioned file'
> should cause commit to fail so the user can decide whether it needs to
> be resolved with a 'bzr rm' or a 'bzr mv'.

Fine.  I think that's an unnecessary restriction, but not sufficiently
so that I would care to fight against it.

--Denys






More information about the bazaar mailing list