mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
fix source indent of lib/redmine/scm/adapters/subversion_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20185 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -68,16 +68,20 @@ module Redmine
|
|||||||
begin
|
begin
|
||||||
doc = parse_xml(output)
|
doc = parse_xml(output)
|
||||||
# root_url = doc.elements["info/entry/repository/root"].text
|
# root_url = doc.elements["info/entry/repository/root"].text
|
||||||
info = Info.new({:root_url => doc['info']['entry']['repository']['root']['__content__'],
|
info =
|
||||||
:lastrev =>
|
Info.new(
|
||||||
Revision.new(
|
{
|
||||||
{
|
:root_url => doc['info']['entry']['repository']['root']['__content__'],
|
||||||
:identifier => doc['info']['entry']['commit']['revision'],
|
:lastrev =>
|
||||||
:time => Time.parse(doc['info']['entry']['commit']['date']['__content__']).localtime,
|
Revision.new(
|
||||||
:author => (doc['info']['entry']['commit']['author'] ? doc['info']['entry']['commit']['author']['__content__'] : "")
|
{
|
||||||
}
|
:identifier => doc['info']['entry']['commit']['revision'],
|
||||||
)
|
:time => Time.parse(doc['info']['entry']['commit']['date']['__content__']).localtime,
|
||||||
})
|
:author => (doc['info']['entry']['commit']['author'] ? doc['info']['entry']['commit']['author']['__content__'] : "")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
rescue
|
rescue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -108,19 +112,23 @@ module Redmine
|
|||||||
next if entry['kind'] == 'dir' && commit_date.nil?
|
next if entry['kind'] == 'dir' && commit_date.nil?
|
||||||
|
|
||||||
name = entry['name']['__content__']
|
name = entry['name']['__content__']
|
||||||
entries << Entry.new({:name => CGI.unescape(name),
|
entries <<
|
||||||
:path => ((path.empty? ? "" : "#{path}/") + name),
|
Entry.new(
|
||||||
:kind => entry['kind'],
|
{
|
||||||
:size => ((s = entry['size']) ? s['__content__'].to_i : nil),
|
:name => CGI.unescape(name),
|
||||||
:lastrev =>
|
:path => ((path.empty? ? "" : "#{path}/") + name),
|
||||||
Revision.new(
|
:kind => entry['kind'],
|
||||||
{
|
:size => ((s = entry['size']) ? s['__content__'].to_i : nil),
|
||||||
:identifier => commit['revision'],
|
:lastrev =>
|
||||||
:time => Time.parse(commit_date['__content__'].to_s).localtime,
|
Revision.new(
|
||||||
:author => ((a = commit['author']) ? a['__content__'] : nil)
|
{
|
||||||
}
|
:identifier => commit['revision'],
|
||||||
)
|
:time => Time.parse(commit_date['__content__'].to_s).localtime,
|
||||||
})
|
:author => ((a = commit['author']) ? a['__content__'] : nil)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error("Error parsing svn output: #{e.message}")
|
logger.error("Error parsing svn output: #{e.message}")
|
||||||
@@ -185,12 +193,16 @@ module Redmine
|
|||||||
end
|
end
|
||||||
paths.sort_by! {|e| e[:path]}
|
paths.sort_by! {|e| e[:path]}
|
||||||
|
|
||||||
revisions << Revision.new({:identifier => logentry['revision'],
|
revisions <<
|
||||||
:author => (logentry['author'] ? logentry['author']['__content__'] : ""),
|
Revision.new(
|
||||||
:time => Time.parse(logentry['date']['__content__'].to_s).localtime,
|
{
|
||||||
:message => logentry['msg']['__content__'],
|
:identifier => logentry['revision'],
|
||||||
:paths => paths
|
:author => (logentry['author'] ? logentry['author']['__content__'] : ""),
|
||||||
})
|
:time => Time.parse(logentry['date']['__content__'].to_s).localtime,
|
||||||
|
:message => logentry['msg']['__content__'],
|
||||||
|
:paths => paths
|
||||||
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user