summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git
diff options
context:
space:
mode:
authorCélestin Matte <celestin.matte@ensimag.fr>2013-06-14 13:50:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-14 16:02:16 (GMT)
commit1aff8c627baf7f313820b5e5629266b48a6e4576 (patch)
tree96f5dc1690d8b99d904206d9892768a10dde9b79 /contrib/mw-to-git
parent6a504a3f45ed2de1922ea486851b49e14eac6108 (diff)
downloadgit-1aff8c627baf7f313820b5e5629266b48a6e4576.zip
git-1aff8c627baf7f313820b5e5629266b48a6e4576.tar.gz
git-1aff8c627baf7f313820b5e5629266b48a6e4576.tar.bz2
git-remote-mediawiki: always end a subroutine with a return
Follow Subroutines::RequireFinalReturn Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git')
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki.perl18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 57f2238..aaaf759 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -187,6 +187,7 @@ sub mw_connect_maybe {
exit 1;
}
}
+ return;
}
sub fatal_mw_error {
@@ -209,6 +210,7 @@ sub fatal_mw_error {
sub get_mw_tracked_pages {
my $pages = shift;
get_mw_page_list(\@tracked_pages, $pages);
+ return;
}
sub get_mw_page_list {
@@ -224,6 +226,7 @@ sub get_mw_page_list {
get_mw_first_pages(\@slice, $pages);
@some_pages = @some_pages[51..$#some_pages];
}
+ return;
}
sub get_mw_tracked_categories {
@@ -246,6 +249,7 @@ sub get_mw_tracked_categories {
$pages->{$page->{title}} = $page;
}
}
+ return;
}
sub get_mw_all_pages {
@@ -262,6 +266,7 @@ sub get_mw_all_pages {
foreach my $page (@{$mw_pages}) {
$pages->{$page->{title}} = $page;
}
+ return;
}
# queries the wiki for a set of pages. Meant to be used within a loop
@@ -289,6 +294,7 @@ sub get_mw_first_pages {
$pages->{$page->{title}} = $page;
}
}
+ return;
}
# Get the list of pages to be fetched according to configuration.
@@ -357,6 +363,7 @@ sub get_all_mediafiles {
foreach my $page (@{$mw_pages}) {
$pages->{$page->{title}} = $page;
}
+ return;
}
sub get_linked_mediafiles {
@@ -403,6 +410,7 @@ sub get_linked_mediafiles {
@titles = @titles[($batch+1)..$#titles];
}
+ return;
}
sub get_mw_mediafile_for_page_revision {
@@ -578,6 +586,7 @@ sub mediawiki_smudge_filename {
sub literal_data {
my ($content) = @_;
print STDOUT "data ", bytes::length($content), "\n", $content;
+ return;
}
sub literal_data_raw {
@@ -588,6 +597,7 @@ sub literal_data_raw {
binmode STDOUT, ":raw";
print STDOUT "data ", bytes::length($content), "\n", $content;
binmode STDOUT, ":encoding(UTF-8)";
+ return;
}
sub mw_capabilities {
@@ -599,6 +609,7 @@ sub mw_capabilities {
print STDOUT "list\n";
print STDOUT "push\n";
print STDOUT "\n";
+ return;
}
sub mw_list {
@@ -607,11 +618,13 @@ sub mw_list {
print STDOUT "? refs/heads/master\n";
print STDOUT "\@refs/heads/master HEAD\n";
print STDOUT "\n";
+ return;
}
sub mw_option {
print STDERR "remote-helper command 'option $_[0]' not yet implemented\n";
print STDOUT "unsupported\n";
+ return;
}
sub fetch_mw_revisions_for_page {
@@ -733,6 +746,7 @@ sub import_file_revision {
print STDOUT "N inline :$n\n";
literal_data("mediawiki_revision: " . $commit{mw_revision});
print STDOUT "\n\n";
+ return;
}
# parse a sequence of
@@ -753,6 +767,7 @@ sub get_more_refs {
die("Invalid command in a '$cmd' batch: ". $_);
}
}
+ return;
}
sub mw_import {
@@ -762,6 +777,7 @@ sub mw_import {
mw_import_ref($ref);
}
print STDOUT "done\n";
+ return;
}
sub mw_import_ref {
@@ -805,6 +821,7 @@ sub mw_import_ref {
# thrown saying that HEAD is referring to unknown object 0000000000000000000
# and the clone fails.
}
+ return;
}
sub mw_import_ref_by_pages {
@@ -1111,6 +1128,7 @@ sub mw_push {
print STDERR " git pull --rebase\n";
print STDERR "\n";
}
+ return;
}
sub mw_push_revision {