Skip to content

#1695: Clone settings to temporary directory, analyse, and then move#1878

Open
areinicke wants to merge 18 commits intodevonfw:mainfrom
areinicke:feature/1695-clone-settings-to-temp-dir-for-verification
Open

#1695: Clone settings to temporary directory, analyse, and then move#1878
areinicke wants to merge 18 commits intodevonfw:mainfrom
areinicke:feature/1695-clone-settings-to-temp-dir-for-verification

Conversation

@areinicke
Copy link
Copy Markdown
Contributor

@areinicke areinicke commented Apr 30, 2026

This PR fixes #1695

Implemented changes:

  • When creating a new project, the settings or code repository is first cloned to a temporary location (at $IDE_ROOT/_ide/tmp/projects/<project name>) where it is analyzed for validity. We check whether an ide.properties file exist either at the top level or within a settings folder at the top level. Only if this passes, do we create a new project at $IDE_ROOT/<project name> and move the files from the temporary location to the final location. The temporary folder is fully deleted after this process.
  • Removed the --code option when creating a project. We now automatically determine if the repository is a code or settings repository and act accordingly.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal#

Note: In some places, I used getFileAccess() to copy and subsequently delete files. I am aware that there is a move function. However, this was always failing for some reason

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Apr 30, 2026
@areinicke areinicke self-assigned this Apr 30, 2026
@areinicke areinicke moved this from 🆕 New to 🏗 In progress in IDEasy board Apr 30, 2026
@areinicke areinicke added enhancement New feature or request create Create commandlet used to create new IDEasy projects with "ide create" settings ide-settings repo and replated processes and features git git version management tool integration labels Apr 30, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 30, 2026

Coverage Report for CI Build 25167683820

Coverage decreased (-0.2%) to 70.487%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 51 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

51 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java 35 77.17%
com/devonfw/tools/ide/context/IdeContext.java 7 70.63%
com/devonfw/tools/ide/git/GitUrl.java 6 69.49%
com/devonfw/tools/ide/version/VersionSegment.java 2 89.24%
com/devonfw/tools/ide/commandlet/CreateCommandlet.java 1 92.68%

Coverage Stats

Coverage Status
Relevant Lines: 15344
Covered Lines: 11275
Line Coverage: 73.48%
Relevant Branches: 6846
Covered Branches: 4366
Branch Coverage: 63.77%
Branches in Coverage %: Yes
Coverage Strength: 3.11 hits per line

💛 - Coveralls

@areinicke areinicke marked this pull request as ready for review April 30, 2026 10:08
@areinicke areinicke moved this from 🏗 In progress to Team Review in IDEasy board Apr 30, 2026
@laim2003 laim2003 self-assigned this Apr 30, 2026
@laim2003 laim2003 self-requested a review April 30, 2026 10:55
@satorus satorus self-assigned this Apr 30, 2026
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
Co-authored-by: Robin Wenzel <robin@die-wenzels.de>
@areinicke
Copy link
Copy Markdown
Contributor Author

Thanks for the review. I have integrated the changes.

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java Outdated
@areinicke areinicke moved this from Team Review to 👀 In review in IDEasy board Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create Create commandlet used to create new IDEasy projects with "ide create" enhancement New feature or request git git version management tool integration settings ide-settings repo and replated processes and features

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Clone settings to temporary directory, analyse, and then move

4 participants