Permalink
Browse files

bug: Sort release tags in correct order

  • Loading branch information...
1 parent 0699541 commit e38b645371cf1e5be318e61a7ac257c1eb4f22e2 @trans trans committed May 26, 2010
Showing with 10 additions and 1 deletion.
  1. +1 −1 lib/vclog/history.rb
  2. +4 −0 lib/vclog/release.rb
  3. +5 −0 lib/vclog/tag.rb
@@ -113,7 +113,7 @@ def releases
rel << Release.new(lt, log.changes)
end
- rel
+ rel.sort
)
end
@@ -17,6 +17,10 @@ def to_h
def to_json
to_h.to_json
end
+
+ def <=>(other)
+ @tag <=> other.tag
+ end
end
end
View
@@ -49,6 +49,11 @@ def to_h
:message => message
}
end
+
+ # Normal tag order is the reverse typical sorts.
+ def <=>(other)
+ other.name <=> name
+ end
end
end

0 comments on commit e38b645

Please sign in to comment.