~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_dirstate.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:18:09 UTC
  • mfrom: (6459 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201191809-xn340a5i5v4fqsfu
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    workingtree_4,
33
33
    )
34
34
from bzrlib.transport import memory
35
 
from bzrlib.tests import test_osutils
 
35
from bzrlib.tests import (
 
36
    features,
 
37
    test_osutils,
 
38
    )
36
39
from bzrlib.tests.scenarios import load_tests_apply_scenarios
37
40
 
38
41
 
1209
1212
        # The most trivial addition of a symlink when there are no parents and
1210
1213
        # its in the root and all data about the file is supplied
1211
1214
        # bzr doesn't support fake symlinks on windows, yet.
1212
 
        self.requireFeature(tests.SymlinkFeature)
 
1215
        self.requireFeature(features.SymlinkFeature)
1213
1216
        os.symlink(target, link_name)
1214
1217
        stat = os.lstat(link_name)
1215
1218
        expected_entries = [
1240
1243
        self._test_add_symlink_to_root_no_parents_all_data('a link', 'target')
1241
1244
 
1242
1245
    def test_add_symlink_unicode_to_root_no_parents_all_data(self):
1243
 
        self.requireFeature(tests.UnicodeFilenameFeature)
 
1246
        self.requireFeature(features.UnicodeFilenameFeature)
1244
1247
        self._test_add_symlink_to_root_no_parents_all_data(
1245
1248
            u'\N{Euro Sign}link', u'targ\N{Euro Sign}et')
1246
1249
 
2207
2210
class TestDirstateTreeReference(TestCaseWithDirState):
2208
2211
 
2209
2212
    def test_reference_revision_is_none(self):
2210
 
        tree = self.make_branch_and_tree('tree', format='dirstate-with-subtree')
 
2213
        tree = self.make_branch_and_tree('tree', format='development-subtree')
2211
2214
        subtree = self.make_branch_and_tree('tree/subtree',
2212
 
                            format='dirstate-with-subtree')
 
2215
                            format='development-subtree')
2213
2216
        subtree.set_root_id('subtree')
2214
2217
        tree.add_reference(subtree)
2215
2218
        tree.add('subtree')
2526
2529
        state = self.create_empty_dirstate()
2527
2530
        state.set_state_from_scratch(active_tree.inventory,
2528
2531
            [('basis', basis_tree)], [])
2529
 
        delta = target_tree.inventory._make_delta(basis_tree.inventory)
 
2532
        delta = target_tree.inventory._make_delta(
 
2533
            basis_tree.inventory)
2530
2534
        state.update_basis_by_delta(delta, 'target')
2531
2535
        state._validate()
2532
2536
        dirstate_tree = workingtree_4.DirStateRevisionTree(state,