~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

(gz) Fix test failure on alpha by correcting format string for
 gc_chk_sha1_record (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib import (
20
20
    log,
21
 
    symbol_versioning,
22
21
    )
23
22
import bzrlib.revision as _mod_revision
24
23
 
43
42
 
44
43
 
45
44
def find_unmerged(local_branch, remote_branch, restrict='all',
46
 
                  include_merged=None, backward=False,
47
 
                  local_revid_range=None, remote_revid_range=None,
48
 
                  include_merges=symbol_versioning.DEPRECATED_PARAMETER):
 
45
                  include_merges=False, backward=False,
 
46
                  local_revid_range=None, remote_revid_range=None):
49
47
    """Find revisions from each side that have not been merged.
50
48
 
51
49
    :param local_branch: Compare the history of local_branch
55
53
        unique revisions from both sides. If 'local', we will return None
56
54
        for the remote revisions, similarly if 'remote' we will return None for
57
55
        the local revisions.
58
 
    :param include_merged: Show mainline revisions only if False,
 
56
    :param include_merges: Show mainline revisions only if False,
59
57
        all revisions otherwise.
60
58
    :param backward: Show oldest versions first when True, newest versions
61
59
        first when False.
63
61
        revisions (lower bound, upper bound)
64
62
    :param remote_revid_range: Revision-id range for filtering remote_branch
65
63
        revisions (lower bound, upper bound)
66
 
    :param include_merges: Deprecated historical alias for include_merged
67
64
 
68
65
    :return: A list of [(revno, revision_id)] for the mainline revisions on
69
66
        each side.
70
67
    """
71
 
    if symbol_versioning.deprecated_passed(include_merges):
72
 
        symbol_versioning.warn(
73
 
            'include_merges was deprecated in 2.5.'
74
 
            ' Use include_merged instead.',
75
 
            DeprecationWarning, stacklevel=2)
76
 
        if include_merged is None:
77
 
            include_merged = include_merges
78
 
    if include_merged is None:
79
 
        include_merged = False
80
68
    local_branch.lock_read()
81
69
    try:
82
70
        remote_branch.lock_read()
83
71
        try:
84
72
            return _find_unmerged(
85
73
                local_branch, remote_branch, restrict=restrict,
86
 
                include_merged=include_merged, backward=backward,
 
74
                include_merges=include_merges, backward=backward,
87
75
                local_revid_range=local_revid_range,
88
76
                remote_revid_range=remote_revid_range)
89
77
        finally:
172
160
 
173
161
 
174
162
def _find_unmerged(local_branch, remote_branch, restrict,
175
 
                   include_merged, backward,
 
163
                   include_merges, backward,
176
164
                   local_revid_range=None, remote_revid_range=None):
177
165
    """See find_unmerged.
178
166
 
198
186
                             ' "remote": %r' % (restrict,))
199
187
        local_extra, remote_extra = graph.find_difference(local_revision_id,
200
188
                                                          remote_revision_id)
201
 
    if include_merged:
 
189
    if include_merges:
202
190
        locals = _enumerate_with_merges(local_branch, local_extra,
203
191
                                        graph, local_revno,
204
192
                                        local_revision_id, backward)