/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 breezy/missing.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    errors,
23
23
    log,
24
24
    )
25
 
from . import revision as _mod_revision
26
25
 
27
26
 
28
27
def iter_log_revisions(revisions, revision_source, verbose, rev_tag_dict=None):
29
 
    last_tree = revision_source.revision_tree(_mod_revision.NULL_REVISION)
30
 
    last_rev_id = None
31
 
 
32
28
    if rev_tag_dict is None:
33
29
        rev_tag_dict = {}
34
30
    for revno, rev_id, merge_depth in revisions:
96
92
    """
97
93
    if ancestry is None:
98
94
        return None
99
 
    if not ancestry: #Empty ancestry, no need to do any work
 
95
    if not ancestry:  # Empty ancestry, no need to do any work
100
96
        return []
101
97
 
102
98
    # Optionally, we could make 1 call to graph.get_parent_map with all
110
106
        parent_map = graph.get_parent_map([cur])
111
107
        parents = parent_map.get(cur)
112
108
        if not parents:
113
 
            break # Ghost, we are done
114
 
        mainline.append((str(cur_revno) if cur_revno is not None else None, cur, 0))
 
109
            break  # Ghost, we are done
 
110
        mainline.append(
 
111
            (str(cur_revno) if cur_revno is not None else None, cur, 0))
115
112
        cur = parents[0]
116
113
        if cur_revno is not None:
117
114
            cur_revno -= 1
136
133
    """
137
134
    if ancestry is None:
138
135
        return None
139
 
    if not ancestry: #Empty ancestry, no need to do any work
 
136
    if not ancestry:  # Empty ancestry, no need to do any work
140
137
        return []
141
138
 
142
139
    merge_sorted_revisions = branch.iter_merge_sorted_revisions()
159
156
    if revid_range is None or revs is None:
160
157
        return revs
161
158
    return [rev for rev in revs
162
 
        if graph.is_between(rev[1], revid_range[0], revid_range[1])]
 
159
            if graph.is_between(rev[1], revid_range[0], revid_range[1])]
163
160
 
164
161
 
165
162
def _find_unmerged(local_branch, remote_branch, restrict,
212
209
                                     local_revision_id, backward)
213
210
        remotes = _enumerate_mainline(remote_extra, graph, remote_revno,
214
211
                                      remote_revision_id, backward)
215
 
    return _filter_revs(graph, locals, local_revid_range), _filter_revs(graph,
216
 
        remotes, remote_revid_range)
 
212
    return _filter_revs(graph, locals, local_revid_range), _filter_revs(
 
213
        graph, remotes, remote_revid_range)
217
214
 
218
215
 
219
216
def sorted_revisions(revisions, history_map):