/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/revision.py

  • Committer: Jelmer Vernooij
  • Date: 2019-05-29 03:22:34 UTC
  • mfrom: (7303 work)
  • mto: This revision was merged to the branch mainline in revision 7306.
  • Revision ID: jelmer@jelmer.uk-20190529032234-mt3fuws8gq03tapi
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        if not isinstance(other, Revision):
75
75
            return False
76
76
        return (
77
 
                self.inventory_sha1 == other.inventory_sha1
78
 
                and self.revision_id == other.revision_id
79
 
                and self.timestamp == other.timestamp
80
 
                and self.message == other.message
81
 
                and self.timezone == other.timezone
82
 
                and self.committer == other.committer
83
 
                and self.properties == other.properties
84
 
                and self.parent_ids == other.parent_ids)
 
77
            self.inventory_sha1 == other.inventory_sha1
 
78
            and self.revision_id == other.revision_id
 
79
            and self.timestamp == other.timestamp
 
80
            and self.message == other.message
 
81
            and self.timezone == other.timezone
 
82
            and self.committer == other.committer
 
83
            and self.properties == other.properties
 
84
            and self.parent_ids == other.parent_ids)
85
85
 
86
86
    def __ne__(self, other):
87
87
        return not self.__eq__(other)
107
107
        reversed_result = []
108
108
        while current_revision is not None:
109
109
            reversed_result.append(current_revision.revision_id)
110
 
            if not len (current_revision.parent_ids):
 
110
            if not len(current_revision.parent_ids):
111
111
                reversed_result.append(None)
112
112
                current_revision = None
113
113
            else:
147
147
        """Iterate over the bugs associated with this revision."""
148
148
        bug_property = self.properties.get('bugs', None)
149
149
        if bug_property is None:
150
 
            return
151
 
        for line in bug_property.splitlines():
152
 
            try:
153
 
                url, status = line.split(None, 2)
154
 
            except ValueError:
155
 
                raise bugtracker.InvalidLineInBugsProperty(line)
156
 
            if status not in bugtracker.ALLOWED_BUG_STATUSES:
157
 
                raise bugtracker.InvalidBugStatus(status)
158
 
            yield url, status
 
150
            return iter([])
 
151
        return bugtracker.decode_bug_urls(bug_property)
159
152
 
160
153
 
161
154
def iter_ancestors(revision_id, revision_source, only_present=False):
189
182
    """
190
183
    found_ancestors = {}
191
184
    anc_iter = enumerate(iter_ancestors(revision_id, revision_source,
192
 
                         only_present=True))
 
185
                                        only_present=True))
193
186
    for anc_order, (anc_id, anc_distance) in anc_iter:
194
187
        if anc_id not in found_ancestors:
195
188
            found_ancestors[anc_id] = (anc_order, anc_distance)