[darcs-users] darcs patch: Hide the inefficient "darcs put" command.

Trent W. Buck trentbuck at gmail.com
Fri Dec 5 15:26:53 UTC 2008


On Fri, Dec 05, 2008 at 03:07:06PM +0100, Josef Svenningsson wrote:
> >    darcs put x:y
> >
> > amounts to
> >
> >    ssh x darcs init --repodir y
> >    darcs push -a x:y
>
> Right.
>
> > IMO this use case is not common enough to warrant a whole new command
> > just to save one line, particularly since it doesn't NEED to be
> > implemented within darcs -- it can be implemented as a shell function.
>
> Here's where our opinions differ. I don't want to have to script my
> way around this. For me, this *is* a common enough use case.

But you *have* scripted it -- you just used eighty lines of Haskell to
do so instead of three lines of shell.  That it's common for you is an
argument for scripting it in your personal config, rather than
including it upstream (unless it's common for many other users).

> In this particular case though the symmetry with get is so clear

As I stated originally, the current implementation is *not* clearly
symmetrical to get (to me).

> that users actually might start to wonder if put wasn't there in the
> first place. That was the case for me anyway when I started using
> darcs.

Is this a widespread wonder?  I don't think I ever wondered about an
"opposite" of get -- it would be like having a opposite of cp.  IIRC
put actually confused me, because get already operated in both
"directions" (except for remote repos, of course).  I assumed that it
had to do something DIFFICULT, because if it just did what it appeared
to do (i.e. the two-liner above), it wouldn't warrant a separate
command.

> >> Despite its warts I think put should stay and remain documented. It
> >> fills a small but important niche.
> >
> > I suggested hiding it as a compromise.
> > Note that "darcs put --help" will still work.
> >
> Hiding information is a very poor (but sadly rather common) way to try
> to improve user interfaces. If we decide that put is not sufficiently
> important (despite my screaming and kicking) I think it should be
> removed altogether. Having a class of secret, half-hidden commands is
> only going to confuse users in the end.

There are already hidden commands.


More information about the darcs-users mailing list