Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/git/updater.py
Show First 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | def get_releases(self): | ||||
continue | continue | ||||
yield converters.dulwich_tag_to_release(raw_obj, log=self.log) | yield converters.dulwich_tag_to_release(raw_obj, log=self.log) | ||||
def has_occurrences(self): | def has_occurrences(self): | ||||
return bool(self.remote_refs) | return bool(self.remote_refs) | ||||
def get_occurrences(self): | def get_occurrences(self): | ||||
origin_id = self.origin_id | |||||
visit = self.visit | |||||
ret = [] | ret = [] | ||||
for ref in self.remote_refs: | for ref in self.remote_refs: | ||||
ret_ref = self.local_refs[ref].copy() | ret_ref = self.local_refs[ref].copy() | ||||
ret_ref.update({ | ret_ref.update({ | ||||
'branch': ref, | 'branch': ref, | ||||
'origin': self.origin_id, | 'origin': origin_id, | ||||
'date': self.fetch_date, | 'visit': visit, | ||||
}) | }) | ||||
if not ret_ref['target_type']: | if not ret_ref['target_type']: | ||||
target_type = self.id_to_type[ret_ref['target']] | target_type = self.id_to_type[ret_ref['target']] | ||||
ret_ref['target_type'] = converters.DULWICH_TYPES[target_type] | ret_ref['target_type'] = converters.DULWICH_TYPES[target_type] | ||||
ret_ref['target'] = hashutil.bytehex_to_hash(ret_ref['target']) | ret_ref['target'] = hashutil.bytehex_to_hash(ret_ref['target']) | ||||
ret.append(ret_ref) | ret.append(ret_ref) | ||||
Show All 36 Lines |