/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

  • Committer: John Arbash Meinel
  • Date: 2008-06-02 16:09:09 UTC
  • mto: This revision was merged to the branch mainline in revision 3472.
  • Revision ID: john@arbash-meinel.com-20080602160909-u5q4mzn2ou6kz2r7
Change WT.set_parent_(ids/trees) to filter out ancestors.

This makes it impossible to trigger bug #235407, since we can't have repeated
ancestors given.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
                             '  Joe Foo 2007-12-04 commit 3c\n',
67
67
                             output.getvalue())
68
68
 
69
 
    def test_repeated_pending_merge(self):
70
 
        # It is currently possible to merge the same thing 2x with 'merge
71
 
        # --force', so test that status still works in that case.
72
 
        config.GlobalConfig().set_user_option('email', 'Joe Foo <joe@foo.com>')
73
 
        tree = self.make_branch_and_tree('a')
74
 
        tree.commit('commit 1', timestamp=1196796819, timezone=0)
75
 
        tree2 = tree.bzrdir.sprout('b').open_workingtree()
76
 
        tree2.commit('commit 2b', timestamp=1196796819, timezone=0)
77
 
        rev3 = tree2.commit('commit 3b', timestamp=1196796819, timezone=0)
78
 
        tree2.commit('commit 4b', timestamp=1196796819, timezone=0)
79
 
        tree.merge_from_branch(tree2.branch)
80
 
        tree.merge_from_branch(tree2.branch)
81
 
        tree.merge_from_branch(tree2.branch, to_revision=rev3)
82
 
        tree.lock_read()
83
 
        self.addCleanup(tree.unlock)
84
 
        output = StringIO()
85
 
        show_pending_merges(tree, output)
86
 
        self.assertEqualDiff('pending merges:\n'
87
 
                             '  Joe Foo 2007-12-04 commit 4b\n'
88
 
                             '    Joe Foo 2007-12-04 commit 3b\n'
89
 
                             '    Joe Foo 2007-12-04 commit 2b\n'
90
 
                             '  Joe Foo 2007-12-04 commit 4b\n'
91
 
                             '  Joe Foo 2007-12-04 commit 3b\n',
92
 
                             output.getvalue())
93
 
 
94
69
    def test_with_pending_ghost(self):
95
70
        """Test when a pending merge is itself a ghost"""
96
71
        tree = self.make_branch_and_tree('a')