~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

first cut at merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
import time
19
19
 
 
20
from bzrlib.builtins import merge
20
21
from bzrlib.branch import Branch
21
22
from bzrlib.tests import TestCaseWithTransport
22
23
from bzrlib.errors import NoCommonAncestor, NoCommits
23
24
from bzrlib.errors import NoSuchRevision
24
 
from bzrlib.clone import copy_branch
25
 
from bzrlib.merge import merge
26
25
from bzrlib.revisionspec import RevisionSpec
27
26
from bzrlib.workingtree import WorkingTree
28
27
 
72
71
        self.assertRaises(NoCommits, RevisionSpec('ancestor:.').in_history, b2)
73
72
 
74
73
        os.mkdir('copy')
75
 
        b3 = copy_branch(b, 'copy')
 
74
        b3 = b.clone('copy')
76
75
        wt3 = WorkingTree('copy', b3)
77
76
        wt3.commit('Commit four', rev_id='b@r-0-4')
78
77
        self.assertEquals(RevisionSpec('ancestor:.').in_history(b3).rev_id,
95
94
        branch = wt.branch
96
95
        wt.add(['file'])
97
96
        wt.commit('add file')
98
 
        copy_branch(branch, 'branch2')
 
97
        branch.clone('branch2')
99
98
        print >> open('branch2/file', 'w'), 'new content'
100
99
        branch2 = Branch.open('branch2')
101
100
        WorkingTree('branch2', branch2).commit('update file', rev_id='A')