~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    branch,
25
25
    bzrdir,
26
26
    config,
 
27
    controldir,
27
28
    errors,
28
29
    osutils,
29
30
    revision as _mod_revision,
342
343
        wt.set_last_revision('null:')
343
344
        wt.commit('A', allow_pointless=True, rev_id='A')
344
345
        self.assertEqual(['A'], wt.get_parent_ids())
345
 
        # None is aways in the branch
 
346
        # null: is aways in the branch
346
347
        wt.set_last_revision('null:')
347
348
        self.assertEqual([], wt.get_parent_ids())
348
349
        # and now we can set it to 'A'
349
350
        # because some formats mutate the branch to set it on the tree
350
351
        # we need to alter the branch to let this pass.
351
 
        try:
352
 
            self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
353
 
                wt.branch.set_revision_history, ['A', 'B'])
354
 
        except errors.NoSuchRevision, e:
355
 
            self.assertEqual('B', e.revision)
 
352
        if getattr(wt.branch, "_set_revision_history", None) is None:
356
353
            raise TestSkipped("Branch format does not permit arbitrary"
357
354
                              " history")
 
355
        wt.branch._set_revision_history(['A', 'B'])
358
356
        wt.set_last_revision('A')
359
357
        self.assertEqual(['A'], wt.get_parent_ids())
360
358
        self.assertRaises(errors.ReservedId, wt.set_last_revision, 'A:')
719
717
        tree.add(['bloo', 'blo'])
720
718
        tree.commit("blah", allow_pointless=False)
721
719
        base = tree.branch.repository.revision_tree(tree.last_revision())
722
 
        bzrdir.BzrDir.open("mine").sprout("other")
 
720
        controldir.ControlDir.open("mine").sprout("other")
723
721
        with file('other/bloo', 'wb') as f: f.write('two')
724
722
        othertree = WorkingTree.open('other')
725
723
        othertree.commit('blah', allow_pointless=False)