'No final name for trans_id' during merge

David Engster deng at randomsample.de
Thu May 30 20:10:20 UTC 2013


John Arbash Meinel writes:
> The issue appears to be a conflict between renaming a file into a
> directory, when both the file and the directory has been deleted in
> the target branch.

[...]

Thank you for tracking down the exact reason.

As you've probably guessed, the 'to-emacs' branch contains everything
that should go into Emacs. It was generated from 'trunk' by deleting
everything which should not land there. Of course, the 'obsolete'
directory is among those; also, things that get moved to 'obsolete' in
'trunk' are practically always already deleted in 'to-emacs', so this
situation happens pretty regularly.

> If the file isn't deleted, but the directory is, bzr will see a
> conflict with a deleted directory and a rename, and restore the
> directory and apply the rename.

[...]

> If you delete the file but not the directory, you get a path conflict:

Yes, most conflicts I get during merges in 'to-emacs' are those two
classes. I have a small shell script which takes care of them (by simply
doing 'bzr resolve --take-this'), so I don't have to do that one by one.

> The other reason that you are encountering this, is because you are
> probably ending up with a very old BASE tree. This is likely because
> you are using to-emacs as an integration branch (merging feature
> branches), while also merging the other integration branch (trunk).

Yes, exactly. There's also a 'from-emacs' branch to which I apply
patches from changes which happened in Emacs proper. This branch gets
merged into 'trunk' as well as into 'to-emacs'. The reason is that when
I merge 'trunk' into 'to-emacs', this commit should generate a diff
which does *not* contain the changes which come from Emacs in the first
place.

> If you both merge multiple branches, and then you merge trunk, we
> can't select any of the revisions as dominant over the multiple
> feature branches (for example, if there were conflicts, each of you
> could have resolved them in opposite ways).

I realize this is hairy. I guess this is also why I get 'criss-cross
merge' warnings during merge. However, it's usually working pretty well.

> As for a fix for this... well a workaround would be to:
>
> cd to-emacs
> # Restore the obsolete directory to existence
> bzr revert -r -1:../trunk obsolete
> # Merge the actual trunk
> bzr merge ../trunk --force [--weave]

Thank you! This works.

> # Deal with the 100 or so conflicts

After running my script, there are actually only 5 remaining. :-)

> Is there a bug number for this?

I guess this is the same issue:

https://bugs.launchpad.net/bzr/+bug/1179527

Thanks again,
David




More information about the bazaar mailing list