bzr checkout doesn't work with rich-root-pack

Bug #205579 reported by Jacek Sieka
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Unassigned

Bug Description

I'm trying to checkout a remote repository with bzr 1.3. The remote repository was created using svn-import and thus uses rich-root-pack. Doing bzr checkout gives the following error:

bzr: ERROR: Repository KnitPackRepository('file:///home/arnetheduck/src/xxx/.bzr/repository/') is not compatible with repository RemoteRepository(bzr+ssh://<email address hidden>/%7Edcplusplus-team/dcplusplus/trunk/.bzr/)

bzr branch and then bzr reconfigure --checkout works and creates a usable local checkout...

Revision history for this message
Colin Watson (cjwatson) wrote :

Confirmed with bzr+ssh://bazaar.launchpad.net/~ubuntu-core-dev/grub/ubuntu as well. (Thanks for the workaround!)

Changed in bzr:
status: New → Confirmed
Changed in bzr:
importance: Undecided → High
Revision history for this message
John A Meinel (jameinel) wrote :

I also was able to duplicate this with a simple "bzr serve" and "bzr checkout bzr://localhost/".

This is actually related to bug #103195. What I'm seeing is that "bzr co" tries to figure out the target format using bzrdir.cloning_metadir(). Which then inspects a couple of the objects to be compatible. However there is this code:

else:
    # XXX TODO: This isinstance is here because we have not implemented
    # the fix recommended in bug # 103195 - to delegate this choice the
    # repository itself.
    repo_format = source_repository._format
    if not isinstance(repo_format, remote.RemoteRepositoryFormat):
        result_format.repository_format = repo_format

Which means that for the 'bzr://' protocol, the target format is always initialized with the default repository format.

Another workaround for this is to create a target repository ahead of time.

bzr init-repo --rich-root-pack repo
cd repo
bzr co bzr+ssh://branch/which/is/in/non/default/format

Should work.

Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

This also happens when using bzr+http transport. Another possible workaround (besides creating a branch and then binding to produce a checkout) is to do:

bzr co bzr+http://myrepo branch_name
cd branch_name
bzr upgrade --rich-root-pack
bzr checkout
bzr update

Although this is a bit more verbose than the alternative (bzr branch ...) and leaves a bzr.backup directory around (from the upgrade process), it also works (I prefer the first approach though, it is simpler)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

this is working now

Changed in bzr:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.