Comment 0 for bug 513709

Revision history for this message
Dr Al (abudden) wrote :

From a user's point of view, a heavyweight checkout should operate like a lightweight checkout but with added benefits (faster operation over a network etc). Using a feature branch model with a light weight checkout, the parent branch of a new feature branch created by "switch -b" is the original feature branch. With a heavyweight checkout, the parent branch is incorrectly set as the checkout location.

For example:

###################
# SETUP (COMMON): #
###################

$ bzr init-repo --no-trees testproj
    Shared repository (format: 2a)
    Location:
      shared repository: testproj
$ bzr init testproj/trunk
    Created a repository branch (format: 2a)
    Using shared repository: C:/al/testing/testproj/

###############
# LIGHTWEIGHT: #
###############

$ bzr co --lightweight testproj/trunk/ trlco
$ cd trlco
$ bzr switch -b feature-branch-lw
    Tree is up to date at revision 0.
    Switched to branch: C:/al/testing/testproj/feature-branch-lw/
$ cd ..
$ bzr info testproj/feature-branch-lw/
    Repository branch (format: 2a)
    Location:
      shared repository: testproj
      repository branch: testproj/feature-branch2

    Related branches:
      parent branch: testproj/trunk

# This is correct: parent branch is trunk

################
# HEAVYWEIGHT: #
################

$ bzr co testproj/trunk/ trhco
$ cd trhco
$ bzr switch -b feature-branch-hw
    Tree is up to date at revision 0.
    Switched to branch: C:/al/testing/testproj/feature-branch-hw/
$ cd ..
$ bzr info testproj/feature-branch-hw/
    Repository branch (format: 2a)
    Location:
      shared repository: testproj
      repository branch: testproj/feature-branch2

    Related branches:
      parent branch: trhco

# This is incorrect: the parent branch should be testproj/trunk