1
# Copyright (C) 2007 Canonical Ltd
1
# Copyright (C) 2009, 2010 Canonical Ltd
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
84
84
], list(the_branch.iter_merge_sorted_revisions(
85
85
stop_revision_id='rev-3', stop_rule='with-merges')))
87
def test_merge_sorted_range_stop_with_merges_can_show_non_parents(self):
88
tree = self.create_tree_with_merge()
89
the_branch = tree.bzrdir.open_branch()
90
# rev-1.1.1 gets logged before the end revision is reached.
91
# so it is returned even though rev-1.1.1 is not a parent of rev-2.
93
('rev-3', 0, (3,), False),
94
('rev-1.1.1', 1, (1,1,1), True),
95
('rev-2', 0, (2,), False),
96
], list(the_branch.iter_merge_sorted_revisions(
97
stop_revision_id='rev-2', stop_rule='with-merges')))
99
def test_merge_sorted_range_stop_with_merges_ignore_non_parents(self):
100
tree = self.create_tree_with_merge()
101
the_branch = tree.bzrdir.open_branch()
102
# rev-2 is not a parent of rev-1.1.1 so it must not be returned
104
('rev-3', 0, (3,), False),
105
('rev-1.1.1', 1, (1,1,1), True),
106
], list(the_branch.iter_merge_sorted_revisions(
107
stop_revision_id='rev-1.1.1', stop_rule='with-merges')))
87
109
def test_merge_sorted_single_stop_exclude(self):
88
110
# from X..X exclusive is an empty result
89
111
tree = self.create_tree_with_merge()