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

Make a VCS save on ctrl+s shortcut #3923

Merged
merged 19 commits into from
Dec 2, 2022

Conversation

galin-enso
Copy link
Contributor

@galin-enso galin-enso commented Nov 28, 2022

Pull Request Description

Save a snapshot of the project directory to the VCS on ctrl+s. If the operation fails because the VCS was not initialized previously, it will try to initialize the VCS first and then save a snapshot.

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@galin-enso galin-enso marked this pull request as ready for review November 28, 2022 12:56
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from my side, but someone knowing our backend should check it as well :)

@hubertp hubertp self-requested a review November 28, 2022 13:08
app/gui/src/controller/text.rs Outdated Show resolved Hide resolved
app/gui/src/presenter/code.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@hubertp hubertp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if someone wants to save a project with a particular name, that's gonna be a different operation?

code: error_code, ..
})) = response
{
if error_code == code::FILE_NOT_FOUND {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is FILE_NOT_FOUND? I need to change that so that it returns VCSNotFound.. sorry!

@galin-enso
Copy link
Contributor Author

So if someone wants to save a project with a particular name, that's gonna be a different operation?

Do you mean the ctrl+s shortcut being used to perform for example a whole project folder save in another location (instead of storing a project snapshot to the VCS as is implemented here)? Or having named VCS snapshots, not just time-stamped commit messages?

@hubertp
Copy link
Contributor

hubertp commented Dec 1, 2022

So if someone wants to save a project with a particular name, that's gonna be a different operation?

Do you mean the ctrl+s shortcut being used to perform for example a whole project folder save in another location (instead of storing a project snapshot to the VCS as is implemented here)? Or having named VCS snapshots, not just time-stamped commit messages?

The latter. I suppose there will be a follow up (vcs/save takes an optional name), right?

@galin-enso
Copy link
Contributor Author

The latter. I suppose there will be a follow up (vcs/save takes an optional name), right?

Ok, yes. If I understand correctly the first step is to implement basic snapshot/restore functionality, which can be expanded to named snapshots later.

@farmaazon
Copy link
Contributor

QA process passed, have a nice day!

@galin-enso galin-enso added CI: Ready to merge This PR is eligible for automatic merge and removed CI: Ready to merge This PR is eligible for automatic merge labels Dec 2, 2022
@mergify mergify bot merged commit a2b57b4 into develop Dec 2, 2022
@mergify mergify bot deleted the wip/galin-enso/save-vsc-on-shortcut-183874358 branch December 2, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants