]> source.dussan.org Git - redmine.git/commitdiff
scm: add a feature of configurable path of executable for scm adapters (#7517).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 4 Feb 2011 04:28:39 +0000 (04:28 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 4 Feb 2011 04:28:39 +0000 (04:28 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4795 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/configuration.yml.example
lib/redmine/scm/adapters/bazaar_adapter.rb
lib/redmine/scm/adapters/cvs_adapter.rb
lib/redmine/scm/adapters/darcs_adapter.rb
lib/redmine/scm/adapters/git_adapter.rb
lib/redmine/scm/adapters/mercurial_adapter.rb
lib/redmine/scm/adapters/subversion_adapter.rb

index 5756907dc3b284468b3dd30e2ce432ccd7491cfa..94d1928b7fec3ef4ea604d38e71819928a1d82dc 100644 (file)
@@ -107,6 +107,15 @@ default:
   autologin_cookie_path:
   autologin_cookie_secure:
   
+  # Configuration of SCM executable command.
+  # Absolute path (ex. /usr/local/bin/hg) or command name (ex. hg.exe, bzr.exe)
+  # On Windows, *.cmd, *.bat (ex. hg.cmd, bzr.bat) does not work.
+  scm_command_subversion: svn                                       # (default: svn)
+  scm_command_mercurial:  "\"C:\Program Files\TortoiseHg\hg.exe\""  # (default: hg)
+  scm_command_git:        /usr/local/bin/git                        # (default: git)
+  scm_command_bazaar:     bzr.exe                                   # (default: bzr)
+  scm_command_darcs:      darcs-1.0.9-i386-linux                    # (default: darcs)
+  
 # specific configuration options for production environment
 # that overrides the default ones
 production:
index a04c3491c09829493dce9321db676dca05c92574..bf31b3a9d9a82e72de36ce33cdd8df94fb05f79f 100644 (file)
@@ -23,7 +23,7 @@ module Redmine
       class BazaarAdapter < AbstractAdapter
       
         # Bazaar executable name
-        BZR_BIN = "bzr"
+        BZR_BIN = Redmine::Configuration['scm_command_bazaar'] || "bzr"
         
         # Get info about the repository
         def info
index 44a252fce7441fc291e7e593faa0c3bb626ab410..5b5f5cde353430da8fcefb8951e43af0dc59b442 100644 (file)
@@ -23,7 +23,7 @@ module Redmine
       class CvsAdapter < AbstractAdapter
 
         # CVS executable name
-        CVS_BIN = "cvs"
+        CVS_BIN = Redmine::Configuration['scm_command_cvs'] || "cvs"
     
         # Guidelines for the input:
         #  url -> the project-path, relative to the cvsroot (eg. module name)
index 69805a360325bf5fb1195486ff41040f07aa012a..0ccc6f10521eb1ae6d1939d8ef5660481889ff71 100644 (file)
@@ -23,7 +23,7 @@ module Redmine
     module Adapters    
       class DarcsAdapter < AbstractAdapter      
         # Darcs executable name
-        DARCS_BIN = "darcs"
+        DARCS_BIN = Redmine::Configuration['scm_command_darcs'] || "darcs"
         
         class << self
           def client_version
index 302ded580c7f7b13b6f0a071b1b8b05485c26fbb..d437b95597be1fd9dda533a0967b7c749b0e01c7 100644 (file)
@@ -22,7 +22,7 @@ module Redmine
     module Adapters    
       class GitAdapter < AbstractAdapter
         # Git executable name
-        GIT_BIN = "git"
+        GIT_BIN = Redmine::Configuration['scm_command_git'] || "git"
 
         def info
           begin
index bbc4a2d61f7b267f45113f815e9c6724861c196f..f7b5ae9d549e33edbfab252c08547e9d324793b1 100644 (file)
@@ -24,7 +24,7 @@ module Redmine
       class MercurialAdapter < AbstractAdapter
 
         # Mercurial executable name
-        HG_BIN = "hg"
+        HG_BIN = Redmine::Configuration['scm_command_mercurial'] || "hg"
         TEMPLATES_DIR = File.dirname(__FILE__) + "/mercurial"
         TEMPLATE_NAME = "hg-template"
         TEMPLATE_EXTENSION = "tmpl"
index b4702cc2efd405a96499ad47d586ec9a7fb54aa4..253fa0b2fc39fbe3064e44cc7d2f8a935057bb23 100644 (file)
@@ -24,7 +24,7 @@ module Redmine
       class SubversionAdapter < AbstractAdapter\r
       \r
         # SVN executable name\r
-        SVN_BIN = "svn"\r
+        SVN_BIN = Redmine::Configuration['scm_command_subversion'] || "svn"\r
         \r
         class << self\r
           def client_version\r