diff --git a/master/buildbot/process/factory.py b/master/buildbot/process/factory.py index 5578a0332fb..6701e6f9989 100644 --- a/master/buildbot/process/factory.py +++ b/master/buildbot/process/factory.py @@ -19,7 +19,8 @@ from buildbot import interfaces, util from buildbot.process.build import Build from buildbot.process.buildstep import BuildStep -from buildbot.steps.source import CVS, SVN +from buildbot.steps.source.cvs import CVS +from buildbot.steps.source.svn import SVN from buildbot.steps.shell import Configure, Compile, Test, PerlModuleTest # deprecated, use BuildFactory.addStep @@ -166,10 +167,11 @@ def __init__(self, cvsroot, cvsmodule, configure=None, configureEnv={}, compile="make all", test="make check", cvsCopy=False): - mode = "clobber" + mode = "full" + method = "clobber" if cvsCopy: - mode = "copy" - source = CVS(cvsroot=cvsroot, cvsmodule=cvsmodule, mode=mode) + method = "copy" + source = CVS(cvsroot=cvsroot, cvsmodule=cvsmodule, mode=mode, method=method) GNUAutoconf.__init__(self, source, configure=configure, configureEnv=configureEnv, compile=compile, @@ -182,7 +184,7 @@ def __init__(self, cvsroot, cvsmodule, configure=None, configureEnv={}, compile="make all", test="make check", cvsCopy=False): - mode = "update" + mode = "incremental" source = CVS(cvsroot=cvsroot, cvsmodule=cvsmodule, mode=mode) GNUAutoconf.__init__(self, source, configure=configure, configureEnv=configureEnv, @@ -195,7 +197,7 @@ def __init__(self, svnurl, configure=None, configureEnv={}, compile="make all", test="make check"): - source = SVN(svnurl=svnurl, mode="update") + source = SVN(svnurl=svnurl, mode="incremental") GNUAutoconf.__init__(self, source, configure=configure, configureEnv=configureEnv, compile=compile, diff --git a/master/buildbot/steps/source/oldsource.py b/master/buildbot/steps/source/oldsource.py index 4bfe645fc97..a196070842e 100644 --- a/master/buildbot/steps/source/oldsource.py +++ b/master/buildbot/steps/source/oldsource.py @@ -18,11 +18,32 @@ from email.Utils import formatdate from twisted.python import log from twisted.internet import defer +from twisted.python.deprecate import deprecatedModuleAttribute +from twisted.python.versions import Version from zope.interface import implements from buildbot.process.buildstep import RemoteCommand from buildbot.interfaces import BuildSlaveTooOldError, IRenderable from buildbot.steps.source.base import Source +warningString = "The slave-side %s step is deprecated and will be removed in a future version. Please switch to the corresponding master-side step." + + +attributes = { + "Git": "Git", + "Mercurial": "Mercurial", + "CVS": "CVS", + "Subversion": "SVN", + "Darcs": "Darcs", + "Repo": "Repo", + "Bzr": "Bzr", + "Perforce": "P4", + "Monotone": "Monotone"} + +for attr in attributes: + deprecatedModuleAttribute(Version("Buildbot", 0, 8, 9), + warningString %(attr), + "buildbot.steps.source", attributes[attr]) + class _ComputeRepositoryURL(object): implements(IRenderable) diff --git a/master/docs/manual/cfg-buildfactories.rst b/master/docs/manual/cfg-buildfactories.rst index 18c02c0a398..50f993cfaa2 100644 --- a/master/docs/manual/cfg-buildfactories.rst +++ b/master/docs/manual/cfg-buildfactories.rst @@ -177,7 +177,7 @@ BasicBuildFactory .. py:class:: buildbot.process.factory.BasicBuildFactory This is a subclass of :class:`GNUAutoconf` which assumes the source is in CVS, -and uses ``mode='clobber'`` to always build from a clean working copy. +and uses ``mode='full'`` and ``method='clobber'`` to always build from a clean working copy. .. _BasicSVN: @@ -190,7 +190,7 @@ BasicSVN .. py:class:: buildbot.process.factory.BasicSVN -This class is similar to :class:`BasicBuildFactory`, but uses SVN instead of CVS. +This class is similar to :class:`QuickBuildFactory`, but uses SVN instead of CVS. .. _QuickBuildFactory: @@ -204,13 +204,13 @@ QuickBuildFactory .. py:class:: buildbot.process.factory.QuickBuildFactory The :class:`QuickBuildFactory` class is a subclass of :class:`GNUAutoconf` which -assumes the source is in CVS, and uses ``mode='update'`` to get incremental +assumes the source is in CVS, and uses ``mode='incremental'`` to get incremental updates. The difference between a `full build` and a `quick build` is that quick builds are generally done incrementally, starting with the tree where the previous build was performed. That simply means that the -source-checkout step should be given a ``mode='update'`` flag, to +source-checkout step should be given a ``mode='incremental'`` flag, to do the source update in-place. In addition to that, this class sets the :attr:`useProgress` flag to ``False``. diff --git a/master/docs/relnotes/index.rst b/master/docs/relnotes/index.rst index 60a6c8dff0b..5496bb9a906 100644 --- a/master/docs/relnotes/index.rst +++ b/master/docs/relnotes/index.rst @@ -101,6 +101,10 @@ Features * The Git step now uses the `git clean` option `-f` twice, to also remove untracked directories managed by another git repository. See :bb:bug:`2560`. +* The slave-side source steps are deprecated in this version of Buildbot, and master-side support will be removed in a future version. + Please convert any use of slave-side steps (imported directly from ``buildbot.steps.source``, rather than from a specific module like ``buildbot.steps.source.svn``) to use master-side steps. + TODO: update version in deprecation warning. + Deprecations, Removals, and Non-Compatible Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~