summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-24 14:40:18 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-24 14:40:18 +0000
commitdb7a1a5c052c48f5ed93748f9cccb564dc6138a0 (patch)
tree65fbc4a2eea32868f19f8f89003d86fe05c446ad /lib
parentf1c432fb588268c6bb27a8d6873b91e4837a7de9 (diff)
downloadredmine-db7a1a5c052c48f5ed93748f9cccb564dc6138a0.tar.gz
redmine-db7a1a5c052c48f5ed93748f9cccb564dc6138a0.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/subversion_adapter.rb70
1 files changed, 41 insertions, 29 deletions
diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb
index 7676705ea..847057a82 100644
--- a/lib/redmine/scm/adapters/subversion_adapter.rb
+++ b/lib/redmine/scm/adapters/subversion_adapter.rb
@@ -68,16 +68,20 @@ module Redmine
begin
doc = parse_xml(output)
# root_url = doc.elements["info/entry/repository/root"].text
- info = Info.new({:root_url => doc['info']['entry']['repository']['root']['__content__'],
- :lastrev =>
- Revision.new(
- {
- :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__'] : "")
- }
- )
- })
+ info =
+ Info.new(
+ {
+ :root_url => doc['info']['entry']['repository']['root']['__content__'],
+ :lastrev =>
+ Revision.new(
+ {
+ :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
end
end
@@ -108,19 +112,23 @@ module Redmine
next if entry['kind'] == 'dir' && commit_date.nil?
name = entry['name']['__content__']
- entries << Entry.new({:name => CGI.unescape(name),
- :path => ((path.empty? ? "" : "#{path}/") + name),
- :kind => entry['kind'],
- :size => ((s = entry['size']) ? s['__content__'].to_i : nil),
- :lastrev =>
- Revision.new(
- {
- :identifier => commit['revision'],
- :time => Time.parse(commit_date['__content__'].to_s).localtime,
- :author => ((a = commit['author']) ? a['__content__'] : nil)
- }
- )
- })
+ entries <<
+ Entry.new(
+ {
+ :name => CGI.unescape(name),
+ :path => ((path.empty? ? "" : "#{path}/") + name),
+ :kind => entry['kind'],
+ :size => ((s = entry['size']) ? s['__content__'].to_i : nil),
+ :lastrev =>
+ Revision.new(
+ {
+ :identifier => commit['revision'],
+ :time => Time.parse(commit_date['__content__'].to_s).localtime,
+ :author => ((a = commit['author']) ? a['__content__'] : nil)
+ }
+ )
+ }
+ )
end
rescue => e
logger.error("Error parsing svn output: #{e.message}")
@@ -185,12 +193,16 @@ module Redmine
end
paths.sort_by! {|e| e[:path]}
- revisions << Revision.new({:identifier => logentry['revision'],
- :author => (logentry['author'] ? logentry['author']['__content__'] : ""),
- :time => Time.parse(logentry['date']['__content__'].to_s).localtime,
- :message => logentry['msg']['__content__'],
- :paths => paths
- })
+ revisions <<
+ Revision.new(
+ {
+ :identifier => logentry['revision'],
+ :author => (logentry['author'] ? logentry['author']['__content__'] : ""),
+ :time => Time.parse(logentry['date']['__content__'].to_s).localtime,
+ :message => logentry['msg']['__content__'],
+ :paths => paths
+ }
+ )
end
rescue
end