Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186546

Change subject: Output number of conflicts
......................................................................

Output number of conflicts

Change-Id: I1e52db4c3bc60ab41cff3f86aa565a99ffc564ef
---
M maintenance/namespaceDupes.php
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/186546/1

diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php
index cbc389b..b7b4e66 100644
--- a/maintenance/namespaceDupes.php
+++ b/maintenance/namespaceDupes.php
@@ -172,14 +172,23 @@
                        return true;
                }
 
+               $resolveableCount = 0;
+
                $ok = true;
                foreach ( $conflicts as $row ) {
                        $resolvable = $this->reportConflict( $row, $suffix );
                        $ok = $ok && $resolvable;
+
+                       if ( $resolvable ) {
+                               $resolveableCount++;
+                       }
+
                        if ( $fix && ( $resolvable || $suffix != '' ) ) {
                                $ok = $this->resolveConflict( $row, 
$resolvable, $suffix ) && $ok;
                        }
                }
+
+               $this->output( "{count( $conflicts )} conflicts. 
{$resolveableCount} are resolveable." );
 
                return $ok;
        }
@@ -260,7 +269,8 @@
                        $row->oldtitle,
                        $newTitle->getNamespace(),
                        $newTitle->getDBkey(),
-                       $newTitle->getPrefixedText() ) );
+                       $newTitle->getPrefixedText() )
+               );
 
                $id = $newTitle->getArticleID();
                if ( $id ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/186546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e52db4c3bc60ab41cff3f86aa565a99ffc564ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to