Revision: 5523 Author: valhallasw Date: 2008-06-08 11:56:05 +0000 (Sun, 08 Jun 2008)
Log Message: ----------- Added revision marker to comment string
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-06-07 19:01:07 UTC (rev 5522) +++ trunk/pywikipedia/wikipedia.py 2008-06-08 11:56:05 UTC (rev 5523) @@ -135,7 +135,7 @@ # longer needed. locale.setlocale(locale.LC_ALL, '')
-import config, login, query +import config, login, query, version
try: set # introduced in Python2.4: faster and future @@ -1233,7 +1233,8 @@ self.get(force = True, change_edit_time = False) self._editrestriction = False # If no comment is given for the change, use the default - comment = comment or action + comment = comment or action + comment = comment + ' [r' + version.getversiondict()['rev'] + ']' if config.cosmetic_changes and not self.isTalkPage(): old = newtext if not config.cosmetic_changes_mylang_only or (self.site().family.name == config.family and self.site().lang == config.mylang): @@ -5699,7 +5700,6 @@ elif arg == '-nolog': setLogfileStatus(False) elif arg == '-verbose' or arg == "-v": - import version output(u'Pywikipediabot %s' % (version.getversion())) output(u'Python %s' % (sys.version)) verbose += 1 @@ -6286,7 +6286,7 @@ urllib2.install_opener(authenticateURLopener)
if __name__ == '__main__': - import version, doctest + import doctest print 'Pywikipediabot %s' % version.getversion() print 'Python %s' % sys.version doctest.testmod()
pywikipedia-l@lists.wikimedia.org