o k`2 @s$ddlZddlmZmZddZdS)N)exception_to_unicodeprinterrc Cs"|ddd|DD]>}|d|fdd|DD]}|ddt|||fq|d |fd d|DD]}|d dt|||fq:q tj|jd }zt|}Wn tydYdSw|rmtd dSzt|WdSty}ztdt |dWYd}~dSd}~ww)zd 1. Zero-pad Subversion revision numbers in the cache. 2. Remove wiki-macros directory. zN SELECT id, value FROM repository WHERE name='repository_dir' cSsg|] \}}|dr|qS)zsvn:) startswith).0iddirr4/usr/lib/python3/dist-packages/trac/upgrades/db26.py szdo_upgrade..z0SELECT DISTINCT rev FROM revision WHERE repos=%scSh|]}|dqSrrrrowrrr zdo_upgrade..zV UPDATE revision SET rev=%s WHERE repos=%s AND rev=%s z%010dz3SELECT DISTINCT rev FROM node_change WHERE repos=%scSr r rr rrr r&rzY UPDATE node_change SET rev=%s WHERE repos=%s AND rev=%s z wiki-macroszWarning: the wiki-macros directory in the environment is non-empty, but Trac doesn't load plugins from there anymore. Please remove it by hand.zwError while removing wiki-macros: %(err)s Trac doesn't load plugins from wiki-macros anymore. Please remove it by hand.)errN) executeintospathjoinlistdirOSErrorrrmdirr)envvercursorrrev wiki_macrosentrieserrr do_upgradesB   r!)rtrac.util.textrrr!rrrr s