Thursday, November 10, 2011

Upgraded to Subversion 1.7


If I am asked why you don't like SVN, the evil .svn folders is the answer. With the newly introduced Centralized Metadata Storage, there is only one .svn directory for each project, just like the .git folder in Git repository. Is it time to re-love Subversion? Well, yes and no.

In order to support this new feature, you have to install Eclipse Subclipse plugin 1.8.x. But before that, it's better do a
svn cleanup
for all of your working copies. Although I didn't do it and so far so good, don't risk it.

If you followed this tutorial and installed libsvn-java, please uninstall it. Because at the time of writing, the version of libsvn-java in Ubuntu repository is 1.6.12. When you try to access SVN server, you'll get
Incompatible JavaHL library loaded. 1.7.x or later required.
Follow this to install libsvn-java 1.7.0 and upgrade your working copies with
snv upgrade
Now you have a centralized .svn folder. But don't think you can operate directories and files freely from now on. I use Subclipse 1.8.2 on Eclipse 3.7 SR 1 on Ubuntu 11.10 and found if you delete files and folders directly from file system, the deleted files and folders wouldn't show up in Synchronize view. However, if you add new files and folders, or modify files directly in file system, the plugin will get all the changes.

Even if you delete a folder from Eclipse, and copy a folder with same name but with some changed files, you may get
Could not remove /home/jerry/java/workspace/...
It looks like the metadata fails keeping integrity. I suggest you keep all the folder structure and remove all the files in a folder tree in Eclipse, and copy a whole folder tree with files into project later. Although you may still have following errors, after you refresh project, everything should be fine.
Errors occurred while updating the change sets for SVNStatusSubscriber
org.apache.subversion.javahl.ClientException: SQLite error
svn: database table is locked
svn: database table is locked: WORK_QUEUE

Errors have occurred while calculating the synchronization state for SVNStatusSubscriber.
org.apache.subversion.javahl.ClientException: SQLite error
svn: database table is locked
svn: database table is locked: WC_LOCK

org.apache.subversion.javahl.ClientException: SQLite error
svn: database table is locked
svn: database table is locked: NODES
I summarize my suggestions:
  • always delete files from IDE;
  • if files changed but folder structure remain the same, don't delete folders from IDE



No comments:

Post a Comment