Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: michael@content-space.de (Michael Hamann)
Subject: [sup-talk] [PATCH] sort labels in the dump
Date: Sun,  6 Sep 2009 23:04:22 +0200	[thread overview]
Message-ID: <1252271062-8775-1-git-send-email-michael@content-space.de> (raw)

Sorting labels in the dump is useful when you e.g. want to keep track of
your dump using an incremental backup system that records diffs, with
this patch lines in the dump will only change when there is a real
change and no longer just because the random order of the labels
changes.
---
 bin/sup-dump |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/sup-dump b/bin/sup-dump
index 8b5bf07..7b33be5 100755
--- a/bin/sup-dump
+++ b/bin/sup-dump
@@ -26,5 +26,5 @@ Redwood::SourceManager.init
 index.load
 
 index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
-  puts "#{m.id} (#{m.labels.to_a * ' '})"
+  puts "#{m.id} (#{m.labels.to_a.sort_by { |l| l.to_s } * ' '})"
 end
-- 
1.6.4.2



             reply	other threads:[~2009-09-06 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-06 21:04 Michael Hamann [this message]
2009-09-07 11:03 ` Nicolas Pouillard
2009-09-09 14:38 ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1252271062-8775-1-git-send-email-michael@content-space.de \
    --to=michael@content-space.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox