-
Notifications
You must be signed in to change notification settings - Fork 5
Erase local folder if branch to use differs from local active branch #661
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
Draft
nicogodet
wants to merge
5
commits into
qgis-deployment:main
Choose a base branch
from
nicogodet:fix-660
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #661 +/- ##
==========================================
+ Coverage 71.84% 71.88% +0.04%
==========================================
Files 48 48
Lines 3271 3276 +5
Branches 576 577 +1
==========================================
+ Hits 2350 2355 +5
Misses 705 705
Partials 216 216
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
nicogodet
added a commit
that referenced
this pull request
May 20, 2025
`DESTINATION_BRANCH_TO_USE` - is "declared" as a string https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/38859d135c7561f8b3bc2d6525405f64f56d4e1c/qgis_deployment_toolbelt/profiles/profiles_handler_base.py#L62 - is always populated with a string in : - __init__ - https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/38859d135c7561f8b3bc2d6525405f64f56d4e1c/qgis_deployment_toolbelt/profiles/local_git_handler.py#L98-L104 ```python def get_active_branch_from_local_repository(self, local_git_repository_path: Path | None = None) -> str: ``` - ... Without this change, the type of this variable becomes mixed `str | bytes` But indeed, it needs to be converted to bytes at some point ([here](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/38859d135c7561f8b3bc2d6525405f64f56d4e1c/qgis_deployment_toolbelt/profiles/profiles_handler_base.py#L492-L500)) but it's cleaner to let the function handles the conversion instead of store the branch name as bytes In my case, I relied on str type when testing #661 and I end up comparing `"main"` with `b"main"` equals False
|
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.
Fixes #660
It's easier te proceed that way than :