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

Dan Pascu dan at ag-projects.com
Sat Dec 6 16:00:23 UTC 2008


On Saturday 06 December 2008, Trent W. Buck wrote:
> On Fri, Dec 05, 2008 at 06:15:34PM +0200, Dan Pascu wrote:
> > This is a very poor user interface. A program should not rely on
> > external shell scripts to do a fundamental operation (like copying a
> > repo in one direction or another). Using the same argument we can
> > remove get altogether since one can darcs init & darcs pull.
>
> That's not the case, because get actually *does* do something more
> than just init + pull.  It handles --lazy and creates the pristine
> tree all at once, rather than "building it up" from the patches.

As I said in the other mail, a lazy put (at least over ssh, where its main 
use case resides) is not feasible as it requires a reverse connection for 
which you may not even have the uri, not to mention credentials. On a 
local file system I do not need put, I can easily use get. Where I need 
put mostly is over ssh, to start a remote repo from a local repo. So in 
this regard (actual implementation), get and put are not exactly 
symmetrical. They are symmetrical as a concept only.

> > Here we disagree. You cannot know how common this use case is. The
> > fact that you never use it doesn't mean none else does.
>
> I do use it.  I just don't do so *commonly*.  Pushing, pulling,
> sending patches, and creating local branches are things I do many
> times every day; uploading a repository to a remote host is something
> I do around thrice per project.

There are many commands I do not use or use seldomly. That is not an 
argument to remove them. If people use put once per project than it has a 
use case. I don't use setpref more than once/twice per project either.

> > darcs has around 35 commands (maybe a bit more in 2.x). Comparing
> > that to other version control systems who have between 75 and over
> > 100, I'd say the user interface is very clean.
>
> Agreed, but that doesn't mean there is no room for improvement.

Removing command symmetry and consistency for the UI is not an improvement 
in my book. Besides what do you gain here? One less command will not make 
a difference in the user perception of the UI, but the lack of symmetry 
will. Following this argument we can remove push, because one can always 
ssh and pull.

> > But removing command symmetry will not make it more user friendly or
> > simpler. People will wonder why they can do an operation but not the
> > opposite operation.
> >
> > IMO put is as important as get. They are 2 sides of a coin. You
> > cannot say put is not important but get is.
>
> If put was efficient -- particularly for local branching -- then I'd
> be more inclined to agree.  The current implementation doesn't do
> anything like get, it is *just* an init and push.  That's why they
> aren't currently symmetrical.

As I already said I do not believe they can ever be fully symmetrical, for 
reasons that one cannot overcome (like the reverse ssh connection).

-- 
Dan


More information about the darcs-users mailing list