diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-16 18:25:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-16 18:25:06 +0000 |
commit | 7972abc05090180dcc09d2b16af4020ce1cd1841 (patch) | |
tree | 3e6e1c7ca86ab7d4e8dc45009f67403fc489ade9 /dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch | |
parent | e4ad5901ca8464ae513bd315a1c0349c2bd0986c (diff) |
gentoo auto-resync : 16:03:2023 - 18:25:06
Diffstat (limited to 'dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch')
-rw-r--r-- | dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch deleted file mode 100644 index 0ce706db99a6..000000000000 --- a/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch +++ /dev/null @@ -1,46 +0,0 @@ -Searching for pages using the MediaWiki API returns at most 500 results -(hi Patrick). To get a list of all pages in a larger wiki, we need to run -repeated searches... - -Source: https://github.com/moy/Git-Mediawiki/issues/32 -Author: anarcat https://github.com/anarcat - -diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl -index 8dd74a9..f2ce311 100755 ---- a/contrib/mw-to-git/git-remote-mediawiki.perl -+++ b/contrib/mw-to-git/git-remote-mediawiki.perl -@@ -259,16 +259,29 @@ sub get_mw_tracked_categories { - sub get_mw_all_pages { - my $pages = shift; - # No user-provided list, get the list of pages from the API. -- my $mw_pages = $mediawiki->list({ -+ my $query = { - action => 'query', - list => 'allpages', - aplimit => 'max' -- }); -- if (!defined($mw_pages)) { -+ }; -+ my $curpage; -+ my $oldpage = ''; -+ while (1) { -+ if (defined($curpage)) { -+ if ($oldpage eq $curpage) { -+ last; -+ } -+ $query->{apfrom} = $curpage; -+ $oldpage = $curpage; -+ } -+ my $mw_pages = $mediawiki->list($query); -+ if (!defined($mw_pages)) { - fatal_mw_error("get the list of wiki pages"); -- } -- foreach my $page (@{$mw_pages}) { -+ } -+ foreach my $page (@{$mw_pages}) { - $pages->{$page->{title}} = $page; -+ $curpage = $page->{title}; -+ } - } - return; - } |