Skip to content

Commit

Permalink
Merge branch 'deprecation-warnings' of git://github.com/srinupiits/bu…
Browse files Browse the repository at this point in the history
…ildbot
  • Loading branch information
djmitche committed Sep 19, 2013
2 parents 9c83ab5 + 78e22ce commit 4da6be6
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
14 changes: 8 additions & 6 deletions master/buildbot/process/factory.py
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
21 changes: 21 additions & 0 deletions master/buildbot/steps/source/oldsource.py
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions master/docs/manual/cfg-buildfactories.rst
Expand Up @@ -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:

Expand All @@ -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:

Expand All @@ -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``.
Expand Down
4 changes: 4 additions & 0 deletions master/docs/relnotes/index.rst
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 4da6be6

Please sign in to comment.