"bzr: ERROR: exceptions.AssertionError: second push failed to complete a fetch set" during checkout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned |
Bug Description
There is quite a lot of background information on this error, so please bear with me.
My company use Subversion for version control. For the past month or so I have been using bzr and bzr-svn to interact with the svn repository and I have several Bazaar branches on my machine. I now need to let another developer work on one of my branches, so I have been setting up a Bazaar repository on a server and pushing my branch there.
On my laptop (OS X 10.5.8, Bazaar 2.0.2 and bzr-svn 1.0.1 from Macports + various other plugins) I have the following branches inside a shared repository:
asset-bank-trunk: A bzr checkout of the trunk of the svn repository
asset-bank-
asset-bank-
asset-bank-release: another branch of asset-bank-trunk
I installed bazaar 2.0.2 on one of our servers (ringmer, Debian Lenny) by compiling and installing Debian source packages from testing (I wanted to use a newer version than the one available in Lenny). I created a repository using something like the following (these commands are from memory, not copy/pasted):
cd /home/bzr/repos
bzr init-repo asset-bank --2a --no-trees
cd asset-bank
bzr co svn+ssh:
mkdir branches
bzr branch trunk branches/
I decided to rename the checkout of the svn trunk from trunk to svn-trunk so that if we migrate from svn to bzr we can create another bzr branch called "trunk" to use as the master branch:
mv trunk svn-trunk
# edited parent-location in branches/
I then pushed the changes on my laptop to the server and then got a new checkout and made some commits:
cd asset-bank-
bzr push bzr+ssh:
cd ..
bzr co bzr+ssh:
cd attval-perfenh
# do some coding
bzr ci
Everything seemed to work fine up to this point. I then decided to do a checkout in a Windows VM to check that it worked because the developer I'll be working with uses Windows. I used TortoiseBzr installed using the Bazaar 2.0.2 installer for this:
1) Used TortoiseBzr to create a new shared repository
2) Tried to check out the attval-perfenh branch from the server. This failed with the following error:
Connected (version 2.0, client OpenSSH_5.1p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "C:/Program Files/Developme
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\fetch.pyo", line 81, in __init__
File "bzrlib\fetch.pyo", line 107, in __fetch
File "bzrlib\fetch.pyo", line 148, in _fetch_
AssertionError: second push failed to complete a fetch set([('
bzr 2.0.2 on python 2.5.4 (Windows-
arguments: ['C:\\Program Files\\
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Developme
explorer C:\Program Files\Developme
launchpad C:\Program Files\Developme
netrc_
qbzr C:\Program Files\Developme
rebase C:\Program Files\Developme
svn C:\Program Files\Developme
upload C:\Program Files\Developme
xmloutput C:\Program Files\Developme
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
I have had a look at some of the revids in the error message on my laptop and they seem to be in the other branches on my laptop. For example:
francis@spaceman attval-perfenh $ bzr log -rrevid:<email address hidden>
-------
revno: 3522.1.3
committer: Francis Devereux <email address hidden>
branch nick: asset-bank-release
timestamp: Wed 2009-10-21 12:18:25 +0100
message:
Renamed project-
I thought that perhaps if I created some more branches in the shared repository on the server and pushed the branches from my laptop into them that might resolve the problem, but it didn't (although the revids in the error message changed)
# laptop (after creating branches on server)
cd asset-bank-release/
bzr push bzr+ssh:
cd ../asset-
bzr push bzr+ssh:
cd ../asset-
bzr push bzr+ssh:
After this I deleted the shared repository and failed checkout in the Windows XP VM and tried the checkout again. Here is the error message I got this time:
Connected (version 2.0, client OpenSSH_5.1p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "C:/Program Files/Developme
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\fetch.pyo", line 81, in __init__
File "bzrlib\fetch.pyo", line 107, in __fetch
File "bzrlib\fetch.pyo", line 148, in _fetch_
AssertionError: second push failed to complete a fetch set([('
bzr 2.0.2 on python 2.5.4 (Windows-
arguments: ['C:\\Program Files\\
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Developme
explorer C:\Program Files\Developme
launchpad C:\Program Files\Developme
netrc_
qbzr C:\Program Files\Developme
rebase C:\Program Files\Developme
svn C:\Program Files\Developme
upload C:\Program Files\Developme
xmloutput C:\Program Files\Developme
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
tags: | added: fetch |
tags: | added: check-for-breezy |
tags: |
added: data-integrity removed: check-for-breezy |
I have worked around the problem by manually copying the missing revisions to the server using the script below. I think that it is a bug that they weren't copied automatically when I did "bzr push bzr+ssh: //ringmer. <our-domain> /home/bzr/ repos/asset- bank/branches/ attval- perfenh" though.
#!/opt/ local/Library/ Frameworks/ Python. framework/ Versions/ 2.6/Resources/ Python. app/Contents/ MacOS/Python
from bzrlib.repository import Repository
REVIDS=['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>']
remote_repo = Repository. open('bzr+ ssh://ringmer. <our-domain> /home/bzr/ repos/asset- bank') open('/ Users/francis/ Code/Bright/ asset-bank' )
local_repo = Repository.
for revid in REVIDS: repo.fetch( local_repo, revision_id=revid)
remote_
print "done"