Project

General

Profile

Defect #3779 » repository_find_revision_by_numeric_changeset_or_non-numeric_hash_v3.patch

Patch v3 - Babar O'Cap, 2009-09-02 11:05

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 => (["revision = ?", Integer(@rev).to_s] rescue ["revision LIKE ?", @rev + '%']))
136 136
    raise ChangesetNotFound unless @changeset
137 137

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