[darcs-users] RE: Real-world darcs scenario (was: Win32 build of darcs again)

David Roundy droundy at abridgegame.org
Fri Mar 26 11:34:10 UTC 2004

On Fri, Mar 26, 2004 at 11:13:48AM +0000, libogen . wrote:
> David Roundy droundy at abridgegame.org wrote:
> >If you can get darcs installed on the server system (which may not be
> >easy),
> Only my webhost could do that and I won't bother them for the time being
> on this point.

Without darcs installed on the server, there's no way to push patches to
the server remotely, so it looks like you'll be stuck using the rsync

> >It never occurred to me that ssh would be called anything but ssh! :) You
> >may have more trouble than anticipated, since darcs uses not only ssh, but
> >also scp.  Hopefully there is a nice way to make plink pretend it's scp?
> I tried simply using "SET ssh=D:\path\to\Putty\Plink.exe" and also "SET 
> scp=D:\path\to\Putty\Pscp.exe" but that didn't work.

I'm not sure what "SET" does...

> Even if darcs can be fooled into believing that PuTTY's plink=ssh and 
> pscp=scp, I'm pretty sure that their command line parameters differ.

Fortunately, darcs doesn't use any command line parameters... well, it

ssh [username@]remotehost "cd repo-dir && darcs apply"

so if that doesn't work (and it won't, since darcs isn't on the server),
you've got a problem.

On the scp side, darcs just calls

scp [username@]remotehost:repo-dir/path/to/file tempfile

> >Hmmmm.  My leaning is towards the CVS-style method of configuring ssh,
> >as it's a bit simpler to code, and somehow seems a bit cleaner.  There
> >is already a support for a ~/.darcs/ directory which can be used to
> >configure user-specific defaults (I think it may be documented in the
> >"setpref" section).  But there isn't yet a file for configuring external
> >commands, except those which are configurable by a command-line flag.
> I can't really comment about the benefits of one method over the other
> but I am partial to configuration files ala Apache's httpd.conf & PHP's
> php.ini :-)

Well, the main benefit of environment variables is that you don't have to
define a syntax and then parse that syntax.  When there are *lots* of
options (as in the cases you mentioned), you need a config file.  Where
there are few options, most of which usually don't need to be set, I think
environment variables are nicer.

The third method would be to add command-lines flag to set the ssh and scp
commands.  This would automatically add config file support, since darcs
already supports configuration of default flags passed to commands.  On the
other hand, this is pretty ugly for a flag that will almost certainly only
ever be used on windows.  Unless I were to only add the flag when compiling
on windows...
David Roundy

More information about the darcs-users mailing list