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

Fix hg fileview resolves for same path on file and directory #1746

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

eheimbuch
Copy link
Contributor

@eheimbuch eheimbuch commented Jul 28, 2021

Proposed changes

Fixes #1744 & #1719

If a file and a directory with the same name existed somewhere at the same level in a Mercurial repository, our logic in the fileview command failed to collect them. The parent of the file was mistaken for the entire file path, resulting in confusing errors that the file could not be found in the manifest. With this fix, file detection should now be more secure than before.

To reproduce the error follow the instructions in issue #1719

Your checklist for this pull request

Contributor:

  • PR is well described and the description can be used as a commit message on squash
  • Related issues linked to PR if existing and labels set
  • New code is covered with unit tests
  • New ui components are tested inside the storybook (module ui-components only)
  • Changelog entry file created in gradle/changelog or CHANGELOG.md is updated for plugins
  • Feature has been tested with different permissions
  • Documentation updated (only necessary for new features or changed behaviour)

Reviewer:

  • The clean code principles are respected (CleanCode)
  • All new code/logic is implemented on the right spot / "Should this be done here?"
  • UI changes fits into the layout
  • The UI views / components are responsive (mobile views)
  • Correct translations are available

Checklist for branch merge request (not required for forks)

@eheimbuch eheimbuch added the bug Something isn't working label Jul 28, 2021
@eheimbuch eheimbuch marked this pull request as ready for review July 28, 2021 06:52
@sdorra sdorra merged commit e68c178 into develop Jul 28, 2021
@sdorra sdorra deleted the bugfix/hg_manifest_not_found branch July 28, 2021 09:22
@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants