Subject: [sup-talk] [PATCH] Sort contacts when saving them.

From: [email-masked] (Nicolas Pouillard)
Date: Mon, 10 Mar 2008 09:11:17 +0100

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

---

From: [email-masked] (William Morgan)
Date: Wed, 26 Mar 2008 09:13:53 -0700

> This makes sup behave more nicely with versionning.

Applied. Thanks!

-- 
William <wmorgan-sup at masanjin.net>