~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_join.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-12-02 14:58:47 UTC
  • mfrom: (5554.1.3 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101202145847-fw822sd3nyhvrwmi
(vila) Merge 2.2 into trunk including fix for bug #583667 and bug
        #681885 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import os
19
19
 
20
20
from bzrlib import (
 
21
    bzrdir,
21
22
    osutils,
 
23
    repository,
22
24
    tests,
23
25
    workingtree,
24
26
    )
28
30
 
29
31
    def make_trees(self):
30
32
        base_tree = self.make_branch_and_tree('tree',
31
 
            format='development-subtree')
 
33
            format='dirstate-with-subtree')
32
34
        base_tree.commit('empty commit')
33
35
        self.build_tree(['tree/subtree/', 'tree/subtree/file1'])
34
36
        sub_tree = self.make_branch_and_tree('tree/subtree')
72
74
        sub_tree.lock_read()
73
75
        self.addCleanup(sub_tree.unlock)
74
76
        self.assertEqual('file1-id', sub_tree.path2id('file1'))
75
 
        self.assertTrue(sub_tree.has_id('file1-id'))
 
77
        self.assertTrue('file1-id' in sub_tree)
76
78
        self.assertEqual('subtree-root-id', sub_tree.path2id(''))
77
79
        self.assertEqual('', sub_tree.id2path('subtree-root-id'))
78
80
        self.assertIs(None, base_tree.path2id('subtree/file1'))
79
81
        base_tree.lock_read()
80
82
        self.addCleanup(base_tree.unlock)
81
 
        self.assertFalse(base_tree.has_id('file1-id'))
 
83
        self.assertTrue('file1-id' not in base_tree)
82
84
        self.assertEqual('subtree-root-id', base_tree.path2id('subtree'))
83
85
        self.assertEqual('subtree', base_tree.id2path('subtree-root-id'))
84
86
 
93
95
                                retcode=3)
94
96
        self.assertContainsRe(err, r"Can't join trees")
95
97
        self.assertContainsRe(err, r"use bzr upgrade")
 
98
 
 
99