[Top][All Lists]

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

Re: [Monotone-devel] Notify script available

From: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] Notify script available
Date: Thu, 31 Mar 2005 14:24:05 +0200 (CEST)

In message <address@hidden> on Thu, 31 Mar 2005 02:23:08 -0800, Nathaniel Smith 
<address@hidden> said:

njs> On Wed, Mar 30, 2005 at 11:18:41PM +0200, Richard Levitte - VMS Whacker 
njs> > Hi,
njs> > 
njs> > I just committed a rough (I mean it, it's not a beauty to
njs> > read!) first version of the change logger I've been thinking
njs> > about for a while.  It's in contrib and is called
njs> > (yes, I hack in Perl...).
njs> Can you explain a bit more what it's exactly doing?  My perl fu
njs> has atrophied, I am afraid...

Basically, it collects information from logs for all current heads,
sorts them chronologically and creates mails for each revision that
hasn't been "treated" before, with complete diffs.

njs> What's it using database variables for?

To keep track of the last revision that has been "treated", so it
doesn't generate the same emails over and over. is designed
to run independently of any pulls or pushes, otherwise your solution
to figure out the leaves before and after a pull is of course a
beautiful solution...

njs> The script I had in mind when adding some of these commands:
njs> #!/bin/sh
njs> # Do a pull, and print out all newly received revisions, in commit
njs> # order
njs> OLD_LEAVES=`monotone --db=foo.db automate leaves`
njs> monotone pull
njs> NEW_LEAVES=`monotone --db=foo.db automate leaves`
njs> (for L in $NEW_LEAVES; do
njs>   monotone --db=foo.db automate ancestry_difference $L $OLD_LEAVES
njs> done) | xargs monotone automate toposort

That looks quite nice, and really solves a major part of my script.  I
can still use those database variables and make the above, just get
OLD_LEAVES in a different manner...

njs> But:
njs>  -- Still need to make it easier to turn a revision id (as spit
njs>     out by the above) into something to look at (new --depth
njs>     argument for 'log'?  'monotone changes <revid>'?)

I would add a few more automates:

        monotone automate log <revid>
        monotone automate changes <revid>

The latter would generate a diff against each ancestor, is if
something like this had been done:

        monotone diff -u --revision=ancestor1 --revision=rev
        monotone diff -u --revision=ancestor2 --revision=rev

As a plus, it could also generate the diff against the [] ancestor if
the requested revision doesn't have any...

njs>  -- Need some way to detect new certs -- things like new
njs>     testresult certs, branch certs, etc., can arrive at any time,
njs>     for pre-existing revisions; currently no way to so simply
njs>     detect them.  Probably need to buckle down and just add a
njs>     hook notified of what's received in netsync...

Hehe, I've been waiting for that conclusion for a while :-).


Please consider sponsoring my work on free software.
See for details.

Richard Levitte                         address@hidden

"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

reply via email to

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