From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1497018-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 533E515A7D9
	for <garchives@archives.gentoo.org>; Thu, 16 Mar 2023 16:39:34 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 90A78E07B2;
	Thu, 16 Mar 2023 16:39:33 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 4F27EE07B2
	for <gentoo-commits@lists.gentoo.org>; Thu, 16 Mar 2023 16:39:33 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 63D8E33BEFF
	for <gentoo-commits@lists.gentoo.org>; Thu, 16 Mar 2023 16:39:32 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id DDA47888
	for <gentoo-commits@lists.gentoo.org>; Thu, 16 Mar 2023 16:39:30 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1678984753.37305aa8f6bd146c01c41ae9aca55b52c82c5193.robbat2@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch
X-VCS-Directories: dev-vcs/git/files/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: 37305aa8f6bd146c01c41ae9aca55b52c82c5193
X-VCS-Branch: master
Date: Thu, 16 Mar 2023 16:39:30 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 6e9c4d7d-86ac-4134-833d-2808c0cfb482
X-Archives-Hash: 721757a71ca0c6413e733891b6fcc9bc

commit:     37305aa8f6bd146c01c41ae9aca55b52c82c5193
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  8 20:04:55 2023 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 16:39:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37305aa8

dev-vcs/git: cleanup patches

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 .../git/files/git-2.7.0-mediawiki-500pages.patch   | 46 ----------
 .../git/files/git-2.7.0-mediawiki-namespaces.patch | 97 ----------------------
 .../git/files/git-2.7.0-mediawiki-subpages.patch   | 48 -----------
 3 files changed, 191 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;
- }

diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch
deleted file mode 100644
index 72ab2126fa9c..000000000000
--- a/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-source:
-https://gist.github.com/anarcat/f821fa285c6b8b6b16a5
-https://github.com/moy/Git-Mediawiki/issues/10
-
-
-From 147224cfe6143c44b16aec0bb6d6a506a6b96ced Mon Sep 17 00:00:00 2001
-From: Kevin <kevin@ki-ai.org>
-Date: Fri, 28 Aug 2015 15:53:37 -0500
-Subject: [PATCH] Add namespace support to git-mediawiki
-
-Signed-off-by: Kevin <kevin@ki-ai.org>
----
- contrib/mw-to-git/git-remote-mediawiki.perl | 34 +++++++++++++++++++++++++++--
- 1 file changed, 32 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
-index 8dd74a9..662a5b5 100755
---- a/contrib/mw-to-git/git-remote-mediawiki.perl
-+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
-@@ -17,6 +17,7 @@ use Git;
- use Git::Mediawiki qw(clean_filename smudge_filename connect_maybe
- 					EMPTY HTTP_CODE_OK);
- use DateTime::Format::ISO8601;
-+use Scalar::Util;
- use warnings;
- 
- # By default, use UTF-8 to communicate with Git and the user
-@@ -63,6 +64,10 @@ chomp(@tracked_pages);
- my @tracked_categories = split(/[ \n]/, run_git("config --get-all remote.${remotename}.categories"));
- chomp(@tracked_categories);
- 
-+# Just like @tracked_categories, but for MediaWiki namespaces.
-+my @tracked_namespaces = split(/[ \n]/, run_git("config --get-all remote.${remotename}.namespaces"));
-+chomp(@tracked_namespaces);
-+
- # Import media files on pull
- my $import_media = run_git("config --get --bool remote.${remotename}.mediaimport");
- chomp($import_media);
-@@ -256,6 +261,23 @@ sub get_mw_tracked_categories {
- 	return;
- }
- 
-+sub get_mw_tracked_namespaces {
-+    my $pages = shift;
-+    foreach my $local_namespace (@tracked_namespaces) {
-+        my $mw_pages = $mediawiki->list( {
-+            action => 'query',
-+            list => 'allpages',
-+            apnamespace => get_mw_namespace_id($local_namespace),
-+            aplimit => 'max' } )
-+            || die $mediawiki->{error}->{code} . ': '
-+                . $mediawiki->{error}->{details} . "\n";
-+        foreach my $page (@{$mw_pages}) {
-+            $pages->{$page->{title}} = $page;
-+        }
-+    }
-+    return;
-+}
-+
- sub get_mw_all_pages {
- 	my $pages = shift;
- 	# No user-provided list, get the list of pages from the API.
-@@ -319,6 +341,10 @@ sub get_mw_pages {
- 		$user_defined = 1;
- 		get_mw_tracked_categories(\%pages);
- 	}
-+    if (@tracked_namespaces) {
-+        $user_defined = 1;
-+        get_mw_tracked_namespaces(\%pages);
-+    }
- 	if (!$user_defined) {
- 		get_mw_all_pages(\%pages);
- 	}
-@@ -1263,7 +1289,6 @@ my %cached_mw_namespace_id;
- sub get_mw_namespace_id {
- 	$mediawiki = connect_maybe($mediawiki, $remotename, $url);
- 	my $name = shift;
--
- 	if (!exists $namespace_id{$name}) {
- 		# Look at configuration file, if the record for that namespace is
- 		# already cached. Namespaces are stored in form:
-@@ -1331,7 +1356,12 @@ sub get_mw_namespace_id {
- sub get_mw_namespace_id_for_page {
- 	my $namespace = shift;
- 	if ($namespace =~ /^([^:]*):/) {
--		return get_mw_namespace_id($namespace);
-+		my ($ns, $id) = split(/:/, $namespace);
-+		if (Scalar::Util::looks_like_number($id)) {
-+			return get_mw_namespace_id($ns);
-+		} else{
-+			return
-+		}
- 	} else {
- 		return;
- 	}
--- 
-2.5.0

diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch
deleted file mode 100644
index c798a894d3f8..000000000000
--- a/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 2593304723c6def159c10b9060dafa78a775a057 Mon Sep 17 00:00:00 2001
-From: Lyubomyr Shaydariv <lyubomyr-shaydariv@users.noreply.github.com>
-Date: Fri, 11 Sep 2015 00:41:17 +0300
-Subject: [PATCH] git-remote-mediawiki: support subpages as subdirectories
-
-This is a fix for https://github.com/moy/Git-Mediawiki/issues/22
-The subdirectories option is enabled using -c remote.origin.subpageDirs=true
-during the cloning and it is not recommended to be modified in or
-removed from .git/config after the cloning.
----
- contrib/mw-to-git/git-remote-mediawiki.perl | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
-index 8dd74a9..f3624be 100755
---- a/contrib/mw-to-git/git-remote-mediawiki.perl
-+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
-@@ -63,6 +63,11 @@
- my @tracked_categories = split(/[ \n]/, run_git("config --get-all remote.${remotename}.categories"));
- chomp(@tracked_categories);
- 
-+# Use subdirectories for subpages
-+my $use_subpage_dirs = run_git("config --get --bool remote.${remotename}.subpageDirs");
-+chomp($use_subpage_dirs);
-+$use_subpage_dirs = ($use_subpage_dirs eq 'true');
-+
- # Import media files on pull
- my $import_media = run_git("config --get --bool remote.${remotename}.mediaimport");
- chomp($import_media);
-@@ -689,6 +694,9 @@ sub fe_escape_path {
-     $path =~ s/\\/\\\\/g;
-     $path =~ s/"/\\"/g;
-     $path =~ s/\n/\\n/g;
-+    if ($use_subpage_dirs) {
-+        $path =~ s/%2F/\//g;
-+    }
-     return qq("${path}");
- }
- 
-@@ -927,7 +935,7 @@ sub mw_import_revids {
- 		# If this is a revision of the media page for new version
- 		# of a file do one common commit for both file and media page.
- 		# Else do commit only for that page.
--		print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of $commit{title}\n";
-+		print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of ", fe_escape_path($commit{title}), "\n";
- 		import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile);
- 	}
-