@@ -59,9 +59,10 module Redmine | |||||
59 |
|
59 | |||
60 | # Get info about the repository |
|
60 | # Get info about the repository | |
61 | def info |
|
61 | def info | |
62 | cmd = "#{self.class.sq_bin} revno #{target('')}" |
|
62 | cmd_args = %w|revno| | |
|
63 | cmd_args << bzr_target('') | |||
63 | info = nil |
|
64 | info = nil | |
64 |
s |
|
65 | scm_cmd(*cmd_args) do |io| | |
65 | if io.read =~ %r{^(\d+)\r?$} |
|
66 | if io.read =~ %r{^(\d+)\r?$} | |
66 | info = Info.new({:root_url => url, |
|
67 | info = Info.new({:root_url => url, | |
67 | :lastrev => Revision.new({ |
|
68 | :lastrev => Revision.new({ | |
@@ -70,9 +71,8 module Redmine | |||||
70 | }) |
|
71 | }) | |
71 | end |
|
72 | end | |
72 | end |
|
73 | end | |
73 | return nil if $? && $?.exitstatus != 0 |
|
|||
74 | info |
|
74 | info | |
75 |
rescue Command |
|
75 | rescue ScmCommandAborted | |
76 | return nil |
|
76 | return nil | |
77 | end |
|
77 | end | |
78 |
|
78 |
General Comments 0
You need to be logged in to leave comments.
Login now