Repository navigation
Fix/updater apply tag - #17
Merged
Merged
Conversation
added 2 commits
November 21, 2026 17:30
The check offers the newest release tag, but applying ran `git pull` of whatever branch was checked out: on a branch deleted after its merge it failed with a git error, on master it also took commits made after the release, and a tag whose VERSION disagreed (1.3.0) made installs offer the same update again. - versioning.plan_apply/resolve_apply/move_to_tag: fetch tags, then decide before touching anything; fast-forward the default branch (or move a release-pinned detached checkout) to the tag's commit only. Refused, with nothing changed: another branch, commits of its own, a release whose VERSION differs from its tag. Already at or beyond the release: nothing to do. - The check reports apply_blocked, so the dialog says why (en/nl/de/fr) and disables Apply before it is pressed; after a successful move the dialog shows the new version at once. - Tests on real git repositories (skipped where git is missing); the manual's update steps follow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updater: apply exactly the advertised release (1.5.1)
Problem
The update check offers the newest release tag, but Apply update ran
git pullof whatever branch was checked out:master, it also took commits merged after the release;VERSIONdisagreed with the tag (the 1.3.0 case) made installations offer the same update again after applying it.Change
master:git merge --ff-only <tag>(stays on master for the next update);git checkout --detach <tag>;git checkout masterfix);VERSIONdoes not match its tag.Tests
tests/test_updater_apply.py: 13 tests on real git repositories (fast-forward to exactly the tag, detached install, other branch, local commits, inconsistentVERSION, already up to date, tag moved on the remote), plus a guard thatgit pullis gone from the apply path. They skip where git is not installed.Note
The update to 1.5.1 is still applied by 1.5.0's updater (
git pull). The new apply path takes effect from the next release onwards.