[darcs-devel] musings about darcs-3

Ben Franksen ben.franksen at online.de
Fri Feb 16 09:51:03 UTC 2018


Today I had a rather revolutionary idea. Feel free to shoot it down in
flames.

The idea is: Since conflicts are the root of all evil, we simply ban
them completely. We throw out conflictors and disallow merging
conflicting patches: all merges must be clean.

When the user pulls from another repo, we apply patches as far as
possible, given the above restriction. When we hit a conflicting patch,
instead of creating a conflictor, we store the conflicting remote patch
(and any others that depend on it) on a newly created local
in-repo-branch. This feature has been inspired by mercurial. Mercurial
cannot automatically commute patches, so it does this whenever two repos
have a diverging history. In darcs we can do better, we have to create a
new branch only in case of a conflict.

Also, unlike mercurial, darcs can automatically keep in-repo branches as
small as possible: new patches added to the repo (by pull or by record)
can be added to all branches (unless they conflict).

Conflict resolution works by editing one of the conflicting patches,
usually using rebase.

We need commands to list branches and to switch from one branch to
another, and we should also have an equivalent of 'hg glog'.

Cheers
Ben



More information about the darcs-devel mailing list