# HG changeset patch # User osimons # Date 1252702933 0 # Node ID 0c4fec90c8e2fec265128231714a008bb6e21bd6 # Parent 6511c192a957aebfe17412ccb750738c07900f50 0.6dev: Update all tools and docs to use the new `http://bitten.edgewall.org/tools/` namespace as default. Old namespace will still work, but a notice appears when editing config if deprecated namespace is in use. Both will work for now, though. Also added a notice if the configuration is not enabled (easy to forget from edit mode now that 'save' reloads the same page). Closes #445. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ * Slave-only install changed to `./setup.py --without-master install` (or any other valid distribution command). + * Tools namespace changed to `http://bitten.edgewall.org/tools/`. Both new and + old namespace will work, but Admin will issue a deprecation notice when + using the old namespace. + Version 0.6b1 (10 September 2009, from 0.6.x branch) diff --git a/bitten/admin.py b/bitten/admin.py --- a/bitten/admin.py +++ b/bitten/admin.py @@ -160,6 +160,18 @@ for warning in warnings: add_warning(req, warning) + # FIXME: Deprecation notice for old namespace. + # Remove notice code when migration to new namespace is complete + if 'http://bitten.cmlenz.net/tools/' in config.recipe: + add_notice(req, "Recipe uses a deprecated namespace. " + "Replace 'http://bitten.cmlenz.net/tools/' with " + "'http://bitten.edgewall.org/tools/'.") + + # Add a notice if configuration is not active + if not warnings and not config.active and config.recipe: + add_notice(req, "Configuration is not active. Activate " + "from main 'Configurations' listing to enable it.") + # Prepare template variables data['config'] = { 'name': config.name, 'label': config.label or config.name, diff --git a/bitten/slave_tests/recipe.py b/bitten/slave_tests/recipe.py --- a/bitten/slave_tests/recipe.py +++ b/bitten/slave_tests/recipe.py @@ -40,7 +40,7 @@ def test_run_wrong_arg(self): ctxt = Context(self.basedir) try: - ctxt.run(1, 'http://bitten.cmlenz.net/tools/sh', 'exec', {'foo':'bar'}) + ctxt.run(1, 'http://bitten.edgewall.org/tools/sh', 'exec', {'foo':'bar'}) self.fail("InvalidRecipeError expected") except InvalidRecipeError, e: self.failUnless("Unsupported argument 'foo'" in str(e)) diff --git a/bitten/tests/master.py b/bitten/tests/master.py --- a/bitten/tests/master.py +++ b/bitten/tests/master.py @@ -410,7 +410,7 @@ inbody = StringIO(""" - + Doing stuff Ouch that hurt @@ -449,7 +449,7 @@ logs = list(BuildLog.select(self.env, build=build.id, step='foo')) self.assertEqual(1, len(logs)) - self.assertEqual('http://bitten.cmlenz.net/tools/python#unittest', + self.assertEqual('http://bitten.edgewall.org/tools/python#unittest', logs[0].generator) self.assertEqual(2, len(logs[0].messages)) self.assertEqual((u'info', u'Doing stuff'), logs[0].messages[0]) @@ -471,7 +471,7 @@ time="2007-04-01T15:30:00.0000" duration="3.45"> + generator="http://bitten.edgewall.org/tools/python#unittest"> Doing my thing @@ -512,7 +512,7 @@ reports = list(Report.select(self.env, build=build.id, step='foo')) self.assertEqual(1, len(reports)) self.assertEqual('test', reports[0].category) - self.assertEqual('http://bitten.cmlenz.net/tools/python#unittest', + self.assertEqual('http://bitten.edgewall.org/tools/python#unittest', reports[0].generator) self.assertEqual(1, len(reports[0].items)) self.assertEqual({ @@ -615,7 +615,7 @@ inbody = StringIO(""" - + Doing stuff Ouch that hurt @@ -665,7 +665,7 @@ inbody = StringIO(""" - + Doing stuff Ouch that hurt @@ -705,7 +705,7 @@ inbody = StringIO(""" - + This is a step after invalidation """) diff --git a/bitten/upgrades.py b/bitten/upgrades.py --- a/bitten/upgrades.py +++ b/bitten/upgrades.py @@ -245,10 +245,10 @@ messages and report data.""" mapping = { - 'pipe': 'http://bitten.cmlenz.net/tools/sh#pipe', - 'make': 'http://bitten.cmlenz.net/tools/c#make', - 'distutils': 'http://bitten.cmlenz.net/tools/python#distutils', - 'exec_': 'http://bitten.cmlenz.net/tools/python#exec' # Ambigious + 'pipe': 'http://bitten.edgewall.org/tools/sh#pipe', + 'make': 'http://bitten.edgewall.org/tools/c#make', + 'distutils': 'http://bitten.edgewall.org/tools/python#distutils', + 'exec_': 'http://bitten.edgewall.org/tools/python#exec' # Ambigious } cursor = db.cursor() cursor.execute("SELECT id,generator FROM bitten_log " @@ -259,9 +259,9 @@ "WHERE id=%s", (mapping[generator], log_id)) mapping = { - 'unittest': 'http://bitten.cmlenz.net/tools/python#unittest', - 'trace': 'http://bitten.cmlenz.net/tools/python#trace', - 'pylint': 'http://bitten.cmlenz.net/tools/python#pylint' + 'unittest': 'http://bitten.edgewall.org/tools/python#unittest', + 'trace': 'http://bitten.edgewall.org/tools/python#trace', + 'pylint': 'http://bitten.edgewall.org/tools/python#pylint' } cursor.execute("SELECT id,generator FROM bitten_report " "WHERE generator IN (%s)" diff --git a/bitten/util/tests/xmlio.py b/bitten/util/tests/xmlio.py --- a/bitten/util/tests/xmlio.py +++ b/bitten/util/tests/xmlio.py @@ -19,7 +19,7 @@ def test_parse(self): """Tests that simple test data is parsed correctly""" - s = """ + s = """ \ diff --git a/doc/commands.txt b/doc/commands.txt --- a/doc/commands.txt +++ b/doc/commands.txt @@ -80,7 +80,7 @@ A bundle of generic tools that are not specific to any programming language or tool-chain. -:Namespace: ``http://bitten.cmlenz.net/tools/sh`` +:Namespace: ``http://bitten.edgewall.org/tools/sh`` :Common prefix: ``sh`` @@ -152,7 +152,7 @@ These commands provide support for tools commonly used for development of C/C++ applications on Unix platforms, such as ``make``. -:Namespace: ``http://bitten.cmlenz.net/tools/c`` +:Namespace: ``http://bitten.edgewall.org/tools/c`` :Common prefix: ``c`` @@ -165,30 +165,22 @@ Parameters ---------- - :param force: consider all files obsolete - :param install: copy missing auxiliary files - :param symlink: install symbolic links instead of copies - :param warnings: report the warnings falling in CATEGORY - :prepend_include: prepend directories to search path - :include: append directories to search path - - -+--------------+-------------------------------------------------------------+ -| Name | Description | -+==============+=============================================================+ -| ``force`` | Consider all files obsolete | -+--------------+-------------------------------------------------------------+ -| ``install`` | Copy missing auxiliary files | -+--------------+-------------------------------------------------------------+ -| ``symlink`` | Install symbolic links instead of copies | -+--------------+-------------------------------------------------------------+ -| ``warnings`` | Report the warnings related to category | -| | (which can actually be a comma separated list) | -+--------------+-------------------------------------------------------------+ ++----------------------+-----------------------------------------------------+ +| Name | Description | ++======================+=====================================================+ +| ``force`` | Consider all files obsolete | ++----------------------+-----------------------------------------------------+ +| ``install`` | Copy missing auxiliary files | ++----------------------+-----------------------------------------------------+ +| ``symlink`` | Install symbolic links instead of copies | ++----------------------+-----------------------------------------------------+ +| ``warnings`` | Report the warnings related to category | +| | (which can actually be a comma separated list) | ++----------------------+-----------------------------------------------------+ | ``prepend_include`` | Prepend directories to search path | -+--------------+-------------------------------------------------------------+ -| ``include`` | Append directories to search path | -+--------------+-------------------------------------------------------------+ ++----------------------+-----------------------------------------------------+ +| ``include`` | Append directories to search path | ++----------------------+-----------------------------------------------------+ Examples -------- @@ -368,7 +360,7 @@ A bundle of recipe commands that support tools commonly used by Java projects. -:Namespace: ``http://bitten.cmlenz.net/tools/java`` +:Namespace: ``http://bitten.edgewall.org/tools/java`` :Common prefix: ``java`` @@ -489,7 +481,7 @@ A bundle of recipe commands that support tools commonly used by Mono/.NET projects. -:Namespace: ``http://bitten.cmlenz.net/tools/mono`` +:Namespace: ``http://bitten.edgewall.org/tools/mono`` :Common prefix: ``mono`` ---------------- @@ -526,7 +518,7 @@ A bundle of recipe commands for PHP_ projects. -:Namespace: ``http://bitten.cmlenz.net/tools/php`` +:Namespace: ``http://bitten.edgewall.org/tools/php`` :Common prefix: ``php`` .. _php: http://php.net/ @@ -628,7 +620,7 @@ A bundle of recipe commands that support tools commonly used by Python_ projects. -:Namespace: ``http://bitten.cmlenz.net/tools/python`` +:Namespace: ``http://bitten.edgewall.org/tools/python`` :Common prefix: ``python`` .. _python: http://www.python.org/ @@ -874,7 +866,7 @@ .. _subversion: http://subversion.tigris.org/ -:Namespace: ``http://bitten.cmlenz.net/tools/svn`` +:Namespace: ``http://bitten.edgewall.org/tools/svn`` :Common prefix: ``svn`` @@ -1013,7 +1005,7 @@ A collection of recipe commands for XML processing. -:Namespace: ``http://bitten.cmlenz.net/tools/xml`` +:Namespace: ``http://bitten.edgewall.org/tools/xml`` :Common prefix: ``x`` @@ -1064,7 +1056,7 @@ .. _mercurial: http://mercurial.selenic.com/ -:Namespace: ``http://bitten.cmlenz.net/tools/hg`` +:Namespace: ``http://bitten.edgewall.org/tools/hg`` :Common prefix: ``hg`` diff --git a/doc/recipes.txt b/doc/recipes.txt --- a/doc/recipes.txt +++ b/doc/recipes.txt @@ -45,8 +45,8 @@ .. code-block:: xml - +