monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Adding a keyword certificate


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Adding a keyword certificate
Date: Sun, 2 Jan 2005 17:22:34 -0800
User-agent: Mutt/1.5.6+20040907i

On Sun, Jan 02, 2005 at 12:41:05PM +0100, Julio M. Merino Vidal wrote:
> I think it could be nice to have this in monotone. So I've locally added
> basic support for this, which has been really easy:
> - Add a command, named "keyword", that adds a keyword certificate to a
>   given revision.  (The name may not be very fortunate since it's not
>   a verb... but well.)  This is very similar to 'comment'.
> - Add support for a 'k:<something>' selector that matches revisions based
>   on their keyword certificates.
> - Make the 'log' command show keywords attached to revisions.
> 
> Do you think this is interesting and worth adding?

ObNjs: And of course you're writing tests for all these new commands,
right? ;-)

I was going to say "yes", but then I thought about it a bit more, and
I think there's actually something a bit better we can do.  The
problem is that there are actually lots of sorts of ways one might
want to annotate revisions, and interact with those annotations;
keywords are useful for some projects, but not others, and some people
might want distinct types of certs that act as keywords along
different dimensions, etc.  (Even with this, 'keyword' is basically
exactly the same as 'tag', just with some different implied policy.)

So what if instead we:
 - leave out the command, typing 'cert <rev> keyword <word>' is not
   substantially an improvement over typing 'keyword <rev> word>'
 - add support for a 'c:<certname>=<value>' selector, so your k: is
   spelled c:keyword=.  (I think the selector expansion hook can even
   let you teach monotone to make this replacement itself?)
 - umm... I'm not sure what to do about log.  There was some proposal
   about adding different levels of verbosity to log; maybe the most
   verbose level should list all unknown certs or something?

Then people can play around and find out what's actually useful in
practice, define policies for their own projects, and if some of those
policies turn out to be brilliant things that every Monotone user
wants then we can fold them in?

> Now, I'm looking for a way to search for these revisions.  The 'complete
> revision' command seems to be what I'm looking for, but it doesn't work
> with selectors.  Should it?  If not, we could add a 'search' command that,
> given a selector, shows all matching revisions in a friendly format
> (similar to 'log').
> 
> What about this?

Sounds good to me.  Might want to expand it later to allow more
powerful searches, we have SQL underneath afterall, but hey,
incremental development is great.

-- Nathaniel

-- 
Damn the Solar System.  Bad light; planets too distant; pestered with
comets; feeble contrivance; could make a better one myself.
  -- Lord Jeffrey




reply via email to

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