monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] One-step checkouts?


From: Brian Campbell
Subject: Re: [Monotone-devel] One-step checkouts?
Date: Thu, 30 Jun 2005 01:44:47 -0400

I don't think it would be good to simplify these down to one command; that just wouldn't really fit monotone's model. In the current version of monotone, these can be simplified somewhat, and perhaps the docs should be modified to take advantage of this. For instance, I'm pretty sure you don't need to say --key=""; if anonymous reading is permitted, it will default to an empty key, and you can also abbreviate the --db and --branch options.

monotone -d monotone.db db init
monotone -d monotone.db pull venge.net net.venge.monotone
monotone -d monotone.db -b net.venge.monotone co monotone

Not much better, but a little. I think you could then make the simplification that if a database is specified explicitly and it doesn't exist, you could just automatically do a db init on it, which would simplify it down to

monotone -d monotone.db pull venge.net net.venge.monotone
monotone -d monotone.db -b net.venge.monotone co monotone

Another simplification you could make is to default to using a database named "~/.monotone/monotone.db". This probably wouldn't be too unreasonable, as long as you still allowed people to explicitly select a database. At this point, you would have:

monotone pull venge.net net.venge.monotone
monotone -b net.venge.monotone co monotone

At this point, I think you've simplified it down about as much as you can without fundamentally changing the basic model of monotone. Possibly if we move to the new venge.net/monotone syntax for specifying branches, you could infer the name of the directory from the last component of the branch name to simplify it even further, but I'm not sure how important that is. I guess you could take that to an extreme and try to infer the server name from the branch if only the branch was provided, but that would simply not work in so many cases, and may be a security risk, that I don't think it would be a good thing to do.

Having these be two commands helps emphasize to new users the distributed model, in which you separate local commits and updates from syncs, pulls, and pushes over the network. I've found that the two stage commit (committing to the local db and then syncing with a server) causes new users some confusion, but that's really fundamental to the distributed nature of monotone, and so I think it's OK to have them encounter it early when they do their initial pull and checkout.

Anyhow, what do people think of the simplifications I suggested? Are they worth implementing? Would it be too confusing to have dbs magically appear in your .monotone directory?

On Jun 29, 2005, at 10:46 PM, Eric Kidd wrote:

Many thanks to all the Monotone developers for such a cool program! I
hope you won't mind if venture a tiny suggestion.

Monotone makes me very happy, once I get it running.  But it could
make a better first impression if the initial checkout sequence were
shorter, and defaulted a bit better.

Checking out the monotone tree currently requires three steps:

  $ monotone --db=monotone.db db init
$ monotone --db=monotone.db --key="" pull venge.net net.venge.monotone
  $ monotone --db=monotone.db --branch=net.venge.monotone co monotone

Anonymous CVS checkouts take two steps, login and checkout.  But SVN
does a particularly nice job of this:

  $ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/kjs

This produces a local directory named kjs/ containing exactly the source I need.

Is it desirable to have a short "initial checkout" sequence?  And if
so, do people have any thoughts about what syntax to use?

Cheers,
Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]