@@ -90,12 +90,12 module Redmine | |||
|
90 | 90 | def url |
|
91 | 91 | @url |
|
92 | 92 | end |
|
93 | ||
|
93 | ||
|
94 | 94 | # get info about the svn repository |
|
95 | 95 | def info |
|
96 | 96 | return nil |
|
97 | 97 | end |
|
98 | ||
|
98 | ||
|
99 | 99 | # Returns the entry identified by path and revision identifier |
|
100 | 100 | # or nil if entry doesn't exist in the repository |
|
101 | 101 | def entry(path=nil, identifier=nil) |
@@ -250,12 +250,12 module Redmine | |||
|
250 | 250 | end |
|
251 | 251 | } |
|
252 | 252 | end |
|
253 | ||
|
253 | ||
|
254 | 254 | def revisions |
|
255 | 255 | revisions ||= Revisions.new(collect{|entry| entry.lastrev}.compact) |
|
256 | 256 | end |
|
257 | 257 | end |
|
258 | ||
|
258 | ||
|
259 | 259 | class Info |
|
260 | 260 | attr_accessor :root_url, :lastrev |
|
261 | 261 | def initialize(attributes={}) |
@@ -263,7 +263,7 module Redmine | |||
|
263 | 263 | self.lastrev = attributes[:lastrev] |
|
264 | 264 | end |
|
265 | 265 | end |
|
266 | ||
|
266 | ||
|
267 | 267 | class Entry |
|
268 | 268 | attr_accessor :name, :path, :kind, :size, :lastrev |
|
269 | 269 | def initialize(attributes={}) |
@@ -273,15 +273,15 module Redmine | |||
|
273 | 273 | self.size = attributes[:size].to_i if attributes[:size] |
|
274 | 274 | self.lastrev = attributes[:lastrev] |
|
275 | 275 | end |
|
276 | ||
|
276 | ||
|
277 | 277 | def is_file? |
|
278 | 278 | 'file' == self.kind |
|
279 | 279 | end |
|
280 | ||
|
280 | ||
|
281 | 281 | def is_dir? |
|
282 | 282 | 'dir' == self.kind |
|
283 | 283 | end |
|
284 | ||
|
284 | ||
|
285 | 285 | def is_text? |
|
286 | 286 | Redmine::MimeType.is_type?('text', name) |
|
287 | 287 | end |
General Comments 0
You need to be logged in to leave comments.
Login now