aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2012-07-06 12:03:11 +0200
committerJunio C Hamano <gitster@pobox.com>2012-07-06 12:20:46 -0700
commitb1ede9a9f232b1416d1487bba3f69a8e88ec75ee (patch)
tree81a562496a86fba652d12af3aa8cd045424891c6 /contrib
parent64137fd1cfb46db999f9e4740d7a0983da6264fb (diff)
downloadgit-b1ede9a9f232b1416d1487bba3f69a8e88ec75ee.tar.gz
git-b1ede9a9f232b1416d1487bba3f69a8e88ec75ee.tar.xz
git-remote-mediawiki: change return type of get_mw_pages
The previous version was returning the list of pages to be fetched, but we are going to need an efficient membership test (i.e. is the page $title tracked), hence exposing a hash will be more convenient. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki
index 063a978a6..4bf990bd5 100755
--- a/contrib/mw-to-git/git-remote-mediawiki
+++ b/contrib/mw-to-git/git-remote-mediawiki
@@ -379,7 +379,7 @@ sub get_mw_pages {
get_all_mediafiles(\%pages);
}
}
- return values(%pages);
+ return %pages;
}
# usage: $out = run_git("command args");
@@ -536,7 +536,8 @@ my %basetimestamps;
sub get_last_remote_revision {
mw_connect_maybe();
- my @pages = get_mw_pages();
+ my %pages_hash = get_mw_pages();
+ my @pages = values(%pages_hash);
my $max_rev_num = 0;
@@ -802,7 +803,8 @@ sub mw_import_ref {
mw_connect_maybe();
- my @pages = get_mw_pages();
+ my %pages_hash = get_mw_pages();
+ my @pages = values(%pages_hash);
print STDERR "Searching revisions...\n";
my $last_local = get_last_local_revision();