Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-320

Git-powered "Undo" functionality in Forge

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Minor
    • None
    • None
    • Brainstorming
    • None

    Description

      Forge should support undo/redo of changes on the file system. Use of git would rock here, particularly cases where Forge is introduced to an existing project, and determining what actually changed during a plugin execution could be nasty.

      Care should be taken to integrate with projects that are already using git as a version control mechanism.

      For example:

      I see you are already using git, what branch should Forge use when modifying files?
      1 - org.jboss.forge.history
      2 - define your own?*

      After every successful command execution, changes should be committed to the history branch. If an undo is requested, users could be presented with a list of revisions, or simply pop the latest revision off the stack. If a command exits in failure state, the user should be prompted to either "Undo" or "Abort," in which case, if "Undo" is selected, changes made during the failed command execution should be reverted to the previous state - "Abort" simply does nothing.

      ***ERROR*** Could not complete action [blah]...
      ? Undo changes from previous command? [Y/n] 

      Scenarios:

      • Master/current branch is ahead of history branch
      • Master/current branch is behind history branch
      • How to handle running in detached state?
      • How to handle rebasing of a branch to avoid merge commits?

      Attachments

        There are no Sub-Tasks for this issue.

        Activity

          People

            jzelenkov Jevgeni Zelenkov (Inactive)
            rhn-support-ihands Ian Hands (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: