From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7164C1F462 for ; Sun, 9 Jun 2019 02:51:47 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 00/11] v2: implement message editing Date: Sun, 9 Jun 2019 02:51:36 +0000 Message-Id: <20190609025147.24966-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Some organizations are legally responsible for removing certain content but prefer to edit out sensitive parts of a message instead of purging it completely from history. We can build off existing purge functionality. Instead of replacing a message with an empty file; we instead replace it with the desired content. This ->replace method reindexes the modified message and updates the corresponding git commit in case the subject or authorship ident changes. A new tool, public-inbox-edit(1) wraps the new ->replace functionality by providing an editable mboxrd (suitable for publicinbox.mailEditor "mutt -f"). GIT_EDITOR/VISUAL/EDITOR can be used if publicinbox.mailEditor is not configured, but those are generally not ideal for editing base64 or QP-encoded messages. Eric Wong (Contractor, The Linux Foundation) (11): v2writable: consolidate overview and indexing call import: extract_author_info becomes extract_commit_info import: switch to "replace_oids" interface for purge v2writable: implement ->replace call admin: remove warning arg for unconfigured inboxes purge: start moving common options to AdminEdit module admin: beef up resolve_inboxes to handle purge options AdminEdit: move editability checks from -purge admin: expose ->config doc: document the --prune option for -index edit: new tool to perform edits Documentation/include.mk | 1 + Documentation/public-inbox-config.pod | 4 + Documentation/public-inbox-edit.pod | 109 ++++++++++++ Documentation/public-inbox-index.pod | 7 + MANIFEST | 5 + lib/PublicInbox/Admin.pm | 75 ++++++--- lib/PublicInbox/AdminEdit.pm | 50 ++++++ lib/PublicInbox/Import.pm | 101 ++++++----- lib/PublicInbox/V2Writable.pm | 200 +++++++++++++++++----- script/public-inbox-edit | 233 ++++++++++++++++++++++++++ script/public-inbox-purge | 103 ++---------- t/edit.t | 178 ++++++++++++++++++++ t/replace.t | 199 ++++++++++++++++++++++ 13 files changed, 1065 insertions(+), 200 deletions(-) create mode 100644 Documentation/public-inbox-edit.pod create mode 100644 lib/PublicInbox/AdminEdit.pm create mode 100755 script/public-inbox-edit create mode 100644 t/edit.t create mode 100644 t/replace.t -- EW