~abentley/bzr/status

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Aaron Bentley
  • Date: 2009-05-05 18:16:33 UTC
  • mfrom: (1731.1744.1078 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1931.
  • Revision ID: aaron@aaronbentley.com-20090505181633-3qtq1skwjzed0kug
Merge bzr.dev into composite-tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from bzrlib import (
18
18
    branch as _mod_branch,
 
19
    bzrdir,
19
20
    errors,
20
21
    reconfigure,
21
22
    repository,
417
418
            reconfigure.Reconfigure.set_repository_trees, tree.bzrdir, None)
418
419
        self.assertContainsRe(str(e),
419
420
            r"Requested reconfiguration of '.*' is not supported.")
 
421
 
 
422
    def test_lightweight_checkout_to_tree_preserves_reference_locations(self):
 
423
        format = bzrdir.format_registry.make_bzrdir('1.9')
 
424
        format.set_branch_format(_mod_branch.BzrBranchFormat8())
 
425
        tree = self.make_branch_and_tree('tree', format=format)
 
426
        tree.branch.set_reference_info('file_id', 'path', '../location')
 
427
        checkout = tree.branch.create_checkout('checkout', lightweight=True)
 
428
        reconfiguration = reconfigure.Reconfigure.to_tree(checkout.bzrdir)
 
429
        reconfiguration.apply()
 
430
        checkout_branch = checkout.bzrdir.open_branch()
 
431
        self.assertEqual(('path', '../location'),
 
432
                         checkout_branch.get_reference_info('file_id'))