Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug Incorrect current version from Mercurial Tag #85

Closed
mrussell42 opened this issue Oct 27, 2023 · 0 comments
Closed

bug Incorrect current version from Mercurial Tag #85

mrussell42 opened this issue Oct 27, 2023 · 0 comments

Comments

@mrussell42
Copy link
Contributor

  • bump-my-version version: 0.11.0
  • Python version: 3.11.5
  • Operating System: Linux Fedora 38

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.
Trying to run : bump-my-version show
I get the warning
Specified version (1.5.1) does not match last tagged version (1.0)
I expect that the tag recovered from the mercurial repo matches the latest_tag

What I Did

I ran:

[matt@mattr] $ bump-my-version show

and got (edited for privacy)

{'allow_dirty': False,
 'commit': True,
 'commit_args': None,
 'current_version': '1.5.1',
 'excluded_paths': [],
 'files': [{'filename': '##########/_version.py',
            'glob': None,
            'ignore_missing_version': False,
            'no_regex': False,
            'parse': '(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)',
            'replace': '__version__ = "{new_version}"',
            'search': '__version__ = "{current_version}"',
            'serialize': ['{major}.{minor}.{patch}']}],
 'ignore_missing_version': False,
 'included_paths': [],
 'message': 'Bump version: {current_version} → {new_version}',
 'no_regex': False,
 'parse': '(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)',
 'parts': {'major': {'first_value': None,
                     'independent': False,
                     'optional_value': None,
                     'values': None},
           'minor': {'first_value': None,
                     'independent': False,
                     'optional_value': None,
                     'values': None},
           'patch': {'first_value': None,
                     'independent': False,
                     'optional_value': None,
                     'values': None}},
 'replace': '{new_version}',
 'scm_info': {'branch_name': None,
              'commit_sha': None,
              'current_version': '1.0',
              'dirty': True,
              'distance_to_latest_tag': None,
              'short_branch_name': None,
              'tool': <class 'bumpversion.scm.Mercurial'>},
 'search': '{current_version}',
 'serialize': ['{major}.{minor}.{patch}'],
 'sign_tags': False,
 'tag': True,
 'tag_message': 'Bump version: {current_version} → {new_version}',
 'tag_name': '{new_version}'}

If I run this to get the list of tags (which I believe the scm.py code runs

[matt@mattr]$ hg log -r "tag(r're:.*')" --template "{latesttag}\n"
1.0
1.1
1.2
1.3.0
1.4.0
1.5.0
1.5.1
1.5.1

The tags appear in the order they were created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant