summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git/t
diff options
context:
space:
mode:
authorLibravatar Matthieu Moy <Matthieu.Moy@imag.fr>2012-07-06 12:03:14 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-06 12:20:46 -0700
commit5a29217dda0625707a46f527d17489c0bff0c2c9 (patch)
treeef332f484bc46a4e3cebe8f600d97ea4ccc212ad /contrib/mw-to-git/t
parentgit-remote-mediawiki: extract revision-importing loop to a function (diff)
downloadtgif-5a29217dda0625707a46f527d17489c0bff0c2c9.tar.xz
git-remote-mediawiki: more efficient 'pull' in the best case
The only way to fetch new revisions from a wiki before this patch was to query each page for new revisions. This is good when tracking a small set of pages on a large wiki, but very inefficient when tracking many pages on a wiki with little activity. Implement a new strategy that queries the wiki for its last global revision, queries each new revision, and filter out pages that are not tracked. Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git/t')
-rwxr-xr-xcontrib/mw-to-git/t/t9364-pull-by-rev.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/mw-to-git/t/t9364-pull-by-rev.sh b/contrib/mw-to-git/t/t9364-pull-by-rev.sh
new file mode 100755
index 0000000000..5c22457a0b
--- /dev/null
+++ b/contrib/mw-to-git/t/t9364-pull-by-rev.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+test_description='Test the Git Mediawiki remote helper: git pull by revision'
+
+. ./test-gitmw-lib.sh
+. ./push-pull-tests.sh
+. $TEST_DIRECTORY/test-lib.sh
+
+test_check_precond
+
+test_expect_success 'configuration' '
+ git config --global mediawiki.fetchStrategy by_rev
+'
+
+test_push_pull
+
+test_done