Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/from_disk.py
Show First 20 Lines • Show All 493 Lines • ▼ Show 20 Lines | def store_revision(self, rev_ctx: hgutil.BaseContext) -> None: | ||||
extra_headers=tuple(extra_headers), | extra_headers=tuple(extra_headers), | ||||
synthetic=False, | synthetic=False, | ||||
parents=self.get_revision_parents(rev_ctx), | parents=self.get_revision_parents(rev_ctx), | ||||
) | ) | ||||
self._revision_nodeid_to_swhid[hg_nodeid] = revision.id | self._revision_nodeid_to_swhid[hg_nodeid] = revision.id | ||||
self.storage.revision_add([revision]) | self.storage.revision_add([revision]) | ||||
def store_release(self, name: bytes, target=Sha1Git) -> Sha1Git: | def store_release(self, name: bytes, target: Sha1Git) -> Sha1Git: | ||||
"""Store a release given its name and its target. | """Store a release given its name and its target. | ||||
A release correspond to a user defined tag in mercurial. | A release correspond to a user defined tag in mercurial. | ||||
The mercurial api as a `tip` tag that must be ignored. | The mercurial api as a `tip` tag that must be ignored. | ||||
Args: | Args: | ||||
name: name of the release. | name: name of the release. | ||||
target: swhid of the target revision. | target: swhid of the target revision. | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |