[darcs-users] expensive local branching [was: Digital Fountain Codes for Patch Distribution]
Eric Kow
kowey at darcs.net
Thu Nov 20 08:45:32 UTC 2008
On Thu, Nov 20, 2008 at 12:59:26 +0900, Stephen J. Turnbull wrote:
> > What do hg and git do differently that makes their local branching
> > cheaper? Simply because it's done within a single repo, and therefore
> > you only ever have one copy of the working tree?
>
> "Ever" is too strong, but "few workspaces" is important to me, yes,
> though YMMV. Darcs branches are also conceptually expensive because I
> have to decide where to put them, and I have to remember where they
> are when I want to refer to them.
Thanks for clarifying that!
So as I understand it, this being purely a UI issue. We've long valued
the conceptual simplicity of darcs (not introducing too many commands)
over the extra convenience of 'local' branching. This is why we had
marked http://bugs.darcs.net/issue555 as a wont-fix. On the other hand,
I've had a feeling that the clamor for local branches wasn't entirely
unwarranted, and in my experiments with git, do feel that they provide a
certain comfort. Your explanation is pushing me a bit more towards the
side of maybe-will-fix-after-all.
[I've taken the liberty of re-ordering your email by putting this below]
> Darcs could probably implement cheap in-repo branches using the
> existing low-level machinery of dependencies, but it would be a hack
> and would also probably complicate the implementation of the mainline
> branch.
Even simpler than that, one could imagine a wrapper that creates a
separate _darcs directory per branch (say .darcs.master, .darcs.foo,
.darcs.bar) and symlinks the desired branch to _darcs. Switching from
branch to branch is a matter of switching the symlink (I have left out
perhaps the crucial detail of what to do with the working directory).
Exchanging patches between branches could involve creating a temporary
directory, and linking the .darcs directory in. This is a clunky and
non-portable implementation, and I don't mean to suggest that this is
actually how we should do it. But I think it illustrates what my
currently limited understanding of local branching to be, should we
ever commit to implementing something like that.
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081120/d259fa97/attachment.pgp
More information about the darcs-users
mailing list