Project

General

Profile

Patch #5117 » fix_mercurial_localization_issue.diff

Alessio Caiazza, 2010-03-19 11:01

View differences:

lib/redmine/scm/adapters/mercurial_adapter.rb
38 38
            # release number (eg 0.9.5 or 1.0) or as a revision
39 39
            # id composed of 12 hexa characters.
40 40
            theversion = hgversion_from_command_line
41
            if theversion.match(/^\d+(\.\d+)+/)
42
              theversion.split(".").collect(&:to_i)
41
            if m = theversion.match(/((\d+\.)+\d+)/)
42
              theversion = m[0].scan(/\d+/).collect(&:to_i)
43 43
            end
44 44
          end
45 45
          
46 46
          def hgversion_from_command_line
47
            %x{#{HG_BIN} --version}.match(/\(version (.*)\)/)[1]
47
            %x{#{HG_BIN} --version}
48 48
          end
49 49
          
50 50
          def template_path
(4-4/13)