~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_ancestry.py

  • Committer: Martin Pool
  • Date: 2006-02-22 04:29:54 UTC
  • mfrom: (1566 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060222042954-60333f08dd56a646
[merge] from bzr.dev before integration
Fix undefined ordering in sign_my_revisions breaking tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import os
18
 
from bzrlib.tests import TestCaseInTempDir
19
 
from bzrlib.branch import Branch
 
18
 
20
19
from bzrlib.builtins import merge
21
 
 
22
 
class TestAncestry(TestCaseInTempDir):
 
20
from bzrlib.tests import TestCaseWithTransport
 
21
from bzrlib.workingtree import WorkingTree
 
22
 
 
23
 
 
24
class TestAncestry(TestCaseWithTransport):
23
25
 
24
26
    def test_ancestry(self):
25
27
        """Tests 'ancestry' command"""
26
 
        os.mkdir('A')
27
 
        a = Branch.initialize('A')
28
 
        a_wt = a.working_tree()
 
28
        a_wt = self.make_branch_and_tree('A')
29
29
        open('A/foo', 'wb').write('1111\n')
30
30
        a_wt.add('foo')
31
31
        a_wt.commit('added foo',rev_id='A1')
32
 
        a.clone('B')
33
 
        b = Branch.open('B')
34
 
        b_wt = b.working_tree()
 
32
        self.run_bzr_captured(['branch', 'A', 'B'])
 
33
        b_wt = WorkingTree.open('B')
35
34
        open('B/foo','wb').write('1111\n22\n')
36
35
        b_wt.commit('modified B/foo',rev_id='B1')
37
36
        open('A/foo', 'wb').write('000\n1111\n')