Today I’m sharing a new take on fixing bloated SVN-based OmegaT team projects.
When OmegaT hit version 4, a new format for team projects was introduced. It enabled having different parts of the project at different remote repositories, thanks to OmegaT’s mapping functionality by which it mirrors all the mapped files and folders locally, and then uses downloaded resources to deploy a standard OmegaT project quite similar to what was used in version 3 and before.
At the same time most of the SVN-related scripts quit working in v.4, and if a user needed to clean up a team project where project_save.tmx
is synced with an SVN server, they had to use third-party tools or redownload the project afresh, because there’s a bloat problem with SVN.
To make it ever worse, in v. 4 those local working copies are located in a folder named .repositories
(with a dot in front, meaning it’s hidden on UNIX-like and UNIX-based systems), and if there are a few repositories mapped, finding what to cleanup might become a frustrating task.
I reworked the old SVN - Cleanup
in such a way that now it runs on the current project and looks recursively for folder(s) with a subfolder named .svn
, and performs SVN cleanup on them using the same library OmegaT uses, thus eliminating the need for third-party tools (at least, for this routine procedure). If no project is loaded, it lets the user select a folder where local working copies will be looked for, and cleaned up when found. As it finishes, it gives a detailed report as to what folders have been processed, in the Scripting window, and puts up a brief note about total number of folders that were cleaned up. 0 (zero) means no local working copies were found in the project or the folder specified.
This new script can be download from SF.net: http://tinyurl.com/yaqhb9fn. Make sure that the svn_cleanup_selected.properties
file is copied along with svn_cleanup_selected.groovy
either to the same folder, or to subfolder properties
(as in the linked archive). The script is named the same as the one bundled with OmegaT, so if the program is run with a localized GUI, and the old script was translated into that language, svn_cleanup_selected_LOCALE.properties
will have to be deleted.
UPDATE: After OmegaT 4.1.2_2 or newer is released, there’s no need to download this script from Sourceforge. It will be bundled with OmegaT.
Any comments, questions and suggestions are always appreciated.