From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 73881138A87 for ; Sat, 21 Feb 2015 21:52:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36827E09AE; Sat, 21 Feb 2015 21:52:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A7BC6E09B0 for ; Sat, 21 Feb 2015 21:52:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 662EF340A62 for ; Sat, 21 Feb 2015 21:52:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 08B5C12432 for ; Sat, 21 Feb 2015 21:52:06 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1424555501.bd4eb9bd65045c50b475b8f475e780c182c5b857.robbat2@gentoo> Subject: [gentoo-commits] proj/ag:master commit in: / X-VCS-Repository: proj/ag X-VCS-Files: ag X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: bd4eb9bd65045c50b475b8f475e780c182c5b857 X-VCS-Branch: master Date: Sat, 21 Feb 2015 21:52:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3e145eef-e848-4192-950d-5ee29b96e15e X-Archives-Hash: f6b134cc558abbb618db5b1713ff7336 commit: bd4eb9bd65045c50b475b8f475e780c182c5b857 Author: Robin H. Johnson gentoo org> AuthorDate: Sat Feb 21 21:51:41 2015 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sat Feb 21 21:51:41 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=bd4eb9bd readonly mode for processing new as well. Signed-off-by: Robin H. Johnson gentoo.org> --- ag | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ag b/ag index 37c9079..b9f3f75 100755 --- a/ag +++ b/ag @@ -19,6 +19,7 @@ $options.name = nil $options.index_only = false $options.no_threading = false $options.debug = false +$options.readonly = false op = OptionParser.new do |opts| opts.banner = "Usage: ag <<--index-full|--index-new|--delete|--reindex|--info> <--list listname>> [options]" @@ -78,6 +79,10 @@ op = OptionParser.new do |opts| opts.on('--debug', 'Print debug messages') do $options.debug = true end + + opts.on('--readonly', 'Do not alter the maildir in any way') do + $options.readonly = true + end end op.parse! @@ -120,7 +125,7 @@ def do_incremental begin Ag::Storage.store($options.name, mail) - maildir_message.process + maildir_message.process unless $options.readonly rescue => e $stderr.puts "Cannot save message #{mail.message_id}: #{e.message}" next