From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH] sup-sync: restore state on messages that dont already exist
Date: Sun, 23 Aug 2009 11:36:59 -0700 [thread overview]
Message-ID: <1251052619-9915-1-git-send-email-rlane@club.cc.cmu.edu> (raw)
---
bin/sup-sync | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/bin/sup-sync b/bin/sup-sync
index 2aa00c3..003a72d 100755
--- a/bin/sup-sync
+++ b/bin/sup-sync
@@ -174,7 +174,12 @@ begin
## decide what to do based on message labels and the operation we're performing
dothis, new_labels = case
when (op == :restore) && restored_state[m.id] && old_m && (old_m.labels != restored_state[m.id])
+ num_restored += 1
[:update_message_state, restored_state[m.id]]
+ when (op == :restore) && restored_state[m.id] && !old_m
+ num_restored += 1
+ m.labels = restored_state[m.id]
+ :add_message
when op == :discard
if old_m && (old_m.labels != m.labels)
[:update_message_state, m.labels]
--
1.6.4
next reply other threads:[~2009-08-23 18:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-23 18:36 Rich Lane [this message]
2009-09-01 2:41 ` William Morgan
2009-08-31 0:50 Rich Lane
2009-08-31 1:48 ` Blake Burkhart
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=1251052619-9915-1-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
/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