bumpversion.scm.hg
Mercurial source control management.
logger
logger = get_indented_logger(__name__)Mercurial
class Mercurial(config: SCMConfig)Mercurial source control management.
is_available
def is_available() -> boolIs the VCS implementation usable?
latest_tag_info
def latest_tag_info() -> LatestTagInfoReturn information about the latest tag.
get_all_tags
def get_all_tags() -> List[str]Return all tags in a mercurial repository.
add_path
def add_path(path: Pathlike) -> NoneAdd a path to the Source Control Management repository.
commit_and_tag
def commit_and_tag(files: List[Pathlike], context: MutableMapping, dry_run: bool = False) -> NoneCommit and tag files to the repository using the configuration.
commit
def commit(context: MutableMapping) -> NoneCommit the changes.
tag
def tag(name: str, sign: bool = False, message: Optional[str] = None) -> NoneCreate a tag of the new_version in VCS.
If only name is given, bumpversion uses a lightweight tag. Otherwise, it uses an annotated tag.
Parameters
name: The name of the tagsign: True to sign the tagmessage: A optional message to annotate the tag.
Raises
SignedTagsError: IfsignisTrue
assert_nondirty
def assert_nondirty() -> NoneAssert that the working directory is clean.
commit_info
def commit_info(config: SCMConfig) -> dictGet the commit info for the repo.
Parameters
config: The source control configuration.
Returns
- A dictionary containing information about the latest commit.
parse_commit_log
def parse_commit_log(log_string: str, config: SCMConfig) -> dictParse the commit log string.
tag
def tag(name: str, sign: bool = False, message: Optional[str] = None) -> NoneCreate a tag of the new_version in VCS.
If only name is given, bumpversion uses a lightweight tag. Otherwise, it uses an annotated tag.
Parameters
name: The name of the tagsign: True to sign the tagmessage: A optional message to annotate the tag.
Raises
SignedTagsError: IfsignisTrue
assert_nondirty
def assert_nondirty(allow_dirty_files: Optional[List[str]] = None) -> NoneAssert that the working directory is clean, ignoring files matching allow_dirty_files.