monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] [RFC] monotone URIs


From: Chad Walstrom
Subject: Re: [Monotone-devel] [RFC] monotone URIs
Date: Tue, 12 Dec 2006 11:04:06 -0600

Thomas Keller <address@hidden>  wrote:
> Commands which particularily benefit from URIs are push, pull, sync
> and (the upcoming) clone. So how could such an URI look like? A
> simple form like this:
> 
>   $ mtn pull mtn://<host>[:<port>]/<rev-selector>
> [...snip...]
>   $ mtn pull mtn://my.host.net/b:*/!b:foo/!b:bar

It might be useful for URI specification from a web page.  I.e. Being
able to launch a monotone handler from firefox.  I don't think it's
particularily useful from the command-line, given that mtn's selectors
are much richer than a URI specification.  Supporting both might not
be a bad idea, but a monotone-handler for a web server could simply be
a wrapper application.

The one problem you're going to run into as a problem is that
non-alphanumeric characters will all need to be URL encoded, meaning
that:

    $ mtn pull mtn://my.host.net/b:*/!b:foo/!b:bar

for a browser changes into:

    <a href="mtn://my.host.net/b%3A%2A/%21b%3Afoo/%21b%3Abar/">...</a>

Not real pretty.  The monotone-helper could launch mtn for you in an
interactive mode to let you choose your local database, etc.

You could rationalize the "b:" into actual keywords like so:

        
mtn://my.host.net/branch/oh.how.I.like.branches/author/chewie%40wookimus.net

Branch naming still requires you to escape characters, though.
Another example for the branch "project/address@hidden".

        mtn://my.host.net/branch/project%2Fsubproject%23email%40address

So, it gets pretty hairy any way you look at it.  It would certainly
be nice to standardize on a format.  I do think your proposal is
probably the best, given that you could decode the <rev-selector>
portion directly and pass it to mtn -r '<rev-selector>'.


-- 
Chad Walstrom <address@hidden>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */





reply via email to

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