diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2016-01-17 16:34:14 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2016-01-17 16:34:39 +0100 |
commit | 438523a27ff5f43abb14bc5c784038e25333aae2 (patch) | |
tree | 81a092f7f398c3406e3df0965eb6e5b79594cfba /dev-vcs/git | |
parent | dev-python/virtualenv: Backport fix for python3.5 (diff) | |
download | gentoo-438523a27ff5f43abb14bc5c784038e25333aae2.tar.gz gentoo-438523a27ff5f43abb14bc5c784038e25333aae2.tar.bz2 gentoo-438523a27ff5f43abb14bc5c784038e25333aae2.zip |
dev-vcs/git: Add yet another needed MediaWiki patch
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-vcs/git')
-rw-r--r-- | dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch | 46 | ||||
-rw-r--r-- | dev-vcs/git/git-2.7.0-r2.ebuild (renamed from dev-vcs/git/git-2.7.0-r1.ebuild) | 1 | ||||
-rw-r--r-- | dev-vcs/git/git-9999-r1.ebuild | 1 | ||||
-rw-r--r-- | dev-vcs/git/git-9999-r2.ebuild | 1 | ||||
-rw-r--r-- | dev-vcs/git/git-9999-r3.ebuild | 1 | ||||
-rw-r--r-- | dev-vcs/git/git-9999.ebuild | 1 |
6 files changed, 51 insertions, 0 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 new file mode 100644 index 000000000000..0ce706db99a6 --- /dev/null +++ b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch @@ -0,0 +1,46 @@ +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; + } diff --git a/dev-vcs/git/git-2.7.0-r1.ebuild b/dev-vcs/git/git-2.7.0-r2.ebuild index 4148ae49e7df..a8c159be8fe4 100644 --- a/dev-vcs/git/git-2.7.0-r1.ebuild +++ b/dev-vcs/git/git-2.7.0-r2.ebuild @@ -234,6 +234,7 @@ src_prepare() { if use mediawiki-experimental ; then epatch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch epatch "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + epatch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch fi epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild index b414783eff4d..cceeaee798cf 100644 --- a/dev-vcs/git/git-9999-r1.ebuild +++ b/dev-vcs/git/git-9999-r1.ebuild @@ -234,6 +234,7 @@ src_prepare() { if use mediawiki-experimental ; then epatch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch epatch "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + epatch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch fi epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild index 91378e19a3e1..992280ba97a4 100644 --- a/dev-vcs/git/git-9999-r2.ebuild +++ b/dev-vcs/git/git-9999-r2.ebuild @@ -234,6 +234,7 @@ src_prepare() { if use mediawiki-experimental ; then epatch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch epatch "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + epatch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch fi epatch "${FILESDIR}"/${PN}-2.2.0-svn-fe-linking.patch diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild index b9b4d5a65c7f..3aea20c47601 100644 --- a/dev-vcs/git/git-9999-r3.ebuild +++ b/dev-vcs/git/git-9999-r3.ebuild @@ -237,6 +237,7 @@ src_prepare() { if use mediawiki-experimental ; then epatch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch epatch "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + epatch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch fi epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild index 18fa6195d5e7..d3344ac4e72a 100644 --- a/dev-vcs/git/git-9999.ebuild +++ b/dev-vcs/git/git-9999.ebuild @@ -234,6 +234,7 @@ src_prepare() { if use mediawiki-experimental ; then epatch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch epatch "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + epatch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch fi epatch "${FILESDIR}"/${PN}-2.2.0-svn-fe-linking.patch |