[darcs-users] Website - New Revision

Stephen J. Turnbull stephen at xemacs.org
Fri Apr 24 10:35:37 UTC 2009


Daniel Carrera writes:

 > For example, in Darcs you don't have to learn about the non-intuitive 
 > concept of a branch having "two heads". This is not simply a UI choice. 

Of course it is.[1]

Something like this could be added to the patch reordering page (not
necessarily by you, Daniel):

    That said, we can also say that because of patch reordering, a
    branch can be characterized by its set of patches (and their
    dependencies), and no head is needed.  So Darcs can also suppress
    the notion of head completely, at the cost of requiring a repo
    copy for every branch.

    Finally, because Darcs *automatically* reorders patches and has no
    way to express the idea of chaining commits into a branch, having
    a way to refer to a branch head is not sufficient to characterize
    a subbranch; you need to specify all the patches, too.  This being
    absurd UI, you end up seeing that it is *desirable* to suppress
    the concept of head.

 > A Darcs branch *cannot* have two heads because of the way patch
 > theory works.

That simply isn't true.  All you need is the idea of a subset of
patches forced to be consistent with any dependencies, and patch
theory will work just fine with multiheaded branches/repos.

 > The reason why Darcs has half as many commands as other SCMs is
 > largely that Darcs has a simpler (and easier to understand) model
 > of a repository.

Not to mention less flexible and horribly inefficient---in *some*
applications, which are arguably YAGNI for *most* people.

But it's also the case that the set of git commands I use or can see a
use-case for is only between 25 and 30 (including a couple of cases
where I think that a command with multiple modes should be counted as
more than one).  So we also have to give David and those who have
worked with him a lot of credit for *designing* the UI well; it's not
totally automatic given the simpler repo.

 > This is largely a result of patch theory.

True.  But the underlying UI choice remains.

    Patch theory is important to the Darcs UI because it made it
    easier to implement the UI, on the one side, and made the simple,
    coherent UI far more attractive than any more flexible
    alternative, on the other.

Footnotes: 
[1]  Note that actually only in Mercurial is the notion of a branch
having two heads made explicit in the UI, although bazaar has it too.
git has no heavyweight notion of a branch in the way that other
systems do.  A git branch is simply a ref that is allowed to be
updated when it is HEAD, and a ref is just a symbolic name for a
commit.



More information about the darcs-users mailing list