[Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-26 Thread Larry Hastings




 
(Well, okay, not gen-u-ine revision numbers, but an incredible
simulation.)

m7 is a Python script that works as a drop-in replacement for
running monotone directly.  It's known to run on Windows,
Linux, and Mac OS X.  It requires Python 2.3.5 and monotone
0.22.  It is open-source, released under a Zlib-style license.  The
current version is 0.1, the first public release.

Why might you want to use m7? m7 automatically tags
each new revision with a reasonably-unique tag, including a
monotonically increasing number.  Also, anywhere you can specify a
revision id, m7 accepts a shortcut syntax (: followed by
the revision number) to specify one of these tags.  For instance, to
refer to your thirty-fifth local revision, you would just say :35. 
Finally, m7 has a variant of annotate that substitutes
these new abbreviations for the 40-character hex tags (wherever
possible), making it a lot easier to read.

You can read more about it, and download a copy, here:
    http://www.midwinter.com/~lch/programming/m7/

Cheers,


larry



___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Mon, 26 Sep 2005 19:15:26 -0700, Larry 
Hastings <[EMAIL PROTECTED]> said:

larry> You can read more about it, and download a copy, here:
larry> http://www.midwinter.com/~lch/programming/m7/

Looks nice, except for one thing: I wish you would have used a
different cert than the tag one, and I certainly hope noone will
choose to populate the monotone database.  "monotone list tags" will
just not be the same experience (I can already see myself screaming
"GAH!")...

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Larry Hastings




Richard Levitte - VMS Whacker wrote:

  I wish you would have used a different cert than the tag one, and I certainly hope noone will choose to populate the monotone database.  "monotone list tags" will  just not be the same experience (I can already see myself screaming "GAH!")...
  

Well, I agree about not populating net.venge.monotone, simply because m7
is still in its early stages.  Though I do hope people will play with
it in earnest, and I am eating my own dog food.

As far as not using tag certs for the ids, I don't really agree. 
Ignoring the specific argument cited above, are there any other reasons
they shouldn't they be tags?  After all, this revision number
tag that m7 writes out is "a symbolic name given to a
revision", and that's the very definition of a tag cert,
straight out of the monotone documentation.  I see it as
entirely appropriate.

There's also a near-term logistical problem.  Right now, if I used an
arbitrary other cert, I wouldn't be able to easily get a list of them
out of monotone.  Tags I can list with monotone list tags. 
But arbitrary certs are unretrievable unless either you know something
about them (like what revision id they are joined to) or you're willing
to delve into SQL.  Though I'm sure if I whined enough / contributed
code, we could have a nice high-level interface for querying for these
in the next release.

As for not wanting to see untold kajillions of tags, I see that as a
user-interface issue.  The solution is better tools at dealing with
arbitrarily large collections of tags, not telling people "oh, don't
use a tag there! you'll clutter up monotone list tags!"  For
instance, m7 list tags could weed out all tags that conform
loosely to its default tag specification.  Or only show you tags from
the last month, or six months.  Or both.

Cheers,


larry


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 05:45:39 -0700, Larry 
Hastings <[EMAIL PROTECTED]> said:

larry> As far as not using tag certs for the ids, I don't really
larry> agree.  Ignoring the specific argument cited above, are there
larry> any other reasons they /shouldn't/ they be tags?  After all,
larry> this revision number tag that *m7* writes out is "a symbolic
larry> name given to a revision", and that's the very /definition/ of
larry> a tag cert, straight out of the *monotone* documentation.  I
larry> see it as entirely appropriate.

Hmm, maybe this is a question of use case.  I use tags as a symbolic
name given to a revision *to signal an event*, for example to tell
everyone what revision I used to build a specific release (as it's
currently done with monotone itself).  If there are suddenly tags on
*every* *single* *revision*, they immediately lose their value in my
view.

larry> There's also a near-term logistical problem.  Right now, if I
larry> used an arbitrary other cert, I wouldn't be able to easily get
larry> a list of them out of *monotone*.

Hmm, the basic functionality is already there with the selector
c:{certname}[={certvalue}].  So whenever you want to find a specific
revision through a m7 number, the corresponding monotone command would
be this (if you use "my-tag" as cert name):

monotone automate select c:m7-tag=lch:penguin:7

larry> Tags I can list with *monotone list tags*.  But arbitrary certs
larry> are unretrievable unless either you know something about them
larry> (like what revision id they are joined to) or you're willing to
larry> delve into SQL.  Though I'm sure if I whined enough /
larry> contributed code, we could have a nice high-level interface for
larry> querying for these in the next release.

for x in `monotone automate select c:tag='monotree*'`; do monotone list certs 
$x; done

Yes, the output could look nicer, but it shows that it's quite
possible to list arbitrary certs using current monotone commands and a
little bit of filtering.  If you want, I can probably create a quick
perl hack (I need a little more time with Python, as I'm quite a
newbie with that language, still) that outputs arbitrary certs in the
same nice way as "monotone list tags".

larry> As for not wanting to see untold kajillions of tags, I see that
larry> as a user-interface issue.  The solution is better tools at
larry> dealing with arbitrarily large collections of tags, not telling
larry> people "oh, don't use a tag there! you'll clutter up *monotone
larry> list tags*!"  For instance, *m7 list tags* could weed out all
larry> tags that conform loosely to its default tag specification.  Or
larry> only show you tags from the last month, or six months.  Or
larry> both.

OK, I've two (probably more, but these are the ones I can express
right now) problems with that:

