~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_fileid_involved.py

  • Committer: Martin Pool
  • Date: 2006-01-30 06:23:50 UTC
  • mfrom: (1534.1.17 integration)
  • Revision ID: mbp@sourcefrog.net-20060130062350-d6f25277ddcdfd79
[merge] robert's integration of much recent work

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
 
from bzrlib.tests import TestCaseInTempDir
18
17
import os
19
 
from bzrlib.commit import commit
 
18
 
20
19
from bzrlib.add import smart_add
21
20
from bzrlib.branch import Branch
22
 
from bzrlib.clone import copy_branch
23
 
from bzrlib.merge import merge
 
21
from bzrlib.builtins import merge
 
22
from bzrlib.commit import commit
 
23
from bzrlib.delta import compare_trees
 
24
from bzrlib.tests import TestCaseInTempDir
24
25
from bzrlib.workingtree import WorkingTree
25
 
from bzrlib.delta import compare_trees
26
26
 
27
27
 
28
28
class TestFileIdInvolved(TestCaseInTempDir):
33
33
        f.close( )
34
34
 
35
35
    def merge( self, branch_from, force=False ):
36
 
        from bzrlib.merge_core import ApplyMerge3
 
36
        from bzrlib._merge_core import ApplyMerge3
37
37
 
38
38
        merge([branch_from,-1],[None,None], merge_type=ApplyMerge3,
39
39
            check_clean=(not force) )
63
63
        del b, wt
64
64
        #-------- end A -----------
65
65
 
66
 
        copy_branch(main_branch,"../branch1")
 
66
        main_branch.clone("../branch1")
67
67
        os.chdir("../branch1")
68
68
 
69
69
        #branch1_branch = Branch.open(".")
79
79
 
80
80
        #-------- end B -----------
81
81
 
82
 
        copy_branch(Branch.open("."),"../branch2")
 
82
        Branch.open(".").clone("../branch2")
83
83
        os.chdir("../branch2")
84
84
 
85
85
        branch2_branch = Branch.open(".")
184
184
                l1 = self.branch.fileid_involved_between_revs(
185
185
                    history[start], history[end])
186
186
 
187
 
                old_tree = self.branch.revision_tree(history[start])
188
 
                new_tree = self.branch.revision_tree(history[end])
 
187
                old_tree = self.branch.repository.revision_tree(history[start])
 
188
                new_tree = self.branch.repository.revision_tree(history[end])
189
189
                delta = compare_trees(old_tree, new_tree )
190
190
 
191
191
                l2 = [ id for path, id, kind in delta.added ] + \