~lifeless/ubuntu/lucid/bzr/2.1.2-sru

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-06-27 15:23:34 UTC
  • mfrom: (1.3.1 upstream) (3.1.78 karmic)
  • Revision ID: james.westby@ubuntu.com-20090627152334-u3smexjpaolh96qd
* New upstream release.
* Bump standards version to 3.8.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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'))