https://bugzilla.wikimedia.org/show_bug.cgi?id=63010

            Bug ID: 63010
           Summary: maintenance/importDump.php is unable to import files
                    whose sha1 starts with 0
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Unprioritized
         Component: Maintenance scripts
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: unixway.drive...@gmail.com
       Web browser: ---
   Mobile Platform: ---

Intention:
Migrating some uploads cross the MW instances with full history.

Steps to Reproduce:
$ php maintenance/dumpBackup.php --full --pagelist=filelist --uploads
--include-files > dump.xml
$ php maintenance/importDump.php --uploads < dump.xml

Actual Results:  
Some uploads have one or two history entries missed; for some you can ever get
'filepage-nofile-link' message if the only history entry is missed.


Reproducible: Always

I was able to workaround this monkeypatching includes/Import.php like this:

-                 if ( $sha1 && ( $sha1 !== sha1_file( $source ) ) ) {
+                 if ( $sha1 && ( $sha1 !== ltrim(sha1_file( $source ), '0') )
) {

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to