scm browser commit before merge
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@104 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
efe31d49f0
commit
072bfed685
15 files changed
+138
-38
No files matched your search
@@ -30,6 +30,7 @@ class Permission < ActiveRecord::Base
|
||||
1100 => :label_news_plural,
|
||||
1200 => :label_document_plural,
|
||||
1300 => :label_attachment_plural,
|
||||
1400 => :label_repository
|
||||
}.freeze
|
||||
|
||||
@@cached_perms_for_public = nil
|
||||
|
||||
@@ -58,7 +58,7 @@ module SvnRepos
|
||||
path ||= ''
|
||||
identifier_from = 'HEAD' unless identifier_from and identifier_from.to_i > 0
|
||||
identifier_to = 1 unless identifier_to and identifier_to.to_i > 0
|
||||
revisions = []
|
||||
revisions = Revisions.new
|
||||
cmd = "svn log --xml -r #{identifier_from}:#{identifier_to} "
|
||||
cmd << "--verbose " if options[:with_paths]
|
||||
cmd << target(path)
|
||||
@@ -128,7 +128,7 @@ module SvnRepos
|
||||
|
||||
private
|
||||
def target(path)
|
||||
" \"" << "#{@url}/#{path}".gsub(/["'<>]/, '') << "\""
|
||||
" \"" << "#{@url}/#{path}".gsub(/["'?<>\*]/, '') << "\""
|
||||
end
|
||||
|
||||
def logger
|
||||
@@ -153,6 +153,10 @@ module SvnRepos
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def revisions
|
||||
revisions ||= Revisions.new(collect{|entry| entry.lastrev})
|
||||
end
|
||||
end
|
||||
|
||||
class Entry
|
||||
@@ -174,6 +178,12 @@ module SvnRepos
|
||||
end
|
||||
end
|
||||
|
||||
class Revisions < Array
|
||||
def latest
|
||||
sort {|x,y| x.time <=> y.time}.last
|
||||
end
|
||||
end
|
||||
|
||||
class Revision
|
||||
attr_accessor :identifier, :author, :time, :message, :paths
|
||||
def initialize(attributes={})
|
||||
|
||||
Reference in new issue
Block a user