Problem/Motivation

A generation reports a file somebody edited by hand and stops there. The three ways out of that - take the generated version, keep mine, move it to a subclass - exist as a service and can only be reached from code: there is no administration page yet, and the generation command has nothing to offer but the README. On a deployment, where the generation is a command in a script, a reported conflict is a dead end: the endpoint stops following the model and the only way forward is to edit the file by hand again, which is what caused the conflict in the first place.

Proposed resolution

  • drush myrest:resolve naming a file or an endpoint and one of the answers: take the generated version, keep mine, unfreeze, or print the subclass to write.
  • Taking the generated version prints the difference it is about to lose before it writes, because the answer is irreversible and the command cannot ask.
  • No interactive prompt, for the same reason the generation has none: it has to run unattended.
  • Exit codes of the same shape as the generation: 0 when the conflict was answered, 1 when there is no such file or the answer could not be carried out.

Remaining tasks

Everything.

Issue fork myrest-3623952

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)