{"thread":{"id":"34123","subject":"[PATCH] git-remote-mediawiki: remove hardcoded version number in the test suite","startedAt":"2013-06-13T11:30:08Z","lastAt":"2013-06-13T11:38:18Z","messageCount":2,"participants":["benoit.person@ensimag.fr","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"220713","messageId":"1371123008-28068-1-git-send-email-benoit.person@ensimag.fr","threadId":"34123","inReplyTo":null,"subject":"[PATCH] git-remote-mediawiki: remove hardcoded version number in the test suite","fromName":"","fromEmail":"benoit.person@ensimag.fr","sentAt":"2013-06-13T11:30:08Z","receivedAt":"2013-06-13T11:30:08Z","isPatch":true,"sender":{"key":"benoit.person@ensimag.fr","avatar":null},"body":"From: Benoit Person <benoit.person@ensimag.fr>\n\nUpdates the code to make it more easy to switch mediawiki version when\ntesting. Before that, the version number was partly hardcoded, partly\nin a var.\n\nMaybe I should add a warning that the installation procedure may not work \nin the future ? It seems to work for the range 1.19.X - 1.21.X though :) ?\nShould I also update the version number to the latest one (1.21.1) ?\n\nSigned-off-by: Benoit Person <benoit.person@ensimag.fr>\nSigned-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>\n\n---\n contrib/mw-to-git/t/test-gitmw-lib.sh | 19 ++++++++++---------\n contrib/mw-to-git/t/test.config       |  3 ++-\n 2 files changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh\nindex 3b2cfac..bb76cee 100755\n--- a/contrib/mw-to-git/t/test-gitmw-lib.sh\n+++ b/contrib/mw-to-git/t/test-gitmw-lib.sh\n@@ -336,20 +336,21 @@ wiki_install () {\n \tfi\n \n \t# Fetch MediaWiki's archive if not already present in the TMP directory\n+\tMW_FILENAME=\"mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz\"\n \tcd \"$TMP\"\n-\tif [ ! -f \"$MW_VERSION.tar.gz\" ] ; then\n-\t\techo \"Downloading $MW_VERSION sources ...\"\n-\t\twget \"http://download.wikimedia.org/mediawiki/1.19/mediawiki-1.19.0.tar.gz\" ||\n+\tif [ ! -f $MW_FILENAME ] ; then\n+\t\techo \"Downloading $MW_VERSION_MAJOR.$MW_VERSION_MINOR sources ...\"\n+\t\twget \"http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/$MW_FILENAME\" ||\n \t\t\terror \"Unable to download \"\\\n-\t\t\t\"http://download.wikimedia.org/mediawiki/1.19/\"\\\n-\t\t\t\"mediawiki-1.19.0.tar.gz. \"\\\n+\t\t\t\"http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/\"\\\n+\t\t\t\"$MW_FILENAME. \"\\\n \t\t\t\"Please fix your connection and launch the script again.\"\n-\t\techo \"$MW_VERSION.tar.gz downloaded in `pwd`. \"\\\n+\t\techo \"$MW_FILENAME downloaded in `pwd`. \"\\\n \t\t\t\"You can delete it later if you want.\"\n \telse\n-\t\techo \"Reusing existing $MW_VERSION.tar.gz downloaded in `pwd`.\"\n+\t\techo \"Reusing existing $MW_FILENAME downloaded in `pwd`.\"\n \tfi\n-\tarchive_abs_path=$(pwd)/\"$MW_VERSION.tar.gz\"\n+\tarchive_abs_path=$(pwd)/$MW_FILENAME\n \tcd \"$WIKI_DIR_INST/$WIKI_DIR_NAME/\" ||\n \t\terror \"can't cd to $WIKI_DIR_INST/$WIKI_DIR_NAME/\"\n \ttar xzf \"$archive_abs_path\" --strip-components=1 ||\n@@ -431,5 +432,5 @@ wiki_delete () {\n \t# Delete the wiki's SQLite database\n \trm -f \"$TMP/$DB_FILE\" || error \"Database $TMP/$DB_FILE could not be deleted.\"\n \trm -f \"$FILES_FOLDER/$DB_FILE\"\n-\trm -rf \"$TMP/$MW_VERSION\"\n+\trm -rf \"$TMP/mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz\"\n }\ndiff --git a/contrib/mw-to-git/t/test.config b/contrib/mw-to-git/t/test.config\nindex 958b37b..f835dcc 100644\n--- a/contrib/mw-to-git/t/test.config\n+++ b/contrib/mw-to-git/t/test.config\n@@ -30,6 +30,7 @@ WEB_WWW=$WEB/www\n \n # The variables below are used by the script to install a wiki.\n # You should not modify these unless you are modifying the script itself.\n-MW_VERSION=mediawiki-1.19.0\n+MW_VERSION_MAJOR=1.20\n+MW_VERSION_MINOR=0\n FILES_FOLDER=install-wiki\n DB_INSTALL_SCRIPT=db_install.php\n-- \n1.8.3.GIT\n"},{"id":"220714","messageId":"vpqk3lytf4l.fsf@anie.imag.fr","threadId":"34123","inReplyTo":"1371123008-28068-1-git-send-email-benoit.person@ensimag.fr","subject":"Re: [PATCH] git-remote-mediawiki: remove hardcoded version number in the test suite","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-06-13T11:38:18Z","receivedAt":"2013-06-13T11:38:18Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"benoit.person@ensimag.fr writes:\n\n> Updates the code to make it more easy to switch mediawiki version when\n> testing. Before that, the version number was partly hardcoded, partly\n> in a var.\n\nThis is obviously good.\n\n> Maybe I should add a warning that the installation procedure may not work \n> in the future ? It seems to work for the range 1.19.X - 1.21.X though :) ?\n> Should I also update the version number to the latest one (1.21.1) ?\n\nThis kind of remarks does not belong to the commit message, it should be\nbelow the --- (before the diffstat).\n\nAnd yes, I think a comment saying \"# Versions foo, bar and boz have been\ntested\" or so would be welcome.\n\nThanks,\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}