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 #725

Open
meejah opened this issue May 16, 2023 · 2 comments · May be fixed by #752
Open

Conflict resolution #725

meejah opened this issue May 16, 2023 · 2 comments · May be fixed by #752

Comments

@meejah
Copy link
Collaborator

meejah commented May 16, 2023

Currently, it is possible to detect and produce conflicts. These produce a database entry, are listed by the API and make "conflict" files in the filesystem.

There is not an API to resolve these conflicts. We likely need two:

  • an HTTP API to ask for a particular resolution;
  • and a way to determine from the filesystem a resolution (i.e. by removing the conflict files).

See also #102

@meejah
Copy link
Collaborator Author

meejah commented May 19, 2023

For the filesystem API, I believe the way that worked before is that you would fix up "the" file however you liked, and then delete all the relevant conflict-marker files.

(On a local scan, we could notice this situation: the database says "foo" is conflicted, but there are [no longer] any conflict-markers for it -- so we take all the conflicting remotes, produce a new Snapshot with them as parents etc etc)

@meejah
Copy link
Collaborator Author

meejah commented May 19, 2023

The HTTP API design is somewhat easier: we make an endpoint that declares "here is a resolution for the conflict on foo" -- which I would propose at first takes a single revision, e.g. ours or theirs=participant-name. Then all the content of that Snapshot is considered the resolution.

We could introduce more args (or a different API) extension in the future to allow a more-complex resolution (e.g. "here are the bytes that constitute the resolution").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant