From commits-return-1180-archive-asf-public=cust-asf.ponee.io@ponymail.incubator.apache.org Fri Apr 26 23:41:51 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id BC14F18064C for ; Sat, 27 Apr 2019 01:41:50 +0200 (CEST) Received: (qmail 83063 invoked by uid 500); 26 Apr 2019 23:41:50 -0000 Mailing-List: contact commits-help@ponymail.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ponymail.incubator.apache.org Delivered-To: mailing list commits@ponymail.incubator.apache.org Received: (qmail 83054 invoked by uid 99); 26 Apr 2019 23:41:50 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Apr 2019 23:41:50 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 75FB885449; Fri, 26 Apr 2019 23:41:49 +0000 (UTC) Date: Fri, 26 Apr 2019 23:41:49 +0000 To: "commits@ponymail.apache.org" Subject: [incubator-ponymail] branch master updated: copy-list.py --target does not work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155632210942.23879.5716198107608101784@gitbox.apache.org> From: sebb@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-ponymail X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: df269552adb4be2fd95bc5f09878a6d421b1104e X-Git-Newrev: 46b80e8c7bc4ed03c2d0774c4a0dcf44fcd3ef90 X-Git-Rev: 46b80e8c7bc4ed03c2d0774c4a0dcf44fcd3ef90 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git The following commit(s) were added to refs/heads/master by this push: new 46b80e8 copy-list.py --target does not work 46b80e8 is described below commit 46b80e8c7bc4ed03c2d0774c4a0dcf44fcd3ef90 Author: Sebb AuthorDate: Sat Apr 27 00:41:35 2019 +0100 copy-list.py --target does not work This fixes #491 --- CHANGELOG.md | 1 + tools/copy-list.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c196e0..44e4a81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Bug: Errors with Elasticsearch 5.x in edit-lists.py (#489) - Bug: Errors with Elasticsearch 5.x in nullfav.py (#489) - Enh: Support scan/scroll for all current versions of ES (#489-contd) +- Bug: copy-list.py --target does not work (#491) - Bug/Enh: setup.py tries to install Python modules (#465) ## Changes in 0.11: diff --git a/tools/copy-list.py b/tools/copy-list.py index ab7100e..bdd3405 100755 --- a/tools/copy-list.py +++ b/tools/copy-list.py @@ -124,6 +124,7 @@ while (scroll_size > 0): for hit in page['hits']['hits']: doc = hit['_id'] body = es.get(doc_type = 'mbox', id = doc) + srcdoc = doc # save if targetLID != sourceLID: doc = hit['_id'].replace(sourceLID,targetLID) body['_source']['mid'] = doc @@ -136,7 +137,7 @@ while (scroll_size > 0): '_id': doc, '_source': body['_source'] }) - source = es.get(doc_type = 'mbox_source', id = doc, ignore=404) + source = es.get(doc_type = 'mbox_source', id = srcdoc, ignore=404) if source['found']: js_arr.append({ '_op_type': 'index',