Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Sort contacts when saving them.
@ 2008-03-10  8:11 Nicolas Pouillard
  2008-03-26 16:13 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pouillard @ 2008-03-10  8:11 UTC (permalink / raw)


This makes sup behave more nicely with versionning.
---
 lib/sup/contact.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/contact.rb b/lib/sup/contact.rb
index 8050c06..b0c272e 100644
--- a/lib/sup/contact.rb
+++ b/lib/sup/contact.rb
@@ -51,7 +51,7 @@ class ContactManager
 
   def save
     File.open(@fn, "w") do |f|
-      @p2a.each do |p, a|
+      @p2a.sort_by { |(p, a)| [p.full_address, a] }.each do |(p, a)|
         f.puts "#{a || ''}: #{p.full_address}"
       end
     end
-- 
1.5.3.1.109.gacd69



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

end of thread, other threads:[~2008-03-26 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10  8:11 [sup-talk] [PATCH] Sort contacts when saving them Nicolas Pouillard
2008-03-26 16:13 ` William Morgan

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