Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] sources.yaml: consistent label ordering
@ 2011-01-18 18:26 Sascha Silbe
  2011-01-19  3:41 ` Rich Lane
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Silbe @ 2011-01-18 18:26 UTC (permalink / raw)
  To: sup-devel

Sort labels in sources.yaml so the ordering doesn't change betweeen saves.
This is useful when tracking sources.yaml with a VCS (e.g. git).

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
---
 lib/sup/source.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/source.rb b/lib/sup/source.rb
index f2379fb..e0aa90e 100644
--- a/lib/sup/source.rb
+++ b/lib/sup/source.rb
@@ -155,7 +155,7 @@ end
 module SerializeLabelsNicely
   def before_marshal # can return an object
     c = clone
-    c.instance_eval { @labels = @labels.to_a.map { |l| l.to_s } }
+    c.instance_eval { @labels = (@labels.to_a.map { |l| l.to_s }).sort }
     c
   end
 
-- 
1.7.2.3

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [PATCH] sources.yaml: consistent label ordering
  2011-01-18 18:26 [sup-devel] [PATCH] sources.yaml: consistent label ordering Sascha Silbe
@ 2011-01-19  3:41 ` Rich Lane
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2011-01-19  3:41 UTC (permalink / raw)
  To: Sascha Silbe; +Cc: sup-devel

Applied to master.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-19  3:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 18:26 [sup-devel] [PATCH] sources.yaml: consistent label ordering Sascha Silbe
2011-01-19  3:41 ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox