~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-10 23:25:35 UTC
  • mfrom: (1551.10.31 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070310232535-dd964b3ad4a93236
Fix WorkingTree4._iter_changes with pending merges and deleted files

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Tests for the WorkingTree.merge_from_branch api."""
19
19
 
 
20
import os
 
21
 
20
22
from bzrlib.tests.workingtree_implementations import TestCaseWithWorkingTree
21
23
 
22
24
 
49
51
            to_revision=self.second_rev)
50
52
        self.assertEqual([self.to_second_rev, self.second_rev],
51
53
            self.tree_to.get_parent_ids())
 
54
 
 
55
    def test_compare_after_merge(self):
 
56
        tree_a = self.make_branch_and_tree('tree_a')
 
57
        self.build_tree_contents([('tree_a/file', 'text-a')])
 
58
        tree_a.add('file')
 
59
        tree_a.commit('added file')
 
60
        tree_b = tree_a.bzrdir.sprout('tree_b').open_workingtree()
 
61
        os.unlink('tree_a/file')
 
62
        tree_a.commit('deleted file')
 
63
        self.build_tree_contents([('tree_b/file', 'text-b')])
 
64
        tree_b.commit('changed file')
 
65
        tree_a.merge_from_branch(tree_b.branch)
 
66
        tree_a.lock_read()
 
67
        self.addCleanup(tree_a.unlock)
 
68
        list(tree_a._iter_changes(tree_a.basis_tree()))