swh.loader.mercurial.hgutil module#

swh.loader.mercurial.hgutil.repository(path: str) <module 'mercurial.localrepo' from '/home/jenkins/workspace/DDOC/publish/swh-docs/.tox/sphinx/lib/python3.11/site-packages/mercurial/localrepo.py'>[source]#
class swh.loader.mercurial.hgutil.BranchingInfo(tips: Mapping[bytes, swh.loader.mercurial.hgutil.HgNodeId], bookmarks: Mapping[bytes, swh.loader.mercurial.hgutil.HgNodeId], open_heads: Mapping[bytes, List[swh.loader.mercurial.hgutil.HgNodeId]], closed_heads: Mapping[bytes, List[swh.loader.mercurial.hgutil.HgNodeId]], default_branch_alias: bytes | None)[source]#

Bases: object

tips: Mapping[bytes, HgNodeId]#

The first head of the branch, sorted by nodeid if there are multiple heads.

bookmarks: Mapping[bytes, HgNodeId]#

all bookmarks in the repository (except local divergent ones)

open_heads: Mapping[bytes, List[HgNodeId]]#

All open heads of a given branch, sorted by nodeid

closed_heads: Mapping[bytes, List[HgNodeId]]#

All closed heads of a given branch, sorted by nodeid, if any

default_branch_alias: bytes | None#

The default snapshot branch to show in the UI

swh.loader.mercurial.hgutil.branching_info(repo: <module 'mercurial.localrepo' from '/home/jenkins/workspace/DDOC/publish/swh-docs/.tox/sphinx/lib/python3.11/site-packages/mercurial/localrepo.py'>, ignored: ~typing.Set[int]) BranchingInfo[source]#

Lists all relevant information about branch heads and bookmarks, grouped by type.

ignored: Revisions that we ignore during loading because they are corrupted or have a corrupted ancestor.

Categories may have overlapping nodes: a branch tip can be a closed branch head and have a bookmark on it, for example.

swh.loader.mercurial.hgutil.clone(src: str, dest: str, timeout: float = 7200, rev: str | None = None)[source]#

Clone a hg repository src in dest. Optionally, this can clone at the specific revision if provided.


CloneFailure – when there is an issue during the cloning step