Skip to content

bumpversion.scm.hg ​

Mercurial source control management.

logger ​

python
logger = get_indented_logger(__name__)

Mercurial ​

python
class Mercurial(config: SCMConfig)

Mercurial source control management.

is_available ​

python
def is_available() -> bool

Is the VCS implementation usable?

latest_tag_info ​

python
def latest_tag_info() -> LatestTagInfo

Return information about the latest tag.

get_all_tags ​

python
def get_all_tags() -> List[str]

Return all tags in a mercurial repository.

add_path ​

python
def add_path(path: Pathlike) -> None

Add a path to the Source Control Management repository.

commit_and_tag ​

python
def commit_and_tag(files: List[Pathlike], context: MutableMapping, dry_run: bool = False) -> None

Commit and tag files to the repository using the configuration.

commit ​

python
def commit(context: MutableMapping) -> None

Commit the changes.

tag ​

python
def tag(name: str, sign: bool = False, message: Optional[str] = None) -> None

Create 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 tag
  • sign: True to sign the tag
  • message: A optional message to annotate the tag.

Raises

  • SignedTagsError: If sign is True

assert_nondirty ​

python
def assert_nondirty() -> None

Assert that the working directory is clean.

commit_info ​

python
def commit_info(config: SCMConfig) -> dict

Get the commit info for the repo.

Parameters

  • config: The source control configuration.

Returns

  • A dictionary containing information about the latest commit.

parse_commit_log ​

python
def parse_commit_log(log_string: str, config: SCMConfig) -> dict

Parse the commit log string.

tag ​

python
def tag(name: str, sign: bool = False, message: Optional[str] = None) -> None

Create 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 tag
  • sign: True to sign the tag
  • message: A optional message to annotate the tag.

Raises

  • SignedTagsError: If sign is True

assert_nondirty ​

python
def assert_nondirty(allow_dirty_files: Optional[List[str]] = None) -> None

Assert that the working directory is clean, ignoring files matching allow_dirty_files.