scm: mercurial: fix error on revision page for empty revision (#7307).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4704 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -71,6 +71,7 @@ class Repository::Mercurial < Repository
|
||||
|
||||
# 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?
|
||||
if /[^\d]/ =~ name or name.to_s.size > 8
|
||||
e = changesets.find(:first, :conditions => ['scmid = ?', name.to_s])
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user