/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_changes_from.py

Merge the change from Tree.compare to Tree.changes_from.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
"""Test Tree.compare() for WorkingTree specific scenarios."""
 
17
"""Test Tree.changes_from() for WorkingTree specific scenarios."""
18
18
 
19
19
from bzrlib import revision
20
20
from bzrlib.tests.workingtree_implementations import TestCaseWithWorkingTree
21
21
 
22
22
 
23
 
class TestCompareTrees(TestCaseWithWorkingTree):
 
23
class TestChangesFrom(TestCaseWithWorkingTree):
24
24
    
25
25
    def setUp(self):
26
 
        super(TestCompareTrees, self).setUp()
 
26
        super(TestChangesFrom, self).setUp()
27
27
        self.tree = self.make_branch_and_tree('tree')
28
28
        files = ['a', 'b/', 'b/c']
29
29
        self.build_tree(files, transport=self.tree.bzrdir.root_transport)
32
32
 
33
33
    def test_unknown(self):
34
34
        self.build_tree(['tree/unknown'])
35
 
        # Unknowns are not reported by compare_trees
36
 
        d = self.tree.compare(self.tree.basis_tree())
 
35
        # Unknowns are not reported by changes_from
 
36
        d = self.tree.changes_from(self.tree.basis_tree())
37
37
        self.assertEqual([], d.added)
38
38
        self.assertEqual([], d.removed)
39
39
        self.assertEqual([], d.renamed)
47
47
        # If a specific_files list is present, even if none of the
48
48
        # files are versioned, only paths that are present in the list
49
49
        # should be compared
50
 
        d = self.tree.compare(empty_tree, specific_files=['unknown'])
 
50
        d = self.tree.changes_from(empty_tree, specific_files=['unknown'])
51
51
        self.assertEqual([], d.added)
52
52
        self.assertEqual([], d.removed)
53
53
        self.assertEqual([], d.renamed)