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: Zakirov, Salikh
Subject: RE: [Monotone-devel] One-step checkouts?
Date: Thu, 30 Jun 2005 20:45:02 +0400

Hello, 

I think it would be beneficial to reason based on the user's problem
when we are trying to figure out the best user interface.
As we discuss checking out the sources from the remote database,
the main problem user wants to solve is *source checkout*.
This gives us the first half of the command: "monotone co".

The next question user will ask himself is "where do I get the sources
from?". And the answer is the URL to the netsync server: "venge.net"
Here the issue arises, as this string is visually indistinguishable from
branch names. A possible solution is to make it more URL-like,
e.g. "monotone://venge.net". BTW, branch name could easily added to the
URL without breaking the standard URL syntax, e.g.
"monotone://venge.net/net.venge.monotone".

The last question is "where to put sources to?", and currently monotone
allows to specify directory name explicitly, and defaults to branch
name. Branch names are designed to be globally unique, and this is
rarely needed when creating a local directory. We could simplify it a
bit by defaulting to the last component of the branch name, which tends
to have some meaning if the conventions are followed.

Summing all above, we have a command

    $ monotone co monotone://venge.net/net.venge.monotone

Which should would do following

    $ # guess directory name as the last component of the branch name
    $ monotone setup monotone
    $ # use default database location under MT/
    $ monotone db init monotone/MT/monotone.db
    $ # use anonymous access if no keys are found in the DB
    $ monotone -d monotone/MT/monotone.db --key="" pull venge.net
net.venge.monotone
    $ monotone -d monotone/MT/monotone.db -b net.venge.monotone co
monotone

Note, that the above reasoning ignored the monotone database file
location completely. That's not a coincidence. From the point of view of
the user who is eager to have the sources, it is utterly irrelevant
where to place the database file. Of course, user will be interested in
the database file when he wants to synchronize databases and push
changes, but this moment may come significantly later.

As I've figured out from the numerous posts about best practices of
using Monotone, it is recommended (and is quite convenient, indeed)
to have a single database file for the single project, so I think it
would be reasonable to have default database location under MT/
directory in the workspace.

The above sequence commands will not work, of course, as Monotone will
refuse to overwrite existing directory when checking out, but I hope it
expresses the idea.

Thanks for reading.

P.S. I've just noticed that initial Eric's posting contained essentially
the same command for SVN. I haven't ever used SVN,
and do not know what its syntax is, but it looks like the ideas are
floating in the air :)




reply via email to

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