~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.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:
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 TestCaseInTempDir
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
 
28
27
class TestRevisionNamespaces(TestCaseInTempDir):
69
68
        self.assertRaises(NoCommits, RevisionSpec('ancestor:.').in_history, b2)
70
69
 
71
70
        os.mkdir('copy')
72
 
        b3 = copy_branch(b, 'copy')
 
71
        b3 = b.clone('copy')
73
72
        b3.working_tree().commit('Commit four', rev_id='b@r-0-4')
74
73
        self.assertEquals(RevisionSpec('ancestor:.').in_history(b3).rev_id,
75
74
                          'a@r-0-3')
90
89
        branch = Branch.initialize('branch1')
91
90
        branch.working_tree().add(['file'])
92
91
        branch.working_tree().commit('add file')
93
 
        copy_branch(branch, 'branch2')
 
92
        branch.clone('branch2')
94
93
        print >> open('branch2/file', 'w'), 'new content'
95
94
        branch2 = Branch.open('branch2')
96
95
        branch2.working_tree().commit('update file', rev_id='A')