~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

  • Committer: Aaron Bentley
  • Date: 2006-09-29 00:04:13 UTC
  • mto: (1731.2.8 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: aaron.bentley@utoronto.ca-20060929000413-bb6d513b7171b59f
fix version_info stuff to deliberately include root

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        tree = self.make_branch_and_tree('a')
30
30
        tree.commit('empty commit')
31
31
        tree2 = self.make_branch_and_tree('b')
32
 
        tree2.branch.fetch(tree.branch)
33
 
        tree2.set_pending_merges([tree.last_revision()])
 
32
        # set a left most parent that is not a present commit
 
33
        tree2.add_parent_tree_id('some-ghost', allow_leftmost_as_ghost=True)
 
34
        # do a merge
 
35
        tree2.merge_from_branch(tree.branch)
34
36
        output = StringIO()
35
37
        show_pending_merges(tree2, output)
36
38
        self.assertContainsRe(output.getvalue(), 'empty commit')
42
44
        r2_id = tree.commit('two', allow_pointless=True)
43
45
        r2_tree = tree.branch.repository.revision_tree(r2_id)
44
46
        output = StringIO()
45
 
        show_tree_status(tree, to_file=output, revision=[RevisionSpec("revid:%s" % r1_id), RevisionSpec("revid:%s" % r2_id)])
 
47
        show_tree_status(tree, to_file=output,
 
48
                     revision=[RevisionSpec.from_string("revid:%s" % r1_id),
 
49
                               RevisionSpec.from_string("revid:%s" % r2_id)])
46
50
        # return does not matter as long as it did not raise.