@@ -76,12 +76,12 class Repository::Mercurial < Repository | |||
|
76 | 76 | return nil if name.blank? |
|
77 | 77 | s = name.to_s |
|
78 | 78 | if /[^\d]/ =~ s or s.size > 8 |
|
79 | e = changesets.find(:first, :conditions => ['scmid = ?', s]) | |
|
79 | cs = changesets.where(:scmid => s).first | |
|
80 | 80 | else |
|
81 | e = changesets.find(:first, :conditions => ['revision = ?', s]) | |
|
81 | cs = changesets.where(:revision => s).first | |
|
82 | 82 | end |
|
83 |
return |
|
|
84 |
changesets. |
|
|
83 | return cs if cs | |
|
84 | changesets.where('scmid LIKE ?', "#{s}%").first | |
|
85 | 85 | end |
|
86 | 86 | |
|
87 | 87 | # Returns the latest changesets for +path+; sorted by revision number |
General Comments 0
You need to be logged in to leave comments.
Login now