~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

(jameinel) Allow 'bzr serve' to interpret SIGHUP as a graceful shutdown.
 (bug #795025) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
import os
19
18
import warnings
20
19
 
21
20
from bzrlib import (
22
21
    bugtracker,
23
22
    revision,
24
 
    symbol_versioning,
25
23
    )
26
 
from bzrlib.branch import Branch
27
24
from bzrlib.errors import (
28
25
    InvalidBugStatus,
29
26
    InvalidLineInBugsProperty,
30
 
    NoSuchRevision,
31
27
    )
32
 
from bzrlib.deprecated_graph import Graph
33
 
from bzrlib.revision import (find_present_ancestors,
34
 
                             NULL_REVISION)
 
28
from bzrlib.revision import NULL_REVISION
35
29
from bzrlib.tests import TestCase, TestCaseWithTransport
36
 
from bzrlib.trace import mutter
37
 
from bzrlib.workingtree import WorkingTree
 
30
from bzrlib.tests.matchers import MatchesAncestry
38
31
 
39
32
# We're allowed to test deprecated interfaces
40
33
warnings.filterwarnings('ignore',
111
104
             ('a@u-0-5', ['a@u-0-0', 'a@u-0-1', 'a@u-0-2', 'a@u-0-3', 'a@u-0-4',
112
105
                          'b@u-0-3', 'b@u-0-4',
113
106
                          'b@u-0-5', 'a@u-0-5']),
114
 
             ('b@u-0-6', ['a@u-0-0', 'a@u-0-1', 'a@u-0-2',
 
107
             ('b@u-0-6', ['a@u-0-0', 'a@u-0-1', 'a@u-0-2', 'a@u-0-4',
115
108
                          'b@u-0-3', 'b@u-0-4',
116
109
                          'b@u-0-5', 'b@u-0-6']),
117
110
             ]
123
116
                    continue
124
117
                if rev_id in br2_only and not branch is br2:
125
118
                    continue
126
 
                mutter('ancestry of {%s}: %r',
127
 
                       rev_id, branch.repository.get_ancestry(rev_id))
128
 
                result = sorted(branch.repository.get_ancestry(rev_id))
129
 
                self.assertEquals(result, [None] + sorted(anc))
 
119
                self.assertThat(anc,
 
120
                    MatchesAncestry(branch.repository, rev_id))
130
121
 
131
122
 
132
123
class TestIntermediateRevisions(TestCaseWithTransport):