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