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

Josef Svenningsson josef.svenningsson at gmail.com
Fri Dec 5 14:07:06 UTC 2008


On Fri, Dec 5, 2008 at 2:12 PM, Trent W. Buck <trentbuck at gmail.com> wrote:
> On Fri, Dec 05, 2008 at 12:32:03PM +0100, Josef Svenningsson wrote:
>> On Fri, Dec 5, 2008 at 9:26 AM, Eric Kow <kowey at darcs.net> wrote:
>> > On Fri, Dec 05, 2008 at 00:10:42 -0800, Trent W. Buck wrote:
>> >> I propose that the "darcs put" command be hidden until it becomes as
>> >> efficient as "darcs get".  That means it is not listed in "darcs help"
>> >> or in the user manual.
>> >
>> > I have no objections.  Anybody else?
>> >
>>
>> I object.
>>
>> I was the one implementing the infamous put command and the reason
>> that I did it is that it provides for a use case which isn't
>> possible with the other darcs commands afaik (or at least very
>> cumbersome). It goes like this. I have the following setup: a laptop
>> which I use quite a lot for hacking and a server which provides
>> reliable storage and possibility to publish repositories on the
>> web. Now, it's very common that I create a repository on my laptop
>> when I start hacking on a project. After the initial bit of hacking
>> I want to put this repository on the server. Doing this with the get
>> command from the server is highly inconvenient for two
>> reasons. First of all my laptop doesn't have a fixed ip address so I
>> would have to look it up.  Secondly I would have to be able to log
>> in on my laptop via ssh or have a small webserver installed to be
>> able to publish the patches to the server. On linux this is fine
>> since sshd is fairly standard. On Windows otoh this is very
>> inconvenient. So I see the put command as filling a very important
>> niche. Note also that this use case doesn't require put to be that
>> efficient. It's only a very small initial repo that is transfered
>> with put and so its inefficiencies are bearable, at least that's my
>> experience.
>
> I considered that use case, and in my initial post I mentioned that
>
>    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.

> I'd like to minimize the number of visible commands, because new users
> don't know which commands are "important" and which are for "edge
> cases".  If "edge case" commands aren't listed, the user can focus
> more easily on the "important" commands.
>
I'm sympathetic towards the argument that we want to minimize the
number of visible commands. In this particular case though the
symmetry with get is so clear 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.

>> 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.

Josef


More information about the darcs-users mailing list