Project

General

Profile

Defect #3779 » repository_find_revision_by_numeric_changeset_or_non-numeric_hash_v2.patch

Patch v2 - Babar O'Cap, 2009-08-25 17:49

View differences:

C:\Depots\redmine\app\controllers\repositories_controller.rb
132 132
  end
133 133
  
134 134
  def revision
135
    @changeset = @repository.changesets.find(:first, :conditions => ["revision LIKE ?", @rev + '%'])
135
    @changeset = @repository.changesets.find(:first, :conditions => (Integer(@rev) rescue nil)? ["revision = ?", @rev] : ["revision LIKE ?", @rev + '%'])
136 136
    raise ChangesetNotFound unless @changeset
137 137

  
138 138
    respond_to do |format|
(2-2/3)