auto-stack logic selects wrong repo format

Bug #375019 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

If your 'branch' format does not support stacking, we select a new format that does. However, this ignores the existing repository format (which may already support stacking).

Consider this case:

$ bzr init-repo --1.9 --tree source
Shared repository with trees (format: 1.14 or 1.9)
Location:
  shared repository: source

$ bzr init --pack-0.92 source/old_branch
Created a repository tree (format: unnamed)
Using shared repository: C:/Users/jameinel/dev/,tmp/source/

$ bzr commit --unchanged -m 'first rev' source/old_branch
Committing to: C:/Users/jameinel/dev/,tmp/source/old_branch/
Committed revision 1.

$ bzr branch --stacked source/old_branch new_branch
Source format does not support stacking, using format: '1.6'
  Packs 5 (adds stacking support, requires bzr 1.6)

Created new stacked branch referring to file:///.../source/old_branch/.

$ bzr info new_branch/
Standalone tree (format: 1.6)
Location:
  branch root: new_branch

Related branches:
  parent branch: source/old_branch
     stacked on: source/old_branch

So it upgraded the branch format from 'pack-0.92' (Branch6) to '1.6' (Branch7), but it *downgraded* the repository format from '1.9' to '1.6'.

This is confusing, although not broken, for current formats. I encountered it when implementing stacking for dev6 formats. Where it turns out to downgrade from --development6-rich-root to --1.6-rich-root, which goes across a serialization format boundary, and thus falls over.

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

Note that the way *I* encountered this was:

bzr init-repo --$FORMAT test-repo
bzr branch $OLD_PLUGIN test-repo/b
bzr branch --stacked test-repo/b test-branch

I happened to be using --development6-rich-root, but you would get the same behavior from --1.9 (where the final branch was --1.6 format)

Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: formats stacking
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.