"bzr checkout" doesn't honor original branch format

Bug #93854 reported by Gustavo Niemeyer
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
John A Meinel

Bug Description

[niemeyer@burma ~/a]% bzr init --format=dirstate-tags
[niemeyer@burma ~/a]% bzr commit --unchanged -m="Nothing."
Committed revision 1.
[niemeyer@burma ~/a]% cd ..
[niemeyer@burma ~]% bzr checkout a b
[niemeyer@burma ~]% cd b
[niemeyer@burma ~/b]% bzr tags
bzr: ERROR: Tags not supported by BzrBranch5('file:///home/niemeyer/b/'); you may be able to use bzr upgrade.

Tags: trivial
Revision history for this message
Christopher Armstrong (radix) wrote :

Even worse: If a tag actually exists in the branch you are checking out from, checkout fails immediately.

radix@haruko ~/test% mkdir a
radix@haruko ~/test% cd a
radix@haruko ~/test/a% bzr init --format=dirstate-tags
radix@haruko ~/test/a% bzr commit -m 'unchanged' --unchanged
Committed revision 1.
radix@haruko ~/test/a% cd ..
radix@haruko ~/test% bzr checkout a c
radix@haruko ~/test% rm -rf c
radix@haruko ~/test% cd a
radix@haruko ~/test/a% bzr tag what
Created tag what.
radix@haruko ~/test/a% cd ..
radix@haruko ~/test% bzr checkout a c
bzr: ERROR: Tags not supported by BzrBranch5('file:///home/radix/test/c/'); you may be able to use bzr upgrade.

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

This seems to fix it:

=== modified file 'bzrlib/branch.py'
--- bzrlib/branch.py 2007-03-13 01:00:34 +0000
+++ bzrlib/branch.py 2007-03-19 21:15:09 +0000
@@ -690,7 +690,7 @@
             format.repository_format = weaverepo.RepositoryFormat7()
         else:
             format = self.repository.bzrdir.checkout_metadir()
- format.branch_format = self._format
+ format._branch_format = self._format
         return format

     def create_checkout(self, to_location, revision_id=None,

But we really need a test that Branch.create_checkout() generates a checkout in the right format.

This should probably be a branch_implementations test.

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

Fixed in bzr-0.15rc3

Changed in bzr:
assignee: nobody → jameinel
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

Remote bug watches

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