Reformatting of `RepositoryCache.sync`.
No conversion to `with_transaction`, as this would be too convoluted for now. This will need to wait for ''real'' `with` statement support.
Authored by: cboos 2010-02-15
Parent: [r9184]
Child: [r9186]