1. it makes special cases of tags.  So far, a tag is a tag is a tag.
   What you propose is that a tag is a tag... unless it looks this
   way.
2. it assumes that everyone will use m7, and completely ignores the
   possibility of a mixe environment, where some use monotone directly
   (I've no interest in localised revision numbers, so I'll probably
   be one of those if m7 is used with the monotone repository) while
   others use m7.

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Larry Hastings




Richard Levitte - VMS Whacker wrote:

  for x in `monotone automate select c:tag='monotree*'`; do monotone list certs $x; done
  

Ah, so they could be pulled out of monotone without
resorting to SQL today.  Thanks!  (It would be an O(N) operation, as
compared to an O(1) operation with monotone list tags, but it
should still be fast enough that the user wouldn't notice.)


  1. it makes special cases of tags.  So far, a tag is a tag is a tag.
   What you propose is that a tag is a tag... unless it looks this
   way.
  

I don't see how these tags are "special cases".  My intent was that
they be normal tags, just like any other tag.  The only thing arguably
"special" about them are that

  m7 provides a special command-line shortcut to refer to
them,
  m7 tannotate can recognize and abbreviate them, and
  there are a lot of them.
  

But they work just like normal tags, because they are normal tags.  I
can say monotone cat revision lch:flu:7 if I like, works fine. 
Indeed, m7 currently relies on that fact; the :
shortcut simply gets expandsed into t:$username-$computername-
before it runs monotone.


  2. it assumes that everyone will use m7, and completely ignores the
   possibility of a mixe environment,
  

As with your previous point, I fail to see how this approach "ignore[s]
the possibility of a mixed environment".  There is nothing in m7's
design or implementation that would preclude interoperating with non-m7
users; m7 does nothing that breaks monotone's data
model.  You continue to use monotone directly, and I could
sugarcoat it with m7, and we could push and pull between our
databases without incident.

If you're really just restating your earlier point about "well, but
there'd be a lot more tags now, and that would be inconvenient", then
my reply is again "that's a user interface issue".


Let me be clear: I am hardly opposed to changing these tags to custom
certs.  Indeed, that could offer its own advantages.  But I am curious
about the reaction of the general monotone community.  I am now
well acquainted with Mr. Levitte's opinion; what do the rest of you
think?

Cheers,


larry


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Timothy Brownawell
On Tue, 2005-09-27 at 07:07 -0700, Larry Hastings wrote:
> Let me be clear: I am hardly opposed to changing these tags to custom
> certs.  Indeed, that could offer its own advantages.  But I am curious
> about the reaction of the general monotone community.  I am now well
> acquainted with Mr. Levitte's opinion; what do the rest of you think?

I think it shouldn't be in the same namespace as what we currently use
tags for. Presumably, whichever is used more should be in the 'tag'
certs and the other should get it's own certs (say, 'm7-tag' or
'release' depending on which).

Might be best to put them in 'm7-tag' certs for now, and see if they get
popular enough to switch?

...actually, if we had a convenient way to list arbitrary certs the way
we list tags I think I'd prefer to have releases marked with 'release'
certs, which would leave tags open for using something like this.

Tim




___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 07:07:59 -0700, Larry 
Hastings <[EMAIL PROTECTED]> said:

larry> >1. it makes special cases of tags.  So far, a tag is a tag is
larry> >   a tag.  What you propose is that a tag is a tag... unless
larry> >   it looks this way.
larry> >  
larry> >
larry> I don't see how these tags are "special cases".

Some tag values have special meaning to the program while others
don't.  That's what make those special cases.

larry> But they work just like normal tags, because they are normal tags.

I disagree with that.  From a user's point of view, I don't see them
as normal.

larry> >2. it assumes that everyone will use m7, and completely
larry> >   ignores the possibility of a mixe environment,
larry> >  
larry> >
larry> As with your previous point, I fail to see how this approach
larry> "ignore[s] the possibility of a mixed environment".

