From patchwork Sun Jan 13 13:58:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Diamand X-Patchwork-Id: 10761277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD46A13B4 for ; Sun, 13 Jan 2019 13:58:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD93228B81 for ; Sun, 13 Jan 2019 13:58:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1FDF28B8B; Sun, 13 Jan 2019 13:58:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 516E928B82 for ; Sun, 13 Jan 2019 13:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbfAMN60 (ORCPT ); Sun, 13 Jan 2019 08:58:26 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38253 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfAMN6Z (ORCPT ); Sun, 13 Jan 2019 08:58:25 -0500 Received: by mail-wr1-f66.google.com with SMTP id v13so19975473wrw.5 for ; Sun, 13 Jan 2019 05:58:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=diamand.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dg10weZKrLpQCKULD51feFNIi/ItBFB1MljK6PFKT7E=; b=GAppg3AXTjAEuTXHfq+uxzbEfzZav7IkPWxikZLF9RONLUOTMSgzWWiKbe6RLi0W9o tEs7uocupZfmj1ZBUTFXT8CdeBoqdToTk5RbCyNX1IeM1KIRDQ3c3P/ZmRdBkJxIAy2U aYaBWEt92x1nun8BMRFZZI31uv5TusaWQ0Ocs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dg10weZKrLpQCKULD51feFNIi/ItBFB1MljK6PFKT7E=; b=guF+HJ8/L0zyhaj+SnjvHTZw5qixJqaCHgvMIAnonjTm4CnQBSEcWEqAfAUGJvrpRg IVXODxSsS6yMX5euwDopkxrfL8U+ZOE1QEcvSJDZhnSqi5ORrLbL+3wKqUIUd6R3L/R6 VUnw+fzyxKXFOjZ5ECMkVjfKNXh/R2+Yxh3hT6NoaAdyD7wPzoT3vzrJN9/lSrgGNUEV alJnPvq1ze0tqORu/1ZE3OrraK30Iq1ABieHI+LH+oIwardHwbexoQ+G4PrRcIBxmo4T +bL4qrOVfS1WEgQx4RauxM20WdddlqAm97Suww4ZeLUoIN88tyO2K+YnaPCtyQowUNsX hrtA== X-Gm-Message-State: AJcUukfY4JGyBrVlCcsmEHniaFDk5oN6+EbzNJ/nDOK0AQ4tlpXzOwNT vCJkZf1B9bD0WBN2icNcKpcJPoXW/rQ= X-Google-Smtp-Source: ALg8bN70Eg0dzUhNJR8wsZ6VsXHlDIz4ioF2bFKb193sT3iNVMhS8cjjK3KA+8mQs9+5gIlos7xyBg== X-Received: by 2002:adf:ffca:: with SMTP id x10mr21647524wrs.289.1547387903911; Sun, 13 Jan 2019 05:58:23 -0800 (PST) Received: from ethel.corp.roku ([81.145.207.254]) by smtp.gmail.com with ESMTPSA id o5sm44186864wmg.25.2019.01.13.05.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Jan 2019 05:58:23 -0800 (PST) From: Luke Diamand To: git@vger.kernel.org, viniciusalexandre@gmail.com, Romain Merland , =?utf-8?q?SZEDER_G=C3=A1bor?= , Vitor Antunes , amazo@checkvideo.com, aoakley@roku.com Cc: Luke Diamand Subject: [PATCH 2/2] git-p4: handle update of moved files when updating a shelve Date: Sun, 13 Jan 2019 13:58:15 +0000 Message-Id: <20190113135815.11286-3-luke@diamand.org> X-Mailer: git-send-email 2.20.1.100.g9ee79a14a8 In-Reply-To: <20190113135815.11286-2-luke@diamand.org> References: <20190113135815.11286-1-luke@diamand.org> <20190113135815.11286-2-luke@diamand.org> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Perforce requires a complete list of files being operated on. If git is updating an existing shelved changelist, then any files which are moved were not being added to this list. Signed-off-by: Luke Diamand --- git-p4.py | 1 + t/t9807-git-p4-submit.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 1998c3e141..20c5ce9903 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1875,6 +1875,7 @@ def applyCommit(self, id): editedFiles.add(dest) elif modifier == "R": src, dest = diff['src'], diff['dst'] + all_files.append(dest) if self.p4HasMoveCommand: p4_edit(src) # src must be open before move p4_move(src, dest) # opens for (move/delete, move/add) diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index 08dc8d2caf..4d5ea9e64c 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -548,7 +548,7 @@ test_expect_success 'submit --update-shelve' ' ) ' -test_expect_failure 'update a shelve involving a moved file' ' +test_expect_success 'update a shelve involving a moved file' ' test_when_finished cleanup_git && ( cd "$cli" &&