Re: [PATCH 6/7] remote-mediawiki: process namespaces in order
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 1, 2017, 19:59 UTC
- Message-ID
- <CAPig+cSKxaMkaHMKwRWB716RZ1=yBWFDaWJFFCNa29TUc+rpNQ@mail.gmail.com>
- In-Reply-To
- <20171030025142.19421-7-anarcat@debian.org>
On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré <anarcat@debian.org> wrote:
> Ideally, we'd process them in numeric order since that is more > logical, but we can't do that yet since this is where we find the > numeric identifiers in the first place. Lexicographic order is a good > compromise.
The reader of this commit message is left with the question: Why is this change needed? Is it for the benefit of a human eventually seeing the output? Is it because a subsequent patch requires a certain order?
Show 19 quoted lines
> Signed-off-by: Antoine Beaupré <anarcat@debian.org>
> ---
> contrib/mw-to-git/git-remote-mediawiki.perl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
> index 2c2a7367b..5199af6f6 100755
> --- a/contrib/mw-to-git/git-remote-mediawiki.perl
> +++ b/contrib/mw-to-git/git-remote-mediawiki.perl
> @@ -263,7 +263,7 @@ sub get_mw_tracked_categories {
>
> sub get_mw_tracked_namespaces {
> my $pages = shift;
> - foreach my $local_namespace (@tracked_namespaces) {
> + foreach my $local_namespace (sort @tracked_namespaces) {
> my ($namespace_id, $mw_pages);
> if ($local_namespace eq "(Main)") {
> $namespace_id = 0;
> --