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

Conflict resolution via filesystem #754

Open
meejah opened this issue Jun 11, 2024 · 2 comments
Open

Conflict resolution via filesystem #754

meejah opened this issue Jun 11, 2024 · 2 comments
Labels
enhancement New feature or request User Story Describes an experience a user can have with the software

Comments

@meejah
Copy link
Collaborator

meejah commented Jun 11, 2024

There is currently no way to resolve a conflict via changes to the filesystem (even after #725 is landed).

We need a specification and documentation as well an implementation (that works alongside the HTTP API introduced in #752).

As a user who has noticed that a file is in conflict, I wish to manipulate the conflicted file to contain the changes I want and finalize this decision by deleting the conflict-marker files.

As a user who has a file in conflict, I will indicate that I want "my" version by deleting all the conflict-markers.

As a user who has a file in conflict, I will indicate that I want "their" version my moving the conflict-marker over top of the original file (and deleting any other conflict markers).

@meejah meejah added enhancement New feature or request User Story Describes an experience a user can have with the software labels Jun 11, 2024
@meejah
Copy link
Collaborator Author

meejah commented Jun 11, 2024

Let us say that we have a file "foo" that starts out with content "initial".

Our side edits it to contain: "meejah was here".
The other side ("yarrow") edits "foo" to contain: "To light a candle is to cast a shadow."

When these two edits collide, our filesystem might look like:

./tiny-texts/
    foo
    foo.conflict-yarrow

To accept Yarrow's edits, we might use the incantation mv foo.conflict-yarrow foo which does two things at once: makes the contents match Yarrow's side, and deletes the conflict-marker files. To make the final result our content, we can invoke rm foo.conflict-yarrow (deleting all the conflict-markers).

For the most-complex case, we can edit "foo" to contain e.g. "Meejah lit a candle and cast a shadow" and then delete the conflict-marker.

@meejah
Copy link
Collaborator Author

meejah commented Jun 11, 2024

The proposal here should work for the examples above: https://github.com/tahoe-lafs/magic-folder/blob/main/docs/proposed/conflict-api.rst#resolve-a-conflict ... so we need an implementation of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request User Story Describes an experience a user can have with the software
Projects
None yet
Development

No branches or pull requests

1 participant