[darcs-users] Re: Does darcs support FTP? (Yes)

Dave Roberts ldave at droberts.com
Sat Jan 29 19:46:15 UTC 2005


On Sat, 2005-01-29 at 06:28 -0500, David Roundy wrote:
> On Fri, Jan 28, 2005 at 08:41:00PM -0800, Dave Roberts wrote:
> > Given that it looks like it's already calling libcurl, my conclusion is
> > that the problem must be one of:
> 
> Yes, libcurl should be able to handle this.
> 
> > 1. libcurl doesn't like the URL format I'm providing it. I don't think
> > libcurl has a problem here as the documentation seems to suggest that it
> > works just fine with URLs of the format I have supplied.
> > 
> > 2. darcs is maybe messing with the URL before it passes it to libcurl.
> > Does darcs do any more processing on the URL than to simply hand it
> > over? If so, what does it do?
> > 
> > 3. Maybe I'm doing something stupid and have mis-formatted something.
> 
> Can you access the inventory file with curl directly from the command line?
> 
> Trying
> 
> curl ftp://user:passwd@foo.com/repo/_darcs/inventory
> 
> may give a better hint as to what's going wrong.

I'm just using the Windows version of the program that I downloaded per
the Wiki page. It says it has libcurl statically linked to it, so there
is no separate program. In fact, the download was just a single zip file
with darcs.exe in it.

The first question is, does darcs change the URL in any way before
handing it to libcurl, or does it just look for an initial "ftp:" or
"http:" prefix and then hand the whole she-bang to libcurl? If that's
the case, then it looks like a problem with libcurl and I'll have to
debug at that level.

> > Secondly, even on Linux, I'm very unclear as to the role of DARCS_WGET
> > vs. DARCS_GET_FOO. The description of DARCS_WGET says:
> > 
> > "The DARCS_WGET environment variable defines the command that darcs will
> > use when asked to run wget. Note that wget, curl, and libcurl is how
> > darcs accesses repositories whose URL is of the form http://foo.org:foo
> > or ftp://foo.org:foo."
> > 
> > Okay, so exactly when is darcs asked to run wget? I certainly don't ask
> > it to. I just give it a URL. Further, even in this paragraph, it makes
> > no sense. Does DARCS_WGET control a command for wget, specifically, or
> > do I use it to call curl? If so, is it misnamed?
> > 
> > And when I supply either an http:// or ftp:// URL, which environment
> > variable is controlling what happens, DARCS_WGET or DARCS_GET_FOO? They
> > seem to conflict.
> 
> DARCS_GET_FOO is newer, and overrides all other ways of getting foo://xxx
> URLs.  DARCS_WGET is very old, and is only used if libcurl is not compiled
> in, in which case it is used for all URLs.

Okay, that makes more sense, but I'm still a bit confused. You said that
libcurl can be compiled in. If that's the case, what do DARCS_GET_FOO
do? Are they overriding the compiled-in libcurl to go to an outside
program?

Piecing it together, it sounds like the order of things is, first check
for DARCS_GET_FOO and use that; if that's not available, use the
compiled-in libcurl; if that's not available, use DARCS_WGET for
everything. Is that right?

-- 
Dave Roberts <ldave at droberts.com>





More information about the darcs-users mailing list