Index: /Volumes/data/Users/john/src/capistrano/lib/capistrano/recipes/deploy/strategy/remote_cache.rb
===================================================================
--- /Volumes/data/Users/john/src/capistrano/lib/capistrano/recipes/deploy/strategy/remote_cache.rb	(revision 8762)
+++ /Volumes/data/Users/john/src/capistrano/lib/capistrano/recipes/deploy/strategy/remote_cache.rb	(working copy)
@@ -28,12 +28,30 @@
             File.join(shared_path, configuration[:repository_cache] || "cached-copy")
           end
 
+          def repository_cache_exists?
+            File.exist? repository_cache #should also check if directory
+          end
+
+          def repository_cache_represents_currently_specified_repository?
+            # Need to strip trailing slash from repository if it has one
+            repository == `cd #{repository_cache} && svn info | grep URL | cut -c 6-`
+          end
+
+          def checkout_repository_cache
+            scm_run source.checkout(revision, repository_cache)
+          end
+
           def update_repository_cache
             logger.trace "updating the cached checkout on all servers"
-            command = "if [ -d #{repository_cache} ]; then " +
-              "#{source.sync(revision, repository_cache)}; " +
-              "else #{source.checkout(revision, repository_cache)}; fi"
-            scm_run(command)
+            if repository_cache_exists?
+              if repository_cache_represents_currently_specified_repository?
+                scm_run source.sync(revision, repository_cache)
+              else
+                raise "Repository the repository specified is not what is checked out in the existing repository cache. Capistrano does not support repository switching. Please perform a manual svn switch on the server and then perform this task again."
+              end
+            else
+              checkout_repository_cache
+            end
           end
 
           def copy_repository_cache
