[Buildbot-devel] SVNPoller
Minesh Patel
mpatel at 2wire.com
Wed Oct 4 22:54:05 UTC 2006
Brian,
I just modified the svnpoller.py to use xml parsing and integrated some
of your changes in as well. Attached are the tests that I have written
for the svnpoller along with the actual code. I ran some simple tests
using a local svn repo. Let me know if you see anything out of the ordinary.
Thanks,
Minesh Patel
buildbot-devel-request at lists.sourceforge.net wrote:
> Send Buildbot-devel mailing list submissions to
> buildbot-devel at lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> or, via email, send a message with subject or body 'help' to
> buildbot-devel-request at lists.sourceforge.net
>
> You can reach the person managing the list at
> buildbot-devel-owner at lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Buildbot-devel digest..."
>
>
> Today's Topics:
>
> 1. SVNSource Poller (Minesh Patel)
> 2. Error when building from trunk (Ben Hearsum)
> 3. Re: Error when building from trunk (Brian Warner)
> 4. Re: Reporting Extra Information (Roy S. Rapoport)
> 5. Re: Reporting Extra Information (Brian Warner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 02 Oct 2006 14:50:34 -0700
> From: Minesh Patel <mpatel at 2wire.com>
> Subject: [Buildbot-devel] SVNSource Poller
> To: buildbot-devel at lists.sourceforge.net
> Message-ID: <452189AA.8010304 at 2wire.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Brian,
> I have attached a SVNSource Poller that I just completed that uses
> regular expression matching as opposed to xml parsing. Although I do
> like the xml parsing as it is cleaner. Let me know if you want me to
> modify this patch for xml parsing or modify your poller so we can
> integrate it in. I have also attached some test cases for the one I
> patched. The 'svn info' command doesn't allow xml output for the one
> you patched, you'll have to use regular expression or 'svn log --limit
> 1' command.
>
> Thanks,
> Minesh Patel
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: svnpoller.py
> Type: application/x-python
> Size: 6005 bytes
> Desc: not available
> Url : http://sourceforge.net/mailarchive/forum.php?forum=buildbot-devel/attachments/20061002/097e6208/attachment.bin
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: test_svnpoller.py
> Type: application/x-python
> Size: 6348 bytes
> Desc: not available
> Url : http://sourceforge.net/mailarchive/forum.php?forum=buildbot-devel/attachments/20061002/097e6208/attachment-0001.bin
>
> ------------------------------
>
> Message: 2
> Date: Tue, 03 Oct 2006 11:50:16 -0400
> From: Ben Hearsum <ben.hearsum at senecac.on.ca>
> Subject: [Buildbot-devel] Error when building from trunk
> To: buildbot-devel at lists.sourceforge.net
> Message-ID: <452286B8.1090600 at senecac.on.ca>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I've been working off of trunk for a week or so now and every time I build from that tree I get a warning or error of sorts:
>
> During 'build':
>
> package init file 'buildbot/test/subdir/__init__.py' not found (or not a regular file)
> package init file 'buildbot/test/subdir/__init__.py' not found (or not a regular file)
>
> During 'install':
>
> error: can't copy 'buildbot/test/mail/CVS': doesn't exist or not a regular file
>
> This doesn't seem to cause any problems with the buildbot installation but it's visually annoying ;)
>
>
> - Ben
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 03 Oct 2006 10:23:32 -0700 (PDT)
> From: Brian Warner <warner-buildbot at lothar.com>
> Subject: Re: [Buildbot-devel] Error when building from trunk
> To: Ben Hearsum <ben.hearsum at senecac.on.ca>
> Cc: buildbot-devel at lists.sourceforge.net
> Message-ID: <20061003.102332.32779524.warner at lothar.com>
> Content-Type: text/plain; charset="us-ascii"
>
>
>> I've been working off of trunk for a week or so now and every time I build
>> from that tree I get a warning or error of sorts:
>>
>
> Oops.. good catch. I've just pushed a patch (attached) to fix this.
>
> thanks!
> -Brian
>
> -------------- next part --------------
> Tue Oct 3 10:13:27 PDT 2006 warner at lothar.com
> * setup.py: fix build/install errors involving unit test data files
> diff -rN -u old-misc/setup.py new-misc/setup.py
> --- old-misc/setup.py 2006-10-03 10:22:29.000000000 -0700
> +++ new-misc/setup.py 2006-10-03 10:22:29.000000000 -0700
> @@ -41,7 +41,8 @@
> for f in os.listdir("buildbot/test/mail"):
> if f.endswith("~"):
> continue
> - testmsgs.append("buildbot/test/mail/%s" % f)
> + if f.startswith("msg") or f.startswith("syncmail"):
> + testmsgs.append("buildbot/test/mail/%s" % f)
>
> setup(name="buildbot",
> version=version,
> @@ -71,13 +72,13 @@
> "buildbot.slave",
> "buildbot.scripts",
> "buildbot.test",
> - "buildbot.test.subdir",
> ],
> data_files=[("buildbot", ["buildbot/buildbot.png"]),
> ("buildbot/clients", ["buildbot/clients/debug.glade"]),
> ("buildbot/status", ["buildbot/status/classic.css"]),
> ("buildbot/scripts", ["buildbot/scripts/sample.cfg"]),
> ("buildbot/test/mail", testmsgs),
> + ("buildbot/test/subdir", ["buildbot/test/subdir/emit.py"]),
> ],
> scripts = scripts,
> cmdclass={'install_data': install_data_twisted},
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 3 Oct 2006 10:34:24 -0700
> From: "Roy S. Rapoport" <buildbot-devel at ols.inorganic.org>
> Subject: Re: [Buildbot-devel] Reporting Extra Information
> To: Brian Warner <warner-buildbot at lothar.com>
> Cc: buildbot-devel at lists.sourceforge.net
> Message-ID: <20061003173424.GA27051 at puppy.inorganic.org>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, Sep 30, 2006 at 03:14:02PM -0700, Brian Warner wrote:
>
>> I'd patch buildbot/status/html.py, in StepBox.getBox(), which is where the
>> text for the per-Step boxes is generated.
>>
>> def getBox(self):
>> b = self.original.getBuild()
>> ...
>>
>> That 'b' object provides all the methods described in
>> buildbot.interfaces.IBuildStepStatus . (I would point at the epydoc-generated
>> API reference page here, but it seems to be pretty empty.. I should figure
>> out how to fix that). One of those methods is getTimes(), described here:
>>
>> def getTimes():
>> """Returns a tuple of (start, end). 'start' and 'end' are the times
>> (seconds since the epoch) when the Step started and finished. If the
>> step has not yet started, 'start' will be None. If the step is still
>> running, 'end' will be None."""
>>
>> So you could do something like:
>>
>> start, end = b.getTimes()
>> if start and end: # only show time if the step has actually finished
>> text += "%d secs" % (end - start)
>>
>
> Works great!
>
> Only one problem: This gives me how long the _build_ took (note that it's a
> 'getBuild()' method above :) ), rather than how long each of the steps
> took. Suggestions?
>
> -roy
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 03 Oct 2006 11:30:46 -0700 (PDT)
> From: Brian Warner <warner-buildbot at lothar.com>
> Subject: Re: [Buildbot-devel] Reporting Extra Information
> To: buildbot-devel at ols.inorganic.org
> Cc: buildbot-devel at lists.sourceforge.net
> Message-ID: <20061003.113046.132020209.warner at lothar.com>
> Content-Type: Text/Plain; charset=us-ascii
>
>
>>> start, end = b.getTimes()
>>> if start and end: # only show time if the step has actually finished
>>> text += "%d secs" % (end - start)
>>>
>> Works great!
>>
>> Only one problem: This gives me how long the _build_ took (note that it's a
>> 'getBuild()' method above :) ), rather than how long each of the steps
>> took. Suggestions?
>>
>
> Oops, you're right, I'm getting my Builds and my BuildSteps mixed up. Ignore
> what I said before, try this instead:
>
> In StepBox.getBox(), which is where the text for the per-Step boxes is
> generated, the 'self.original' attribute is an object which implements
> IBuildStepStatus. (self.original.getBuild() returns something that implements
> IBuildStatus, which is of course the overall build, not this particular
> step).
>
> IBuildStepStatus has a getTimes() method which returns (start,end), as
> specified in buildbot/interfaces.py:
>
> def getTimes():
> """Returns a tuple of (start, end). 'start' and 'end' are the times
> (seconds since the epoch) when the Step started and finished. If the
> step has not yet started, 'start' will be None. If the step is still
> running, 'end' will be None."""
>
> (IBuildStatus also has a getTimes() method with the same specification, but
> which indicates the time taken by the overall build).
>
> So you could do something like this inside StepBox.getBox():
>
> step = self.original
> start, end = step.getTimes()
> if start and end: # only show time if the step has actually finished
> text += "%d secs" % (end - start)
>
> Sorry for the confusion :).
>
> -Brian
>
>
>
> ------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ------------------------------
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
> End of Buildbot-devel Digest, Vol 6, Issue 3
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20061004/5602d484/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svnpoller.py
Type: application/x-python
Size: 6695 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20061004/5602d484/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_svnpoller.py
Type: application/x-python
Size: 7097 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20061004/5602d484/attachment-0001.bin>
More information about the devel
mailing list