changeset 1568:bc47b68a9487 live

Avoid spurious svn invocation on startup
author Chris Cannam
date Tue, 01 Aug 2017 13:30:33 +0100
parents 3ad53f43483d
children 96bcc0ebd102
files lib/redmine/version.rb
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lib/redmine/version.rb	Mon Oct 10 12:56:28 2016 +0100
+++ b/lib/redmine/version.rb	Tue Aug 01 13:30:33 2017 +0100
@@ -14,17 +14,18 @@
 
     # Retrieves the revision from the working copy
     def self.revision
-      if File.directory?(File.join(Rails.root, '.svn'))
-        begin
-          path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
-          if `svn info --xml #{path}` =~ /revision="(\d+)"/
-            return $1.to_i
-          end
-        rescue
+      return 0
+   #   if File.directory?(File.join(Rails.root, '.svn'))
+   #     begin
+   #       path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
+   #       if `svn info --xml #{path}` =~ /revision="(\d+)"/
+   #         return $1.to_i
+   #       end
+   #     rescue
           # Could not find the current revision
-        end
-      end
-      nil
+   #     end
+   #   end
+   #   nil
     end
 
     REVISION = self.revision