Defect #28920

Redmine::VERSION::revision should take subversion_command setting into account

Added by Go MAEDA 3 months ago. Updated 15 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Administration
Target version:4.0.0
Resolution:Fixed Affected version:

Description

The revision number may not be shown on admin_info page because the execution of the svn command fails in some cases.

Redmine::VERSION::revision method should take scm_subversion_command setting into account.

Index: lib/redmine/version.rb
===================================================================
--- lib/redmine/version.rb    (revision 17354)
+++ lib/redmine/version.rb    (working copy)
@@ -17,7 +17,7 @@
       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+)"/
+          if `#{Redmine::Scm::Adapters::SubversionAdapter.client_command} info --xml #{path}` =~ /revision="(\d+)"/
             return $1.to_i
           end
         rescue

Related issues

Related to Redmine - Feature #7517: Configurable path of executable for scm adapters Closed 2011-02-02

Associated revisions

Revision 17407
Added by Go MAEDA about 1 month ago

Redmine::VERSION::revision should take subversion_command_setting into account (#28920).

Patch by Yuichi Harada.

History

#1 Updated by Go MAEDA 3 months ago

  • Related to Feature #7517: Configurable path of executable for scm adapters added

#2 Updated by Go MAEDA 3 months ago

  • Target version set to 4.1.0

#3 Updated by Go MAEDA about 1 month ago

  • Subject changed from Redmine::VERSION::revision method may fail due to hardcoded svn command name to Redmine::VERSION::revision should take subversion_command_setting into account
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed. The patch was provided by Yuichi Harada. Thank you for the contribution.

#4 Updated by Go MAEDA 15 days ago

  • Subject changed from Redmine::VERSION::revision should take subversion_command_setting into account to Redmine::VERSION::revision should take subversion_command setting into account

Also available in: Atom PDF