Comment 11 for bug 701940

Revision history for this message
John A Meinel (jameinel) wrote :

I can do this manually and it works. Based on the test case that Andrew proposed. The basic script is:

1) Create a repository with a few commits in it.
 bzr init foo
 cd foo
 echo bar > bar
 bzr add; bzr commit -m "bar"
 bzr commit --unchanged -m "two"
 bzr commit --unchanged -m "three"

2) At this point, I have to invoke bzrlib in order to get the right coherency. Basically, repo1 must want to repack, but have already cached its list of what pack files are available. And at the same moment, repo2 repacks.

 python -c "from bzrlib import branch; b = branch.Branch.open('.')
b.lock_write()
b.revision_history() # force the repository to read what pack files are available
repo2 = b.bzrdir.open_repository() # re-open with another repository
repo2.pack()
b.repository.pack()
b.unlock()
"

With bzr-2.2.2 this fails with a traceback. With bzr-2.2.3 this succeeds.

Note that I tested this only with the bzr branches, and not with the official packages installed. I'm currently running bzr-2.3.1 on Maverick, and I don't really know how to revert to the appropriate revisions. But at least this is a script for reproducing the failure.