diff lib/redmine/scm/adapters/.svn/text-base/cvs_adapter.rb.svn-base @ 210:0579821a129a

Update to Redmine trunk rev 4802
author Chris Cannam
date Tue, 08 Feb 2011 13:51:46 +0000
parents 8661b858af72
children 051f544170fe
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/.svn/text-base/cvs_adapter.rb.svn-base	Wed Jan 19 15:04:22 2011 +0000
+++ b/lib/redmine/scm/adapters/.svn/text-base/cvs_adapter.rb.svn-base	Tue Feb 08 13:51:46 2011 +0000
@@ -23,7 +23,7 @@
       class CvsAdapter < AbstractAdapter
 
         # CVS executable name
-        CVS_BIN = "cvs"
+        CVS_BIN = Redmine::Configuration['scm_cvs_command'] || "cvs"
     
         # Guidelines for the input:
         #  url -> the project-path, relative to the cvsroot (eg. module name)
@@ -109,7 +109,7 @@
           
           path_with_project="#{url}#{with_leading_slash(path)}"
           cmd = "#{CVS_BIN} -d #{shell_quote root_url} rlog"
-          cmd << " -d\">#{time_to_cvstime(identifier_from)}\"" if identifier_from
+          cmd << " -d\">#{time_to_cvstime_rlog(identifier_from)}\"" if identifier_from
           cmd << " #{shell_quote path_with_project}"
           shellout(cmd) do |io|
             state="entry_start"
@@ -290,6 +290,12 @@
           end
           return time.strftime("%Y-%m-%d %H:%M:%S")
         end
+
+        def time_to_cvstime_rlog(time)
+          return nil if time.nil?
+          t1 = time.clone.localtime
+          return t1.strftime("%Y-%m-%d %H:%M:%S")
+        end
           
         def normalize_cvs_path(path)
           normalize_path(path.gsub(/Attic\//,''))