summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-20 14:04:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-20 14:04:22 +0000
commit6b72c6689305c13a728a311257b58b8465ee4353 (patch)
tree4135088b69c3f5225e4325aeca67f57b5ed6793d /lib
parent1f237388bddd30e7542abd14f5ac356e6635a297 (diff)
downloadredmine-6b72c6689305c13a728a311257b58b8465ee4353.tar.gz
redmine-6b72c6689305c13a728a311257b58b8465ee4353.zip
Fixed: MercurialAdapter.client_version depends on LANG environment variable (#5117).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4417 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/mercurial_adapter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb
index 9d5e9aa11..c1be57529 100644
--- a/lib/redmine/scm/adapters/mercurial_adapter.rb
+++ b/lib/redmine/scm/adapters/mercurial_adapter.rb
@@ -38,13 +38,13 @@ module Redmine
# release number (eg 0.9.5 or 1.0) or as a revision
# id composed of 12 hexa characters.
theversion = hgversion_from_command_line
- if theversion.match(/^\d+(\.\d+)+/)
- theversion.split(".").collect(&:to_i)
+ if m = theversion.match(/\b\d+(\.\d+)+\b/)
+ m[0].split(".").collect(&:to_i)
end
end
def hgversion_from_command_line
- %x{#{HG_BIN} --version}.match(/\(version (.*)\)/)[1]
+ %x{#{HG_BIN} --version}.lines.first.to_s
end
def template_path