~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-31 16:12:57 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060731161257-91a231523255332c
new official bzr.ico

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005 by Canonical Development Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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
 
        # 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)
 
32
        tree2.branch.fetch(tree.branch)
 
33
        tree2.set_pending_merges([tree.last_revision()])
36
34
        output = StringIO()
37
35
        show_pending_merges(tree2, output)
38
36
        self.assertContainsRe(output.getvalue(), 'empty commit')
44
42
        r2_id = tree.commit('two', allow_pointless=True)
45
43
        r2_tree = tree.branch.repository.revision_tree(r2_id)
46
44
        output = StringIO()
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)])
 
45
        show_tree_status(tree, to_file=output, revision=[RevisionSpec("revid:%s" % r1_id), RevisionSpec("revid:%s" % r2_id)])
50
46
        # return does not matter as long as it did not raise.