]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: switch root_url or url in "hg" method (#4455).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 16 Feb 2011 04:40:42 +0000 (04:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 16 Feb 2011 04:40:42 +0000 (04:40 +0000)
"info" sets root_url from url.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4844 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb

index 4aa3024d38512727b142f0ee026fb4061c5cbcf5..0cfcf4c8838e5fb485d8f865195462e965c1c3f2 100644 (file)
@@ -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