/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: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    """
97
97
    if ancestry is None:
98
98
        return None
99
 
    if not ancestry: #Empty ancestry, no need to do any work
 
99
    if not ancestry:  # Empty ancestry, no need to do any work
100
100
        return []
101
101
 
102
102
    # Optionally, we could make 1 call to graph.get_parent_map with all
110
110
        parent_map = graph.get_parent_map([cur])
111
111
        parents = parent_map.get(cur)
112
112
        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))
 
113
            break  # Ghost, we are done
 
114
        mainline.append(
 
115
            (str(cur_revno) if cur_revno is not None else None, cur, 0))
115
116
        cur = parents[0]
116
117
        if cur_revno is not None:
117
118
            cur_revno -= 1
136
137
    """
137
138
    if ancestry is None:
138
139
        return None
139
 
    if not ancestry: #Empty ancestry, no need to do any work
 
140
    if not ancestry:  # Empty ancestry, no need to do any work
140
141
        return []
141
142
 
142
143
    merge_sorted_revisions = branch.iter_merge_sorted_revisions()
159
160
    if revid_range is None or revs is None:
160
161
        return revs
161
162
    return [rev for rev in revs
162
 
        if graph.is_between(rev[1], revid_range[0], revid_range[1])]
 
163
            if graph.is_between(rev[1], revid_range[0], revid_range[1])]
163
164
 
164
165
 
165
166
def _find_unmerged(local_branch, remote_branch, restrict,
213
214
        remotes = _enumerate_mainline(remote_extra, graph, remote_revno,
214
215
                                      remote_revision_id, backward)
215
216
    return _filter_revs(graph, locals, local_revid_range), _filter_revs(graph,
216
 
        remotes, remote_revid_range)
 
217
                                                                        remotes, remote_revid_range)
217
218
 
218
219
 
219
220
def sorted_revisions(revisions, history_map):