[darcs-devel] darcs patch: Libwww new API: waitUrl, copyUrlFirst added; copyUrls ...

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Mon Jan 21 17:03:22 UTC 2008


2008/1/21, David Roundy <droundy at darcs.net>:
> Alas, I am now getting segfaults when I do a darcs pull over http with
> libwww.  :(  I get this pretty reliably if I do
>
> darcs get http://darcs.net/repos/unstable
> cd unstable
> darcs obliterate --last 1000 -a
> darcs pull -a
>
> (I've been running these slightly-crazy-length commands to test the
> progress code.)

I will try to reproduce and fix it.
BTW How can i build darcs with debug symbols?

>
> David
>
> On Mon, Jan 21, 2008 at 01:39:51AM +0300, Dmitry Kurochkin wrote:
> > These are changes to libwww API that were discussed earlier:
> >
> >  * copyUrl is async now
> >  * waitUrl function - waiting for given URL
> >  * copyUrlFirst - similar to copyUrl but tries to get URL
> >    as fast as possible
> >  * copyUrls removed
>
> Sounds pretty good.  I hope waitUrl has an implied copyUrlFirst in it? So
> if we forget to call copyUrl, or call it in the wrong order, we won't be
> stuck.

There is no implied copyUrl in waitUrl. We assume that if given URL is
not in inProgress set than it is completed and we return.

I see 2 ways to implement this:
1. Check if file exists. But waitUrl takes only URL and we do not know
which file to check (and what Cachable to use for download).
2. Keep list of all completed URLs. But then we should call waitUrl
for each URL or it would stay in that list forever.

Because of this problems I decided not to do implicit copyUrl.

Regards,
  Dmitry

>
> > Common functionality is moved to URL module. The plan is to
> > implement same API for libcurl.
>
> Sounds good!
>
> Alas, since this code crashes darcs on my computer, it's pretty hard to see
> if it's working properly.  :(
> --
> David Roundy
> Department of Physics
> Oregon State University
> _______________________________________________
> darcs-devel mailing list
> darcs-devel at darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-devel
>


More information about the darcs-devel mailing list