~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-30 01:26:17 UTC
  • mfrom: (3044.1.4 164476-default-format)
  • Revision ID: pqm@pqm.ubuntu.com-20071130012617-w9ld4lj80b95vufk
Set default format to pack-0.92

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Development Ltd
 
1
# Copyright (C) 2005 Canonical 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
 
        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.