[Buildbot-devel] [PATCH] Initial cogito support
Brandon Philips
brandon at ifup.org
Thu May 12 06:15:32 UTC 2005
New patch updates for cogito-0.10.
Against 0.64 not my own original patch.
If you want to get it from my git repository you can grab it from
http://ifup.org/~philips/buildbot.git/
Thanks Brian.
-Brandon
On 01:03 Tue 10 May , Brian Warner wrote:
> > Attached is a patch that adds support for the cogito version control
> > system.
>
> Excellent! I'll commit this to CVS.
>
> > http://kernel.org/git/
>
> I'll take a look. I've been learning a lot about the variety of VC systems
> out there this week (reading up on Monotone), so your patch comes at a good
> time.
>
> > I may have fixes and patches in the coming weeks as I am sure something
> > will break between versions of cogito.
>
> Sounds good.
>
> thanks,
> -Brian
diff -r -ut a/buildbot/process/step.py b/buildbot/process/step.py
--- a/buildbot/process/step.py 2005-04-25 18:43:19.000000000 -0700
+++ b/buildbot/process/step.py 2005-05-11 23:10:25.000000000 -0700
@@ -1162,6 +1162,7 @@
self.cmd = LoggedRemoteCommand("svn", self.args)
ShellCommand.start(self, errorMessage)
+
class Darcs(Source):
"""Check out a source tree from a Darcs repository at 'repourl'.
@@ -1190,6 +1191,25 @@
self.cmd = LoggedRemoteCommand("darcs", self.args)
ShellCommand.start(self)
+class Git(Source):
+ """Check out a source tree from a git repository 'repourl'."""
+
+ name = "git"
+
+ def __init__(self, repourl, **kwargs):
+ """
+ @type repourl: string
+ @param repourl: the URL which points at the git repository
+ """
+ Source.__init__(self, **kwargs)
+ self.args['repourl'] = repourl
+
+ def startVC(self):
+ slavever = self.slaveVersion("git")
+ assert slavever, "slave is too old, does not know about git"
+ self.cmd = LoggedRemoteCommand("git", self.args)
+ ShellCommand.start(self)
+
class Arch(Source):
"""Check out a source tree from an Arch repository at 'url'. 'version'
specifies which version number (development line) will be used for the
diff -r -ut a/buildbot/slave/commands.py b/buildbot/slave/commands.py
--- a/buildbot/slave/commands.py 2005-04-26 14:37:16.000000000 -0700
+++ b/buildbot/slave/commands.py 2005-05-11 23:10:25.000000000 -0700
@@ -170,6 +170,8 @@
# self.stdin is handled in ShellCommandPP.connectionMade
+ log.msg("command argv is", argv)
+
self.process = reactor.spawnProcess(self.pp, argv[0], argv,
self.environ,
self.workdir,
@@ -810,6 +812,45 @@
registerSlaveCommand("darcs", Darcs, cvs_ver)
+class Git(SourceBase):
+ """Git specific VC operation. In addition to the arguments
+ handled by SourceBase, this command reads the following keys:
+
+ ['repourl'] (required): the Darcs repository string
+ """
+
+ header = "git operation"
+
+ def setup(self, args):
+ SourceBase.setup(self, args)
+ self.repourl = args['repourl']
+
+ def sourcedirIsUpdateable(self):
+ if os.path.exists(os.path.join(self.builder.basedir,
+ self.srcdir, ".buildbot-patched")):
+ return False
+ return os.path.isdir(os.path.join(self.builder.basedir,
+ self.srcdir, ".git"))
+
+ def doVCUpdate(self):
+ d = os.path.join(self.builder.basedir, self.srcdir)
+ command = ['cg-update']
+ c = ShellCommand(self.builder, command, d,
+ sendRC=False, timeout=self.timeout)
+ self.command = c
+ return c.start()
+
+ def doVCFull(self):
+ d = os.path.join(self.builder.basedir, self.srcdir)
+ os.mkdir(d)
+ command = ['cg-clone', '-s', self.repourl]
+ c = ShellCommand(self.builder, command, d,
+ sendRC=False, timeout=self.timeout)
+ self.command = c
+ return c.start()
+
+registerSlaveCommand("git", Git, cvs_ver)
+
class Arch(SourceBase):
"""Arch-specific (tla-specific) VC operation. In addition to the
arguments handled by SourceBase, this command reads the following keys:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://buildbot.net/pipermail/devel/attachments/20050511/f2ce6f9b/attachment.bin>
More information about the devel
mailing list