@@ -231,8 +231,9 class Repository < ActiveRecord::Base | |||
|
231 | 231 | # Finds and returns a revision with a number or the beginning of a hash |
|
232 | 232 | def find_changeset_by_name(name) |
|
233 | 233 | return nil if name.blank? |
|
234 | changesets.find(:first, :conditions => (name.match(/^\d*$/) ? | |
|
235 | ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%'])) | |
|
234 | s = name.to_s | |
|
235 | changesets.find(:first, :conditions => (s.match(/^\d*$/) ? | |
|
236 | ["revision = ?", s] : ["revision LIKE ?", s + '%'])) | |
|
236 | 237 | end |
|
237 | 238 | |
|
238 | 239 | def latest_changeset |
General Comments 0
You need to be logged in to leave comments.
Login now