From patchwork Fri Oct 30 03:46:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1390721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=eRbMRfYM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMpCW4sWZz9sPB for ; Fri, 30 Oct 2020 14:47:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 75F1582644; Fri, 30 Oct 2020 04:46:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eRbMRfYM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 71F0E8261D; Fri, 30 Oct 2020 04:46:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EEDBC82585 for ; Fri, 30 Oct 2020 04:46:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x141.google.com with SMTP id k6so5366569ilq.2 for ; Thu, 29 Oct 2020 20:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0jXxHkzkqViYLv9ElhUeF852xBDbB+fFbZiaugCpMzc=; b=eRbMRfYMZZiA8DrGDR4dOX5yQHd/6yPDA+6p+HuykFfs/arwH0htSYekHrOl0iX/Ex QXHiAgYYfIsiesM5mXr3Fnp4BZgjRdz0saad1b5YD2C4cPY8QfSD0FUCZdz103UAhTn+ V9OuWqQk72ZpXgil6ouUC4Fc9OedbqrCi7bcs= 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:mime-version :content-transfer-encoding; bh=0jXxHkzkqViYLv9ElhUeF852xBDbB+fFbZiaugCpMzc=; b=qNHIFxpKbHca2qSEDHMazfAesqsBSWheLE4ocuX75d79kVIIDJKzAitqZ3vgd6M7Te QvLOvoa4yES5sBUdbNbET0jR80bhsuJecjU7egRyQ7Z3Qq3EeNN02lEtBVF5MKVhG8zv htWYT4tNE4vRjzs2+t/kO4zz6f3GZNhQhLiy3w0lJB6/iOmx+3NHWLp24YlJV4+uwfPk 9TXrspc3UpP67SISodnd3Srf85jmVHRD47DW+jrY6ey+U5VZs1WJIG2ShK2kWQWRLryl LFvYPk7lDvGMOd3RIf4M70onXXjCYc2JOUL6KXAOa0XSyxeNXQAXo8sh8kRIIV9sM7PV t6wg== X-Gm-Message-State: AOAM530bjZ7Ue/KqCBYQNPpmAmx36ONWwMmyweVG70mATT+Ujwi8SFot 03nVs8KHDKbOS3KYqpANyC1DPGtwlIwY2JOQ X-Google-Smtp-Source: ABdhPJzFS7sigeZxDPm2Rvq1P4XC6KFkWZa7cSzDJQ4y2VkjVoV46x0gUcJ4Yr7WeF9O8XigWBK/aA== X-Received: by 2002:a05:6e02:c12:: with SMTP id d18mr478157ile.136.1604029605273; Thu, 29 Oct 2020 20:46:45 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id n28sm4858693ila.52.2020.10.29.20.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 20:46:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: patchwork@lists.ozlabs.org, Doug Anderson , Tom Rini , Simon Glass , Bin Meng , Daniel Schwierzeck , Heiko Schocher , Heinrich Schuchardt , Marek Vasut , Stephen Warren Subject: [PATCH v3 00/29] patman: Collect review tags and comments from Patchwork Date: Thu, 29 Oct 2020 21:46:09 -0600 Message-Id: <20201030034638.2858999-1-sjg@chromium.org> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Patman is a useful tool for creating, checking sending out patches. It automates the creation of patches, simplifies checking them and handles cover letters and change logs. However once patches are sent and reviewers add Reviewed-by tags, etc., these must be manually added into the commits using git before the next version of the series is sent. Also, the only way to look at patches is in the web interface. It would be nice if patman could talk to Patchwork and collect the review tags itself. Even better if it could show the review comments in a command-line view patch-by-patch to speed up addressing comments. This series adds these features to patman, talking directly to the Patchwork REST API. While pwclient seems like it could handle some of this, or at least provide a library to patman, the documentation[1] doesn't really explain what the commands do and it doesn't seem to work with the current Patchwork (e.g. pwclient git-am requires a patch number but Patchwork seems to use an ID now). With these changes it is possible to type 'patman status' and see a list of new review tags. It is also possible to create a new branch with those tags and list out the review comments as small snippets on the command line. I have been using these features for a little while and they seem useful, so herewith a series. Some of the patches here clean up style problems in patman and other minor problems. See the last four patches for the main changes. You can find it at u-boot-dm/patman-working[2] [1] https://patchwork.readthedocs.io/projects/pwclient/en/latest/usage/ [2] https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/tree/patman-working Changes in v3: - Rename GetMetaData() function to snake case - Fix incorrect commenting on a line in prepare_patches() - Allow tags to be inserted in the middle of the commit message Changes in v2: - Adjust the algorithm to handle patch/commit mismatch - Correct Python style problems - Use REST API instead of web pages - Many changes to the whole series, including new patches - Use of REST API instead of the web site Simon Glass (29): patman: Correct operation of -n azure/gitLab/travis: Add pygit2 as a dependency for tests patman: Update how tests are run patman: Fix whitespace errors in func_test patman: Use capture_sys_output() consistently patman: Fix remaining pylint3 warnings in func_test patman: Allow linking a series with patchwork patman: Fix indenting in patchstream patman: Fix constant style in patchstream patman: Rename functions in patchstream patman: Rename variables in patchstream patman: Drop unused args in patchstream patman: Fix up argument/return docs in patchstream patman: Move warning collection to a function patman: Attach warnings to individual patches patman: Convert 'Series-xxx' tag errors into warnings patman: Drop unused signoff member patman: Add a test for PatchStream tags patman: Add some tests for warnings patman: Convert testBasic() to use an interator patman: Fix spelling of plural for warning patman: Don't ignore lines starting with hash patman: Allow showing a Commit as a string patman: Improve handling of files patman: Detect missing upstream in CountCommitsToBranch patman: Support checking for review tags in patchwork patman: Support updating a branch with review tags patman: Support parsing of review snippets patman: Support listing comments from patchwork .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- .travis.yml | 1 + tools/buildman/control.py | 6 +- tools/patman/README | 110 +++- tools/patman/checkpatch.py | 18 +- tools/patman/commit.py | 5 + tools/patman/control.py | 71 ++- tools/patman/func_test.py | 983 +++++++++++++++++++++++++++++--- tools/patman/gitutil.py | 10 +- tools/patman/main.py | 42 +- tools/patman/patchstream.py | 485 +++++++++++----- tools/patman/series.py | 8 +- tools/patman/status.py | 482 ++++++++++++++++ tools/patman/terminal.py | 21 +- tools/patman/test_checkpatch.py | 6 +- 16 files changed, 1981 insertions(+), 271 deletions(-) create mode 100644 tools/patman/status.py