[darcs-users] Fwd: Darcs Problems

Stephen J. Turnbull turnbull at sk.tsukuba.ac.jp
Sat Mar 2 06:26:09 UTC 2013

Ganesh Sittampalam writes:
 > With rebase, the workflow for grabbing the hotfix without its
 > dependencies is roughly:
 > pull hotfix (thus grabbing the dependencies too)
 > darcs rebase suspend <hotfix>
 > darcs obliterate <unwanted dependencies>
 > darcs rebase unsuspend <hotfix>
 > <resolve conflicts>
 > darcs amend-record <hotfix>.
 > The downside is that this gives you a patch with a new identity, with no
 > real relationship to the previous hotfix.

As James Sleeman and John Lato point out, sometimes this is pretty
much exactly what you want.

I think it would be a big improvement if the new hotfix' could be
annotated as "exchangeable" with the old hotfix.  Actually exchanging
hotfix for hotfix' (if later you pull in hotfix again) would require
recomputing all dependencies, and you might want to query the user
about disposition of "additional dependencies" specified explicitly by
darcs record.

 > As far as tracking history goes in general, my feeling is that
 > conceptually tags are good enough to represent this, and the main thing
 > we need is good enough UI to make them usable for this purpose.

Agreed.  Most git and hg repos I work with have literally hundreds of
branches and tags.  They rarely get in the way, though.

 > This kind of approach is probably closer to the mercurial philosophy of
 > tracking the original context a change was made in, rather than
 > aggressively cleaning up with rebase.

I take exception to the connotations of "aggressive cleanup". :-)  The
difference is that some people prefer to record *exactly* the fiddling
they did *in order* preserving *all* context, and then reorganize that
history for presentation to others.  That workflow leads to rebasing
and frequent cherry picking.  Others prefer to fiddle until they're
done, then BAM! they record a gem-like patch in exactly the context it

There's no real difference (both clean up their work before pushing),
except for the (usually mostly uninteresting) history of "pre-lunch-
break" and "detour to typo fix" commits, which is preserved in git and
lost by mq.

And some people just tend to work methodically, and are perfectly
happy with doing any necessary fiddling in their heads.  But they're
not an overwhelming majority, even of Mercurial users, as evidenced by
the inclusion of mq as a standard extension.  Note that bzr, with a
similar culture of "unalterable history" advocates has not just one,
but two, extensions for "fiddling 'til you're done".

So I think the correct interpretation is that you do need a way of
cleaning up to serve a significant group of users.  It's possible that
in Darcs the usual interactive record is enough, but the low-level yet
consistent requests for rebase are evidence against that.

More information about the darcs-users mailing list