This is under the assumption that "m7 list tags" filters the output so
the localised revision number tags aren't shown, which means that
monotone developpers using m7 won't be hit with 3513 (that's how many
revisions there are in my monotone database right now) localised
revision number tags, while those using monotone directly will get
them in their faces (which they probably didn't expect or wanted).
That, to me, is a significant different in user experience, and quite
undesirable.

larry> If you're really just restating your earlier point about "well,
larry> but there'd be a lot more tags now, and that would be
larry> inconvenient", then my reply is again "that's a user interface
larry> issue".

I'm sorry, are you saying that the users should adapt to the program?

OK, sorry for all the blabering.  I'll shut up about this for a while
now.

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 09:48:32 -0500, Timothy 
Brownawell <[EMAIL PROTECTED]> said:

tbrownaw> ...actually, if we had a convenient way to list arbitrary
tbrownaw> certs the way we list tags ...

Is this desirable?  I've no problems create that command, the
questions is only what to call it.  "monotone grep certs"?
"monotone list certs" is already taken, and with a very different
meaning...

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 16:55:28 +0200 (CEST), 
Richard Levitte - VMS Whacker <[EMAIL PROTECTED]> said:

richard> I'm sorry, are you saying that the users should adapt to the program?

My appologies, that's an attack, I admit it and regret it.  Please
ignore it.

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Timothy Brownawell
On Tue, 2005-09-27 at 17:00 +0200, Richard Levitte - VMS Whacker wrote:
> In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 09:48:32 -0500, Timothy 
> Brownawell <[EMAIL PROTECTED]> said:
> 
> tbrownaw> ...actually, if we had a convenient way to list arbitrary
> tbrownaw> certs the way we list tags ...
> 
> Is this desirable?  I've no problems create that command, the
> questions is only what to call it.  "monotone grep certs"?
> "monotone list certs" is already taken, and with a very different
> meaning...

'show', perhaps?

...what'd be nice is to make it take an arbitrary selector, get the
matching revisions, and then output the IDs along with the values for
each (ambiguous?) item in the selector. So,
   mtn show 'c:release/b:*'
would give a list of (ID, 'release' cert value, branch) lines, and
   mtn show 'c:release/b:net.venge.monotone'
would give a list of (ID, 'release' cert value) lines, since all listed
revision would be in the same branch. Maybe printing some lines at the
end, giving the values of selector items that are the same on all the
listed revisions, so this example would have a line "branch:
net.venge.monotone" at the end?

Tim




___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Tue, 27 Sep 2005 10:43:13 -0500, Timothy 
Brownawell <[EMAIL PROTECTED]> said:

tbrownaw> On Tue, 2005-09-27 at 17:00 +0200, Richard Levitte - VMS Whacker 
wrote:
tbrownaw> > Is this desirable?  I've no problems create that command,
tbrownaw> > the questions is only what to call it.  "monotone grep
tbrownaw> > certs"?  "monotone list certs" is already taken, and with
tbrownaw> > a very different meaning...
tbrownaw> 
tbrownaw> 'show', perhaps?

Hmm...  Actually, in that case I'd prefer "show certs" to have the
current functionality of "list certs" and for "list certs" to get new
functionality that's a bit more like "list tags"...  At least, that
would make more linguistic sense to me.

tbrownaw> ...what'd be nice is to make it take an arbitrary selector,
tbrownaw> get the matching revisions, and then output the IDs along
tbrownaw> with the values for each (ambiguous?) item in the selector.
tbrownaw> So,
tbrownaw>mtn show 'c:release/b:*'
tbrownaw> would give a list of (ID, 'release' cert value, branch) lines, and
tbrownaw>mtn show 'c:release/b:net.venge.monotone'
tbrownaw> would give a list of (ID, 'release' cert value) lines, since
tbrownaw> all listed revision would be in the same branch. Maybe
tbrownaw> printing some lines at the end, giving the values of
tbrownaw> selector items that are the same on all the listed
tbrownaw> revisions, so this example would have a line "branch:
tbrownaw> net.venge.monotone" at the end?

I like the ideas.  All it would take would be to rework the selector
parser so it actually feeds back some sensible information for the
layer above to work with...  hmm, easy to say, perhaps not as easy to
do.  It's definitely a bit bigger than "bite-size" :-).  On the other
hand, with Nathaniels proposal for "magic" selectors a little while
ago, we need to rework this part either way, so why not?

I'm up for the task, as long as I'm not expected to have it done by
tomorrow or anything unreasonably quickly, as I'm a bit swamped at
work.

Cheers,
Richard

-
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
-- C.S. Lewis


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Larry Hastings





The people have spoken: m7 should use custom certs, not tags.

Announcing m7 version 0.2!  You can download it at the m7
homepage:
    http://www.midwinter.com/~lch/programming/m7/
And I'm hoping that someone actually will download it,
someday.  Maybe even someday soon.

This change worked out pretty clean.  The custom cert is named m7-db-$username-$computername,
whose value is just the revision number.  This means you could
theoretically populate other people's checkins with local
revision numbers and not worry too overly much about collisions. 
(Though I think that wouldn't be cricket.)

However, it's not all skittles and beer.  Producing the list of
tags with their local revision numbers is a lot slower this way, so now
there's a noticable slowdown before the output of tannotate. 
The price of progress, I guess.

Justin Patrin said:

  Oh, and as for O(1) vs. O(n) I think that's a very false assumption.
True, you're going to start more processes, but monotone itself has to
do internal things [...]

Sure, but it's the per-monotone-process overhead that I was
really speaking to.  I imagine that monotone gets going, it's
mighty quick at culling certs from the database.  If I could do it all
in one invocation of monotone, it would be a hell of a lot
quicker than the N invocations I sometimes must use now.


larry


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Justin Patrin
On 9/27/05, Larry Hastings <[EMAIL PROTECTED]> wrote:
>  Richard Levitte - VMS Whacker wrote:
>  for x in `monotone automate select c:tag='monotree*'`; do monotone list
> certs $x; done
>
>  Ah, so they could be pulled out of monotone without resorting to SQL today.
>  Thanks!  (It would be an O(N) operation, as compared to an O(1) operation
> with monotone list tags, but it should still be fast enough that the user
> wouldn't notice.)
>
>
>  1. it makes special cases of tags. So far, a tag is a tag is a tag.
>  What you propose is that a tag is a tag... unless it looks this
>  way.
>
>  I don't see how these tags are "special cases".  My intent was that they be
> normal tags, just like any other tag.  The only thing arguably "special"
> about them are that
>
>
> m7 provides a special command-line shortcut to refer to them,
> m7 tannotate can recognize and abbreviate them, and
> there are a lot of them.
>  But they work just like normal tags, because they are normal tags.  I can
> say monotone cat revision lch:flu:7 if I like, works fine.  Indeed, m7
> currently relies on that fact; the : shortcut simply gets expandsed
> into t:$username-$computername- before it runs
> monotone.
>
>
>  2. it assumes that everyone will use m7, and completely ignores the
>  possibility of a mixe environment,
>
>  As with your previous point, I fail to see how this approach "ignore[s] the
> possibility of a mixed environment".  There is nothing in m7's design or
> implementation that would preclude interoperating with non-m7 users; m7 does
> nothing that breaks monotone's data model.  You continue to use monotone
> directly, and I could sugarcoat it with m7, and we could push and pull
> between our databases without incident.
>
>  If you're really just restating your earlier point about "well, but there'd
> be a lot more tags now, and that would be inconvenient", then my reply is
> again "that's a user interface issue".
>
>
>  Let me be clear: I am hardly opposed to changing these tags to custom
> certs.  Indeed, that could offer its own advantages.  But I am curious about
> the reaction of the general monotone community.  I am now well acquainted
> with Mr. Levitte's opinion; what do the rest of you think?
>

I agree with Richard. Tags are meant to be used for special cases
where you want to keep track of a set of revisions, such as released
versions. If you add tags which happen for every revision then tags
become far less useful. A revision is a revision, not a tag. Certs
would be much more appropriate for this. As shown it can be
implemented as-is and future additions to monotone can make it easier.

Oh, and as for O(1) vs. O(n) I think that's a very false assumption.
True, you're going to start more processes, but monotone itself has to
do internal things to deal with these commands. Unless you check
monotone's internals for how it handles the commands calling one O(1)
and one O(n) is a misnomer. Likely they're something like O(n)
O(nlogn)

--
Justin Patrin


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] Announcing "m7", a monotone front-end... which adds revision numbers!

2005-09-27 Thread Nathaniel Smith
On Tue, Sep 27, 2005 at 10:40:50AM -0700, Larry Hastings wrote:
>Sure, but it's the per-monotone-process overhead that I was really
>speaking to.  I imagine that monotone gets going, it's mighty quick at
>culling certs from the database.  If I could do it all in one invocation
>of monotone, it would be a hell of a lot quicker than the N invocations I
>sometimes must use now.

See 'automate stdio', 'automate certs', 'automate select'.  ViewMTN
has a python interface to the 'automate stdio' interface.

-- Nathaniel

-- 
Eternity is very long, especially towards the end.
  -- Woody Allen


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel