From: Toshi MARUYAMA Date: Wed, 16 Feb 2011 04:40:42 +0000 (+0000) Subject: scm: mercurial: switch root_url or url in "hg" method (#4455). X-Git-Tag: 1.2.0~977 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2c4836cbaeb8b4c98b58be2351a3dd9d6100ba69;p=redmine.git scm: mercurial: switch root_url or url in "hg" method (#4455). "info" sets root_url from url. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4844 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 4aa3024d3..0cfcf4c88 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -224,7 +224,8 @@ module Redmine # Runs 'hg' command with the given args def hg(*args, &block) - full_args = [HG_BIN, '-R', root_url, '--encoding', 'utf-8'] + repo_path = root_url || url + full_args = [HG_BIN, '-R', repo_path, '--encoding', 'utf-8'] full_args << '--config' << "extensions.redminehelper=#{HG_HELPER_EXT}" full_args << '--config' << 'diff.git=false' full_args += args