bzr merge fails: bzr: ERROR: No final name for trans_id 'new-1'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Vincent Ladeuil | ||
Launchpad itself |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
We are cherry-pick merging into a repository from another repoistory with no common base.
The merge succeeds, but on the resulting repository we see bzr failing on some (but not all) subsequent merges from the unrelated repository:
$ bzr merge ../test-
+N mysql-test/
+N mysql-test/
M storage/
Contents conflict in mysql-test/
Contents conflict in mysql-test/
/usr/
% (task, self._task_
/usr/
% (task, self._task_
bzr: ERROR: No final name for trans_id 'new-1'
file-id: None
root trans-id: 'new-0'
$ bzr --version
Bazaar (bzr) 1.14.1
Python interpreter: /usr/bin/python 2.5.2
Python standard library: /usr/lib/python2.5
bzrlib: /usr/lib/
Bazaar configuration: /home/knielsen/
Bazaar log file: /home/knielsen/
This may be related to bug 364305.
The involved repositories are public on Launchpad, and the following steps can be used to reproduce:
bzr branch 'lp:~knielsen/maria/mariadb-5.1-pbxt-merge-take2'
bzr branch '-rrevid:<email address hidden>' lp:pbxt merge-source
cd mariadb-
bzr co
bzr merge ../merge-source
Interestingly, another merge from lp:pbxt that includes more of the history does not fail:
bzr branch 'lp:~knielsen/maria/mariadb-5.1-pbxt-merge-take2'
bzr branch '-rrevid:<email address hidden>' lp:pbxt merge-source
cd mariadb-
bzr co
bzr merge ../merge-source
(the conflicts are expected).
In case the problem is with the original merge, here are the steps that produced the branch 'lp:~knielsen/maria/mariadb-5.1-pbxt-merge-take2':
mkdir pbxt-new-
cd pbxt-new-
bzr branch -r'revid:<email address hidden>' lp:pbxt pbxt-rename
cd pbxt-rename/
bzr co
bzr mkdir pbxt-to-be-renamed
bzr rm aclocal.m4 config config.h.in configure configure-dzl.in configure.in COPYING Makefile-dzl.am Makefile.in plug-dzl.in bin src/Makefile-dzl.am src/Makefile.in
(cd test/mysql-test/t && bzr rm --force <lots of files>)
(cd test/mysql-test/r && bzr rm --force <lots of files>)
bzr mv test/mysql-test/t pbxt-to-be-renamed/
bzr mv test/mysql-test/r pbxt-to-be-renamed/
bzr rm test
bzr mv AUTHORS INSTALL NEWS plug.in src ChangeLog Makefile.am README TODO pbxt-to-be-renamed/
bzr commit -m$'Prepare for merging PBXT into MariaDB tree:\n - Delete not needed files.\n - Move needed files into subdirectory to avoid conflicts.'
cd ..
bzr branch -r'revid:<email address hidden>' lp:maria mariadb-pbxt-merge
cd mariadb-pbxt-merge/
bzr co
bzr rm storage/pbxt mysql-test/
bzr commit -m"Delete old PBXT files in preparation for re-merging PBXT with proper history and merge tracking."
bzr merge ../pbxt-rename -r0..-1
bzr ci -m"Re-merge PBXT with proper history and merge tracking, into temporary directory for later renaming into place."
bzr mv pbxt-to-
bzr mkdir storage/pbxt/
bzr mv pbxt-to-
bzr rm pbxt-to-be-renamed/
bzr ci -m"Re-merge PBXT into MariaDB with proper history and merge tracking: move files into correct place."
patch -p0 -s < /tmp/1
(cd mysql-test/
(cd mysql-test/
bzr ci -m"After-merge fixes for re-merge of PBXT into MariaDB with proper history and merge tracking."
(I can supply the exact list of <lots of files> and exact patches /tmp/{1,2,3} on request).
The intention here is to merge a sub-project (pbxt) into a main project (mariadb) in a way that preserves history and allows to use bzr merge tracking to allow future merges of pbxt changes. It may be that this is unsupported abuse of bzr, but in that case the original merge attempt should fail rather than leave a broken merge (and possibly a corrupt repository?).
Related branches
- John A Meinel: Needs Fixing
- bzr-core: Pending requested
-
Diff: 206 lines (+138/-17)3 files modifiedNEWS (+3/-0)
bzrlib/merge.py (+29/-12)
bzrlib/tests/per_workingtree/test_merge_from_branch.py (+106/-5)
tags: | added: affects-montyprogram treetransform |
Changed in bzr: | |
status: | Triaged → Confirmed |
importance: | Medium → High |
Changed in bzr: | |
assignee: | nobody → Vincent Ladeuil (vila) |
status: | Confirmed → In Progress |
Changed in bzr: | |
status: | In Progress → Fix Released |
Changed in launchpad: | |
status: | New → Fix Released |
So I would recommend doing the merge using the merge-into command provided by lp:bzr-merge-into, here are the steps that I did:
<email address hidden>' suite/pbxt/ {r,t} pbxt/test/ mysql-test/ t mysql-test/ suite/pbxt/ t pbxt/test/ mysql-test/ r mysql-test/ suite/pbxt/ r
<email address hidden>'
bzr branch lp:maria -r revid:$MYSQL_REV maria_base
bzr branch lp:pbxt -r revid:$PBXT_REV pbxt_base
cd maria_base
bzr co
bzr rm storage/pbxt mysql/test/
bzr commit -m "Remove pbxt in preparation for bring in upstream"
bzr merge-into ../pbxt_base storage/pbxt
bzr mv storage/
bzr mv storage/
bzr commit -m "Merged pbxt upstream into storage/pbxt and mysql-test/ suite/pbxt/ {t,r}"
At this point, applying any patches, etc, is up to you.
And doing "bzr merge lp:pbxt" should mostly 'just work'.
If it doesn't, that is definitely a bug.
Also, since you never manually edited any structures, but only ran things via the 'bzr' client, there is obviously a real bug laying around. We shouldn't let you get into a situation where we will crash. If it is a data integrity problem, then we shouldn't have let you generate that.
Now, the fact that you are also *cherrypicking* may be an issue, I'm not really sure.