|
[PATCH] Initial cogito support: msg#00021python.buildbot.devel
Hi Brian, Attached is a patch that adds support for the cogito version control system. This is the system that is beginning to get used by the Linux Kernel development team. More information can be found here: http://kernel.org/git/ I may have fixes and patches in the coming weeks as I am sure something will break between versions of cogito. Thanks, Brandon -- http://osuosl.org --- diff -utr --exclude=.git 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-09 16:17:20.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 -utr --exclude=.git 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-09 16:47:51.000000000 -0700 @@ -810,6 +810,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', 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:
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Transferring files from slaves, was RE: running a command if another fails?: 00021, Nick Trout |
|---|---|
| Next by Date: | Running Shell Commands: 00021, Brandon Philips |
| Previous by Thread: | Transferring files from slaves, was RE: running a command if another fails?i: 00021, Nick Trout |
| Next by Thread: | Re: [PATCH] Initial cogito support: 00021, Brian Warner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |