summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 23:51:44 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 23:51:44 +0000
commit39a245e9eed360d7fec64971b1cbbc2fce0e8a33 (patch)
treee85343bf82a84d17ceae3c02f324fba75ee44ce2 /lib/redmine/scm
parente23f319a4c1a05d98b9b66a4bd3c857da02bcd07 (diff)
downloadredmine-39a245e9eed360d7fec64971b1cbbc2fce0e8a33.tar.gz
redmine-39a245e9eed360d7fec64971b1cbbc2fce0e8a33.zip
scm: bazaar: refactor adapter info() to use scm_cmd().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5908 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm')
-rw-r--r--lib/redmine/scm/adapters/bazaar_adapter.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb
index 2fc78cf0f..2710899d7 100644
--- a/lib/redmine/scm/adapters/bazaar_adapter.rb
+++ b/lib/redmine/scm/adapters/bazaar_adapter.rb
@@ -59,9 +59,10 @@ module Redmine
# Get info about the repository
def info
- cmd = "#{self.class.sq_bin} revno #{target('')}"
+ cmd_args = %w|revno|
+ cmd_args << bzr_target('')
info = nil
- shellout(cmd) do |io|
+ scm_cmd(*cmd_args) do |io|
if io.read =~ %r{^(\d+)\r?$}
info = Info.new({:root_url => url,
:lastrev => Revision.new({
@@ -70,9 +71,8 @@ module Redmine
})
end
end
- return nil if $? && $?.exitstatus != 0
info
- rescue CommandFailed
+ rescue ScmCommandAborted
return nil
end