A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20070426/632ec5a1/attachment.py below:

#!/usr/bin/env python from svn import repos, fs, core import sys from StringIO import StringIO from reindent import Reindenter repos_handle = repos.open(sys.argv[1]) fs_handle = repos.fs(repos_handle) txn_handle = fs.open_txn(fs_handle, sys.argv[2]) txn_root = fs.txn_root(txn_handle) interesting_changes = (fs.path_change_add, fs.path_change_replace, fs.path_change_modify) bad = 0 for path, change in fs.paths_changed(txn_root).iteritems(): if not path.endswith('.py'):continue if change.change_kind not in interesting_changes: continue if not change.text_mod: continue content = StringIO() file = fs.file_contents(txn_root, path) while 1: data = core.svn_stream_read(file, 100000) if not data: break content.write(data) content.seek(0) reindenter = Reindenter(content) if reindenter.run(): print >>sys.stderr, "file %s is not whitespace-normalized" % path bad += 1 if bad: sys.exit(1)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4