Switch to side-by-side view

--- a/ForgeSVN/forgesvn/svn_main.py
+++ b/ForgeSVN/forgesvn/svn_main.py
@@ -2,6 +2,7 @@
 import logging
 import re
 import sys
+import shutil
 from subprocess import Popen
 
 # Non-stdlib imports
@@ -64,7 +65,6 @@
     def install(self, project):
         'Set up any default permissions and roles here'
         self.config.options['project_name'] = project._id
-        self.uninstall(project)
         super(ForgeSVNApp, self).install(project)
         # Setup permissions
         role_developer = ProjectRole.query.get(name='Developer')._id
@@ -79,10 +79,16 @@
 
 
     def uninstall(self, project):
-        "Remove all the plugin's artifacts from the database"
-        Application.uninstall(self, project)
+        g.publish('audit', 'scm.svn.uninstall', dict(project_id=project._id))
+
+    @audit('scm.svn.uninstall')
+    def _uninstall(self, routing_key, data):
+        "Remove all the plugin's artifacts and the physical repository"
+        repo = self.repo
+        if repo is not None and repo.path:
+            shutil.rmtree(repo.path, ignore_errors=True)
         model.SVNRepository.query.remove(dict(app_config_id=self.config._id))
-        # physically remove the actual repository
+        Application.uninstall(self, project_id=data['project_id'])
 
 class RootController(object):