Revision: 5899 Author: siebrand Date: 2008-09-16 15:09:00 +0000 (Tue, 16 Sep 2008)
Log Message: ----------- Replace if a file has multiple versions on the local wiki; do not automatically remove it, though.
Modified Paths: -------------- trunk/pywikipedia/nowcommons.py
Modified: trunk/pywikipedia/nowcommons.py =================================================================== --- trunk/pywikipedia/nowcommons.py 2008-09-16 11:50:17 UTC (rev 5898) +++ trunk/pywikipedia/nowcommons.py 2008-09-16 15:09:00 UTC (rev 5899) @@ -288,9 +288,6 @@ commonsImagePage = wikipedia.ImagePage(commons, 'Image:%s' % filenameOnCommons) if localImagePage.titleWithoutNamespace() == commonsImagePage.titleWithoutNamespace() and use_hash: wikipedia.output(u'The local and the commons images have the same name') - if len(localImagePage.getFileVersionHistory()) > 1 and not use_hash: - wikipedia.output(u"This image has a version history. Please delete it manually after making sure that the old versions are not worth keeping.""") - continue if localImagePage.titleWithoutNamespace() != commonsImagePage.titleWithoutNamespace(): usingPages = list(localImagePage.usingPages()) if usingPages and usingPages != [localImagePage]: @@ -322,6 +319,9 @@ if replaceonly == False: if md5 == commonsImagePage.getFileMd5Sum(): wikipedia.output(u'The image is identical to the one on Commons.') + if len(localImagePage.getFileVersionHistory()) > 1 and not use_hash: + wikipedia.output(u"This image has a version history. Please delete it manually after making sure that the old versions are not worth keeping.""") + continue if autonomous == False: wikipedia.output(u'\n\n>>>> Description on \03{lightpurple}%s\03{default} <<<<\n' % page.title()) wikipedia.output(localImagePage.get())
pywikipedia-l@lists.wikimedia.org