~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-18 02:33:47 UTC
  • mfrom: (1534.1.24 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060218023347-0952c65f668bfd68
Merge Robert Collins integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.errors import NoCommonAncestor, NoCommits
24
24
from bzrlib.errors import NoSuchRevision
25
25
from bzrlib.revisionspec import RevisionSpec
26
 
from bzrlib.workingtree import WorkingTree
27
26
 
28
27
 
29
28
class TestRevisionNamespaces(TestCaseWithTransport):
70
69
        b2 = wt2.branch
71
70
        self.assertRaises(NoCommits, RevisionSpec('ancestor:.').in_history, b2)
72
71
 
73
 
        os.mkdir('copy')
74
 
        b3 = b.clone('copy')
75
 
        wt3 = WorkingTree('copy', b3)
 
72
        d3 = b.bzrdir.sprout('copy')
 
73
        b3 = d3.open_branch()
 
74
        wt3 = d3.open_workingtree()
76
75
        wt3.commit('Commit four', rev_id='b@r-0-4')
77
76
        self.assertEquals(RevisionSpec('ancestor:.').in_history(b3).rev_id,
78
77
                          'a@r-0-3')
94
93
        branch = wt.branch
95
94
        wt.add(['file'])
96
95
        wt.commit('add file')
97
 
        branch.clone('branch2')
 
96
        d2 = branch.bzrdir.sprout('branch2')
98
97
        print >> open('branch2/file', 'w'), 'new content'
99
 
        branch2 = Branch.open('branch2')
100
 
        WorkingTree('branch2', branch2).commit('update file', rev_id='A')
 
98
        branch2 = d2.open_branch()
 
99
        d2.open_workingtree().commit('update file', rev_id='A')
101
100
        spec = RevisionSpec('branch:./branch2/.bzr/../')
102
101
        rev_info = spec.in_history(branch)
103
102
        self.assertEqual(rev_info, (None, 'A'))