[Buildbot-devel] source change for sf.net hosted CVS
marnix.klooster at gmail.com
Fri Feb 2 05:52:17 UTC 2007
On 01-02-07 22:56, Mark Pauley wrote:
> Sorry guys, been busy... you know how it is ;)
> I'm still working on the CVSPolledSource merge.
> I'm just hacking through the tests now. Thanks to the p4poller
> tests, think I have a pretty good idea of how to test this sucker.
> One issue I'd like to mention is that CVS is file-centric, that is
> CVS has a different version number for every file.
> Currently, my hack is to just check a repository out to a given
> sandbox location on the master, and perform cvs update on that
> directory, and then examine the logs to get the details.
> I shouldn't need to do this for the tests, all of the data is static,
> but still the solution smells weak and requires something that none
> of the other source change modules require.
> This is not now p4 operates apparently, and I think my method is a
> big fat hacky hack. It works, but it's ugly. Can anyone else think
> of a better way to do this?
I'm not really following this list very closely, so I probably have
missed some discussions around this, but I'm doing something similar
(but outside of python), but simpler (I think). Basically, I call "cvs
-q update" on a locally checked out repository. Non-zero exit code
means something went wrong. If the standard output of the command is
empty there were no changes, otherwise there were, and then you can get
the names of the changed files from that output using "cut -c3-" (i.e.,
strip off the first two characters).
I've been using this in the past for sf.net CVS repositories, and it
worked like a charm for me.
See http://sourceforge.net/mailarchive/message.php?msg_id=15042932 for a
(space-wise mangled) copy of my script.
Hope this helps.
More information about the devel