diff app/models/.svn/text-base/repository.rb.svn-base @ 117:af80e5618e9b redmine-1.1

* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author Chris Cannam
date Thu, 13 Jan 2011 12:53:21 +0000
parents 513646585e45
children cd2282d2aa55
line wrap: on
line diff
--- a/app/models/.svn/text-base/repository.rb.svn-base	Fri Nov 19 14:05:24 2010 +0000
+++ b/app/models/.svn/text-base/repository.rb.svn-base	Thu Jan 13 12:53:21 2011 +0000
@@ -94,6 +94,7 @@
   
   # Finds and returns a revision with a number or the beginning of a hash
   def find_changeset_by_name(name)
+    return nil if name.nil? || name.empty?
     changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%']))
   end