def rmtree_errorhandler(func, path, exc_info):
<EOL>if os.stat(path).st_mode & stat.S_IREAD:<EOL><INDENT>os.chmod(path, stat.S_IWRITE)<EOL>func(path)<EOL>return<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT>
On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.