##// END OF EJS Templates
Fixes Repository#find_changeset_by_name with PostgreSQL (#3937)....
Jean-Philippe Lang -
r2789:4e811bebd1eb
parent child
Show More
@@ -94,7 +94,7 class Repository < ActiveRecord::Base
94
94
95 # Finds and returns a revision with a number or the beginning of a hash
95 # Finds and returns a revision with a number or the beginning of a hash
96 def find_changeset_by_name(name)
96 def find_changeset_by_name(name)
97 changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_i] : ["revision LIKE ?", name + '%']))
97 changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%']))
98 end
98 end
99
99
100 def latest_changeset
100 def latest_changeset
General Comments 0
You need to be logged in to leave comments. Login now