]> granicus.if.org Git - git/commitdiff
remote-mediawiki: process namespaces in order
authorAntoine Beaupré <anarcat@debian.org>
Tue, 7 Nov 2017 16:07:00 +0000 (11:07 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Nov 2017 02:06:33 +0000 (11:06 +0900)
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.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/mw-to-git/git-remote-mediawiki.perl

index 0e60b85c8b9ecb6c836840099db3041fe9742179..c9f46359b813b21e1dabd4da425ea4ef37a92018 100755 (executable)
@@ -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;
         if ($local_namespace eq "(Main)") {
             $namespace_id = 0;