- Miscellany
- Tuesday, July 10th, 2007 at 6:47:24am MDT
- Index: buildbot/changes/monotone.py
- ===================================================================
- RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/monotone.py,v
- retrieving revision 1.2
- diff -u -r1.2 monotone.py
- --- buildbot/changes/monotone.py 23 Jan 2007 21:04:40 -0000 1.2
- +++ buildbot/changes/monotone.py 10 Jul 2007 12:46:01 -0000
- @@ -3,6 +3,7 @@
- import os
- from cStringIO import StringIO
- +from zope.interface import implements
- from twisted.python import log
- from twisted.application import service
- from twisted.internet import defer, protocol, error, reactor
- @@ -11,6 +12,7 @@
- from buildbot import util
- from buildbot.interfaces import IChangeSource
- from buildbot.changes.changes import Change
- +from buildbot.changes import base
- class _MTProtocol(protocol.ProcessProtocol):
- @@ -73,7 +75,7 @@
- return self._run_monotone(["pull", server, pattern])
- def get_revision(self, rid):
- - return self._run_monotone(["cat", "revision", rid])
- + return self._run_monotone(["automate", "get_revision", rid])
- def get_heads(self, branch, rcfile=""):
- cmd = ["automate", "heads", branch]
- @@ -104,10 +106,11 @@
- depth_arg = ["--last=%i" % (depth,)]
- else:
- depth_arg = []
- - return self._run_monotone(["log", "-r", rev] + depth_arg)
- + return self._run_monotone(["log", "--no-graph", "--from", rev] +
- + depth_arg)
- -class MonotoneSource(service.Service, util.ComparableMixin):
- +class MonotoneSource(base.ChangeSource):
- """This source will poll a monotone server for changes and submit them to
- the change master.
- @@ -123,7 +126,7 @@
- @param monotone_exec: path to monotone executable, defaults to "monotone"
- """
- - __implements__ = IChangeSource, service.Service.__implements__
- + implements(IChangeSource)
- compare_attrs = ["server_addr", "trusted_keys", "db_path",
- "pollinterval", "branch", "monotone_exec"]
- Index: buildbot/slave/commands.py
- ===================================================================
- RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
- retrieving revision 1.83
- diff -u -r1.83 commands.py
- --- buildbot/slave/commands.py 4 Jul 2007 05:52:04 -0000 1.83
- +++ buildbot/slave/commands.py 10 Jul 2007 12:46:06 -0000
- @@ -1648,10 +1648,11 @@
- def _doUpdate(self):
- # update: possible for mode in ('copy', 'update')
- + revision = self.revision or ('h:' + self.branch)
- command = [self.monotone, "update",
- - "-r", self.revision,
- + "-r", revision,
- "-b", self.branch]
- - c = ShellCommand(self.builder, command, self.full_srcdir,
- + c = ShellCommand(self.builder, command, self.builder.basedir,
- sendRC=False, timeout=self.timeout)
- self.command = c
- return c.start()
- @@ -1660,13 +1661,15 @@
- return self._withFreshDb(self._doFull)
- def _doFull(self):
- + revision = self.revision or ('h:' + self.branch)
- command = [self.monotone, "--db=" + self.full_db_path,
- "checkout",
- - "-r", self.revision,
- + "-r", revision,
- "-b", self.branch,
- self.full_srcdir]
- c = ShellCommand(self.builder, command, self.builder.basedir,
- - sendRC=False, timeout=self.timeout)
- + sendRC=False, timeout=self.timeout,
- + keepStdout=True)
- self.command = c
- return c.start()
- Index: buildbot/steps/source.py
- ===================================================================
- RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v
- retrieving revision 1.7
- diff -u -r1.7 source.py
- --- buildbot/steps/source.py 3 Jul 2007 19:17:49 -0000 1.7
- +++ buildbot/steps/source.py 10 Jul 2007 12:46:07 -0000
- @@ -1026,8 +1026,7 @@
- name = "monotone"
- def __init__(self, server_addr, branch, db_path="monotone.db",
- - monotone="monotone",
- - **kwargs):
- + monotone="mtn", **kwargs):
- Source.__init__(self, **kwargs)
- self.addFactoryArguments(server_addr=server_addr,
- branch=branch,
- @@ -1044,9 +1043,11 @@
- return None
- return changes[-1].revision
- - def startVC(self):
- + def startVC(self, branch, revision, patch):
- slavever = self.slaveVersion("monotone")
- assert slavever, "slave is too old, does not know about monotone"
- + self.args['revision'] = revision
- + self.args['patch'] = patch
- cmd = LoggedRemoteCommand("monotone", self.args)
- self.startCommand(cmd)
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.