~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_switch.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-13 23:06:42 UTC
  • mfrom: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100113230642-gr0vg8u3qyzz3p2b
Merge bzr.stable, bringing in bug fixes #175839, #504390

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
100
100
        self.assertContainsRe(str(err),
101
101
            "Pending merges must be committed or reverted before using switch")
102
102
 
 
103
    def test_switch_changing_root_id(self):
 
104
        tree = self._setup_tree()
 
105
        tree2 = self.make_branch_and_tree('tree-2')
 
106
        tree2.set_root_id('custom-root-id')
 
107
        self.build_tree(['tree-2/file-2'])
 
108
        tree2.add(['file-2'])
 
109
        tree2.commit('rev1b')
 
110
        checkout = tree.branch.create_checkout('checkout',
 
111
            lightweight=self.lightweight)
 
112
        switch.switch(checkout.bzrdir, tree2.branch)
 
113
        self.assertEqual('custom-root-id', tree2.get_root_id())
 
114
 
103
115
 
104
116
class TestSwitchHeavyweight(TestSwitch):
105
117