summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-20 18:03:08 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-20 18:03:08 (GMT)
commit8027163652ed32fdc467542fd80bf7056ca4c1fb (patch)
treea13a02921099673e3e2aab50967ae3bcfca732e8
parent8306627ea9d19ee5aa424a50f8d14b670fec1c66 (diff)
downloadSCons-8027163652ed32fdc467542fd80bf7056ca4c1fb.zip
SCons-8027163652ed32fdc467542fd80bf7056ca4c1fb.tar.gz
SCons-8027163652ed32fdc467542fd80bf7056ca4c1fb.tar.bz2
Remove deprecated tool Subversion
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Tool/Subversion.py70
-rw-r--r--src/engine/SCons/Tool/Subversion.xml135
-rw-r--r--src/engine/SCons/Tool/__init__.py2
-rw-r--r--test/Deprecated/SourceCode/Subversion.py186
5 files changed, 1 insertions, 394 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 26018a2..50a5bec 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -30,7 +30,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Fixed SCons.Tool.Packaging.rpm.package source nondeterminism across builds.
From William Deegan:
- - Removed deprecated source code tool CVS, Perforce, BitKeeper, RCS, SCCS.
+ - Removed deprecated tools CVS, Perforce, BitKeeper, RCS, SCCS, Subversion.
From Daniel Moody:
- Fixed msvs.py for Visual Studio generated projects which were
diff --git a/src/engine/SCons/Tool/Subversion.py b/src/engine/SCons/Tool/Subversion.py
deleted file mode 100644
index f1b3708..0000000
--- a/src/engine/SCons/Tool/Subversion.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""SCons.Tool.Subversion.py
-
-Tool-specific initialization for Subversion.
-
-There normally shouldn't be any need to import this module directly.
-It will usually be imported through the generic SCons.Tool.Tool()
-selection method.
-
-"""
-
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-import os.path
-
-import SCons.Action
-import SCons.Builder
-import SCons.Util
-
-def generate(env):
- """Add a Builder factory function and construction variables for
- Subversion to an Environment."""
-
- def SubversionFactory(repos, module='', env=env):
- """ """
- # fail if repos is not an absolute path name?
- import SCons.Warnings as W
- W.warn(W.DeprecatedSourceCodeWarning, """The Subversion() factory is deprecated and there is no replacement.""")
- if module != '':
- module = os.path.join(module, '')
- act = SCons.Action.Action('$SVNCOM', '$SVNCOMSTR')
- return SCons.Builder.Builder(action = act,
- env = env,
- SVNREPOSITORY = repos,
- SVNMODULE = module)
-
- env.Subversion = SubversionFactory
-
- env['SVN'] = 'svn'
- env['SVNFLAGS'] = SCons.Util.CLVar('')
- env['SVNCOM'] = '$SVN $SVNFLAGS cat $SVNREPOSITORY/$SVNMODULE$TARGET > $TARGET'
-
-def exists(env):
- return env.Detect('svn')
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/Subversion.xml b/src/engine/SCons/Tool/Subversion.xml
deleted file mode 100644
index 7c851b5..0000000
--- a/src/engine/SCons/Tool/Subversion.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-__COPYRIGHT__
-
-This file is processed by the bin/SConsDoc.py module.
-See its __doc__ string for a discussion of the format.
--->
-
-<!DOCTYPE sconsdoc [
-<!ENTITY % scons SYSTEM '../../../../doc/scons.mod'>
-%scons;
-<!ENTITY % builders-mod SYSTEM '../../../../doc/generated/builders.mod'>
-%builders-mod;
-<!ENTITY % functions-mod SYSTEM '../../../../doc/generated/functions.mod'>
-%functions-mod;
-<!ENTITY % tools-mod SYSTEM '../../../../doc/generated/tools.mod'>
-%tools-mod;
-<!ENTITY % variables-mod SYSTEM '../../../../doc/generated/variables.mod'>
-%variables-mod;
-]>
-
-<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
-
-<!--
-<tool name="Subversion">
-<summary>
-<para>
-Sets construction variables for interacting with Subversion.
-</para>
-</summary>
-<sets>
-<item>SVN</item>
-<item>SVNFLAGS</item>
-<item>SVNCOM</item>
-</sets>
-<uses>
-<item>SVNCOMSTR</item>
-</uses>
-</tool>
--->
-
-<!--
-<cvar name="SVN">
-<summary>
-<para>
-The Subversion executable (usually named
-<command>svn</command>).
-</para>
-</summary>
-</cvar>
--->
-
-<!--
-<cvar name="SVNCOM">
-<summary>
-<para>
-The command line used to
-fetch source files from a Subversion repository.
-</para>
-</summary>
-</cvar>
--->
-
-<!--
-<cvar name="SVNFLAGS">
-<summary>
-<para>
-General options that are passed to Subversion.
-</para>
-</summary>
-</cvar>
--->
-
-<!--
-<scons_function name="Subversion">
-<arguments signature="global">
-(repository, module)
-</arguments>
-<summary>
-<para>
-A factory function that
-returns a Builder object
-to be used to fetch source files
-from the specified Subversion
-<varname>repository</varname>.
-The returned Builder
-is intended to be passed to the
-&f-link-SourceCode;
-function.
-</para>
-
-<para>
-The optional specified
-<varname>module</varname>
-will be added to the beginning
-of all repository path names;
-this can be used, in essence,
-to strip initial directory names
-from the repository path names,
-so that you only have to
-replicate part of the repository
-directory hierarchy in your
-local build directory.
-</para>
-
-<para>
-This function is deprecated, see the entry for the
-&f-SourceCode;
-function.
-</para>
-
-<para>
-Example:
-</para>
-
-<example_commands>
-# Will fetch foo/bar/src.c
-# from /usr/local/Subversion/foo/bar/src.c.
-env.SourceCode('.', env.Subversion('file:///usr/local/Subversion'))
-
-# Will fetch bar/src.c
-# from /usr/local/Subversion/foo/bar/src.c.
-env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo'))
-
-# Will fetch src.c
-# from /usr/local/Subversion/foo/bar/src.c.
-env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo/bar'))
-</example_commands>
-</summary>
-</scons_function>
--->
-
-</sconsdoc>
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py
index d9fb601..e44ae34 100644
--- a/src/engine/SCons/Tool/__init__.py
+++ b/src/engine/SCons/Tool/__init__.py
@@ -1156,8 +1156,6 @@ def tool_list(platform, env):
'tex', 'latex', 'pdflatex', 'pdftex',
# Archivers
'tar', 'zip',
- # SourceCode factories
- # 'Subversion',
], env)
tools = ([linker, c_compiler, cxx_compiler,
diff --git a/test/Deprecated/SourceCode/Subversion.py b/test/Deprecated/SourceCode/Subversion.py
deleted file mode 100644
index 7ed4b15..0000000
--- a/test/Deprecated/SourceCode/Subversion.py
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-from __future__ import print_function
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test fetching source files from Subversion.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.write('SConscript', """
-Environment(tools = ['Subversion']).Subversion('')
-""")
-
-msg_svn = """The Subversion() factory is deprecated and there is no replacement."""
-warn_svn = test.deprecated_fatal('deprecated-build-dir', msg_svn)
-msg_sc = """SourceCode() has been deprecated and there is no replacement.
-\tIf you need this function, please contact scons-dev@scons.org"""
-warn_sc = test.deprecated_wrap(msg_sc)
-
-svn = test.where_is('svn')
-if not svn:
- test.skip_test("Could not find 'svn'; skipping test(s).\n")
-
-svnadmin = test.where_is('svnadmin')
-if not svn:
- test.skip_test("Could not find 'svnadmin'; skipping test(s).\n")
-
-print("Short-circuiting this test until we support Subversion")
-test.pass_test()
-
-test.subdir('Subversion', 'import', ['import', 'sub'], 'work1', 'work2')
-
-# Set up the Subversion repository.
-svnrootpath = test.workpath('Subversion')
-svnrooturl = 'file://' + svnrootpath
-
-test.run(program = svnadmin, arguments = 'create %s' % svnrootpath)
-
-test.write(['import', 'aaa.in'], "import/aaa.in\n")
-test.write(['import', 'bbb.in'], "import/bbb.in\n")
-test.write(['import', 'ccc.in'], "import/ccc.in\n")
-
-test.write(['import', 'sub', 'SConscript'], """\
-Import("env")
-env.Cat('ddd.out', 'ddd.in')
-env.Cat('eee.out', 'eee.in')
-env.Cat('fff.out', 'fff.in')
-env.Cat('all', ['ddd.out', 'eee.out', 'fff.out'])
-""")
-
-test.write(['import', 'sub', 'ddd.in'], "import/sub/ddd.in\n")
-test.write(['import', 'sub', 'eee.in'], "import/sub/eee.in\n")
-test.write(['import', 'sub', 'fff.in'], "import/sub/fff.in\n")
-
-test.run(chdir = 'import',
- program = svn,
- arguments = 'import %s . foo -m"import foo"' % svnrooturl)
-
-# Test the most straightforward Subversion checkouts, using the module name.
-test.write(['work1', 'SConstruct'], """
-SetOption('warn', 'deprecated-source-code')
-def cat(env, source, target):
- target = str(target[0])
- f = open(target, "wb")
- for src in source:
- f.write(open(str(src), "rb").read())
- f.close()
-env = Environment(BUILDERS={'Cat':Builder(action=cat)})
-env.Cat('aaa.out', 'foo/aaa.in')
-env.Cat('bbb.out', 'foo/bbb.in')
-env.Cat('ccc.out', 'foo/ccc.in')
-env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out'])
-env.SourceCode('.', env.Subversion(r'%s'))
-SConscript('foo/sub/SConscript', "env")
-""" % svnrooturl)
-
-test.subdir(['work1', 'foo'])
-test.write(['work1', 'foo', 'bbb.in'], "work1/foo/bbb.in\n")
-
-test.subdir(['work1', 'foo', 'sub'])
-test.write(['work1', 'foo', 'sub', 'eee.in'], "work1/foo/sub/eee.in\n")
-
-test.run(chdir = 'work1',
- arguments = '.',
- stdout = test.wrap_stdout(read_str = """\
-svn cat %s/foo/sub/SConscript > foo/sub/SConscript
-""" % (svnrooturl),
- build_str = """\
-svn cat %s/foo/aaa.in > foo/aaa.in
-cat("aaa.out", "foo/aaa.in")
-cat("bbb.out", "foo/bbb.in")
-svn cat %s/foo/ccc.in > foo/ccc.in
-cat("ccc.out", "foo/ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
-svn cat %s/foo/sub/ddd.in > foo/sub/ddd.in
-cat("foo/sub/ddd.out", "foo/sub/ddd.in")
-cat("foo/sub/eee.out", "foo/sub/eee.in")
-svn cat %s/foo/sub/fff.in > foo/sub/fff.in
-cat("foo/sub/fff.out", "foo/sub/fff.in")
-cat("foo/sub/all", ["foo/sub/ddd.out", "foo/sub/eee.out", "foo/sub/fff.out"])
-""" % (svnrooturl, svnrooturl, svnrooturl, svnrooturl)))
-
-test.fail_test(test.read(['work1', 'all']) != "import/aaa.in\nwork1/foo/bbb.in\nimport/ccc.in\n")
-
-test.fail_test(test.read(['work1', 'foo', 'sub', 'all']) != "import/sub/ddd.in\nwork1/foo/sub/eee.in\nimport/sub/fff.in\n")
-
-# Test Subversion checkouts when the module name is specified.
-test.write(['work2', 'SConstruct'], """
-SetOption('warn', 'deprecated-source-code')
-def cat(env, source, target):
- target = str(target[0])
- f = open(target, "wb")
- for src in source:
- f.write(open(str(src), "rb").read())
- f.close()
-env = Environment(BUILDERS={'Cat':Builder(action=cat)})
-env.Cat('aaa.out', 'aaa.in')
-env.Cat('bbb.out', 'bbb.in')
-env.Cat('ccc.out', 'ccc.in')
-env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out'])
-env.SourceCode('.', env.Subversion(r'%s', 'foo'))
-SConscript('sub/SConscript', "env")
-""" % svnrooturl)
-
-test.write(['work2', 'bbb.in'], "work2/bbb.in\n")
-
-test.subdir(['work2', 'sub'])
-test.write(['work2', 'sub', 'eee.in'], "work2/sub/eee.in\n")
-
-test.run(chdir = 'work2',
- arguments = '.',
- stdout = test.wrap_stdout(read_str = """\
-svn cat %s/foo/sub/SConscript > sub/SConscript
-""" % (svnrooturl),
- build_str = """\
-svn cat %s/foo/aaa.in > aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
-svn cat %s/foo/ccc.in > ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
-svn cat %s/foo/sub/ddd.in > sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
-svn cat %s/foo/sub/fff.in > sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
-""" % (svnrooturl, svnrooturl, svnrooturl, svnrooturl)))
-
-test.fail_test(test.read(['work2', 'all']) != "import/aaa.in\nwork2/bbb.in\nimport/ccc.in\n")
-
-test.fail_test(test.read(['work2', 'sub', 'all']) != "import/sub/ddd.in\nwork2/sub/eee.in\nimport/sub/fff.in\n")
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4: