[darcs-users] Welcome DARCS 2 and DARCS browser
Nicolas Pouillard
nicolas.pouillard at gmail.com
Tue Apr 22 17:15:27 UTC 2008
Excerpts from Jason Dagit's message of Tue Apr 22 18:20:25 +0200 2008:
> On Tue, Apr 22, 2008 at 7:14 AM, Juliusz Chroboczek <
> Juliusz.Chroboczek at pps.jussieu.fr> wrote:
>
> > > There is occasional discussion of creating a "libdarcs", where an API is
> > > given and the programmer is able to use existing darcs functionality
> > through
> > > a library interface.
> >
> > Jason, I've already mentioned it before -- I think it's a horrible idea.
> >
> > Having a library means either having stable APIs, in which case you
> > can no longer improve on code as easily, or library versioning,
> > commonly known as ``DLL hell'' in the Windows world.
> >
> > The clean and flexible way is to have an easily scriptable Darcs.
> > Darcs is fairly scriptable right now -- things like vc-darcs use Darcs
> > as is, with no need to link against a libdarcs.
>
>
> I've never looked at vc-darcs, but how does it handle the case of
> selectively recording a hunk? I believe to satisfy the needs of the
> original poster, hunk selection at record time via a gui would be necessary.
>
> One approach would be to use the current interactive interface of darcs. I
> think this is inherently hard to do. Maybe I'm just bad at it, but I've
> always found programmatically working with an interactive interface is
> hard. Sometimes you mistakenly block waiting to hear from the other process
> and vice versa. This leads to a flaky UI and none of us want that. I find
> that error handling and reporting is usually harder when using the
> subprocess technique.
>
> I was discussing libdarcs vs. subprocess with lelit in #darcs, and he
> proposed that maybe the subprocess approach requires the following changes:
>
> darcs whatsnew --xml
> This now gives you named or indexed hunks.
>
> darcs record --preselected-hunks=1,2,3
> This now takes the names or indexes from whatsnew.
That would be a great addition for a better programmable UI.
However I would suggest rather more robust version:
Imagine that between whatsnew and record, you've changed the sources, then
your indexed hunks would probably be messed up.
Moreover one want to name/index patches not just hunks.
What I propose is to give them hashed names. Then if you have added a new
patch, you will just skip it, and if you have changed some patches you will
get an error and not a possibly bad behavior.
Regards,
--
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080422/aa7b4442/attachment-0001.pgp
More information about the darcs-users
mailing list