@@ -98,13 +98,13 class Repository < ActiveRecord::Base | |||
|
98 | 98 | def relative_path(path) |
|
99 | 99 | path |
|
100 | 100 | end |
|
101 | ||
|
101 | ||
|
102 | 102 | # Finds and returns a revision with a number or the beginning of a hash |
|
103 | 103 | def find_changeset_by_name(name) |
|
104 |
return nil if name. |
|
|
104 | return nil if name.blank? | |
|
105 | 105 | changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%'])) |
|
106 | 106 | end |
|
107 | ||
|
107 | ||
|
108 | 108 | def latest_changeset |
|
109 | 109 | @latest_changeset ||= changesets.find(:first) |
|
110 | 110 | end |
General Comments 0
You need to be logged in to leave comments.
Login now