branch --stacked from bzr+ssh to standalone fails with wrong target format

Bug #270397 reported by David I
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Andrew Bennetts

Bug Description

Failure with bzr 1.7rc1 and bzr.dev (as at 15th Sept 2008):

bzr branch --stacked bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Toto_1.0 CVT_t1.0
Source format does not support stacking, using format: '1.6'
  Packs 5 (adds stacking support, requires bzr 1.6)

bzr: ERROR: The branch 'file:///volumes0/david/temp/CVT_t1.0/'(Bazaar Branch Format 6 (bzr 0.15)) is not a stackable format. You will need to upgrade the branch to permit branch stacking.

This works fine with 1.6.1rc1.

## the source branch is like this as seen by the client machine:

$ /data/users/david.ingamells/bazaar/bzr.dev/bzr info -v bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Toto_1.0
Repository branch (format: unnamed)
Location:
  shared repository: bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/
  repository branch: bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Toto_1.0/

Related branches:
  parent branch: bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Racoon_1.0/

Format:
       control: bzr remote bzrdir
        branch: Remote BZR Branch
    repository: bzr remote repository

Branch history:
      3705 revisions
        22 committers
       236 days old
   first revision: Tue 2008-01-22 07:39:26 +0100
  latest revision: Fri 2008-09-12 16:38:16 +0200

Repository:
      7208 revisions

## and like this when seen locally

$ /home/CmsRoot/repos/CVTOOL/Toto_1.0$ bzr info -v
Repository branch (format: pack-0.92)
Location:
  shared repository: /home/CmsRoot/repos/CVTOOL
  repository branch: .

Related branches:
  parent branch: /home/CmsRoot/repos/CVTOOL/Racoon_1.0

Format:
       control: Meta directory format 1
        branch: Branch format 6
    repository: Packs containing knits without subtree support

Branch history:
      3705 revisions
        22 committers
       236 days old
   first revision: Tue 2008-01-22 07:39:26 +0100
  latest revision: Fri 2008-09-12 16:38:16 +0200

Repository:
      7208 revisions

## just to prove that I'm not positioned in a shared repos:

$ bzr info
bzr: ERROR: Not a branch: "/volumes0/david/temp/".
$ ls -a
. ..

## Call bzr to create a stacked branch:

$ /data/users/david.ingamells/bazaar/bzr.dev/bzr branch --stacked bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Toto_1.0 CVT_t1.0
Source format does not support stacking, using format: '1.6'
  Packs 5 (adds stacking support, requires bzr 1.6)

bzr: ERROR: The branch 'file:///volumes0/david/temp/CVT_t1.0/'(Bazaar Branch Format 6 (bzr 0.15)) is not a stackable format. You will need to upgrade the branch to permit branch stacking.

## There is now a partially made target branch:

$ bzr info -v CVT_t1.0
Standalone branch (format: unnamed)
Location:
  branch root: .

Related branches:
  parent branch: bzr+ssh://mscvs01/home/CmsRoot/repos/CVTOOL/Toto_1.0/

Format:
       control: Meta directory format 1
        branch: Branch format 6
    repository: Packs 5 (adds stacking support, requires bzr 1.6)

Branch history:
         0 revisions
         0 committers

Repository:
         0 revisions

Tags: hpss stack
Andrew Bennetts (spiv)
Changed in bzr:
status: New → Confirmed
Revision history for this message
Andrew Bennetts (spiv) wrote :

The problem seems to be that RemoteBranch.sprout didn't get the same update as Branch.sprout to rely on the to_bzrdir for the branch_format. I have a probable fix that I'm testing now.

In the meantime, using sftp:// instead of bzr+ssh:// URLs for the source branch should workaround the problem.

Changed in bzr:
assignee: nobody → spiv
status: Confirmed → In Progress
importance: Undecided → High
milestone: none → 1.9rc1
Revision history for this message
pdf23ds (pdf23ds) wrote :

I see the same problem using file://, trying to branch --shared from a shared repository branch to a non-shared path. (Why would I want to do this? Well, I have a C:\bzr directory for all my repos and branches, none of which have any trees. I have a C:\Source directory for all the actual trees. This way inter-project dependencies don't have to have branch names in the path references, and I don't always have to deal with extra layers of directories while still having the advantages of branches.)

Revision history for this message
Andrew Bennetts (spiv) wrote :

pdf23ds,

That sounds like a different bug. David's bug report as far as I can tell is caused by a bug in smart server/client code. So you should probably file a new report with more detail about that.

Also, that sounds like a better use-case for "bzr checkout --lightweight" than for "bzr branch --stacked" (see e.g. <http://doc.bazaar-vcs.org/latest/en/user-guide/index.html#getting-a-lightweight-checkout>).

Revision history for this message
Andrew Bennetts (spiv) wrote :
Changed in bzr:
status: In Progress → Fix Committed
Revision history for this message
Andrew Bennetts (spiv) wrote :

Fix landed in bzr.dev r3808.

Changed in bzr:
status: Fix Committed → Fix Released
Revision history for this message
David I (david-ingamells) wrote : Re: [Bug 270397] Re: branch --stacked from bzr+ssh to standalone fails with wrong target format

Thanks Andrew. From the discussion it looks like this isn't the end of
the story, but your update will let me get up-to date.

I'll wait for the 1.9rc1 release, which is due tomorrow some time and
let you know how I get on ... (probably Monday as the release will
likely come too late for me to do anything tomorrow).

Andrew Bennetts wrote:
> Fix landed in bzr.dev r3808.
>
> ** Changed in: bzr
> Status: Fix Committed => 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.