From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id COEaEKsYN2XVFwAAauVa8A:P1 (envelope-from ) for ; Tue, 24 Oct 2023 03:06:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id COEaEKsYN2XVFwAAauVa8A (envelope-from ) for ; Tue, 24 Oct 2023 03:06:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B919B39317 for ; Tue, 24 Oct 2023 03:06:50 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="CW3F/P45"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698109610; a=rsa-sha256; cv=none; b=BKOwu7lFf8DVarIACZRvxXekqp7nbce+IBOrOdmKudQ/satUZD0Ps71MKs7oQm8LLYMdZi qMhvgy+Ywppj5wSBjkpZM4QlvmqszslgKPbAKW2v8ZLAltdwAjR/Z08RR1Y8onAGFtQb0U QE/ZaX/RHXsvYQucYq/0tY05pmp+Gzkr1NivSdHkBdYUPawEw/qjunrobJ7YdyX+oS5U3S t9fufq85/5cCJwdJ7yHJKuA136T3NYENq5gK/ZSNLxt62NZoJv7b6+HQSHDRGiRNfRx35u YPO9cXHZP2ZsUss8EIFPKro9+aBGnkIjvu0+fjkH01QqbShAaa6n9BEnsEi5dw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="CW3F/P45"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698109610; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=K6P3xRACR7PYKCD3SfUzyQRJq065QdZb/tqPFK/bNLA=; b=ZSKST4wPYoiqOwLGd1akgRlF8QGcLXTYLwGReFOpcJlemAhT4y761TqzDQxe0NDRPJplul KA0PFFuGl+IN9gnX64CDDOX9EJqGhDu1eVLS2l1FFoVPAIyUyxcB8OBrXzlhD2w3Px+Gc4 aXgjw3BmgyAk+XQ6eM5E5rCeTVyzX2YM4NVEeNo4x8Pr8PhpIhB+b7zJI0+ASC366wN8s/ WaiAsY4ks9RGqUUn+wTmE3e1v38Ecj6ON8CQcXYvJXn5JqEBZk9p34a5NUPduYeZ077tNe WydNITf5N79ch4maSuIb1cl3k07Yh6BWJJWV6jKTopMJ1uRnXJ4FC/Iiy8+Row== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qv5sQ-0004lG-Qi; Mon, 23 Oct 2023 21:06:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qv5sP-0004l2-00 for guix-patches@gnu.org; Mon, 23 Oct 2023 21:06:33 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qv5sO-0002k3-Nv for guix-patches@gnu.org; Mon, 23 Oct 2023 21:06:32 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qv5sr-0005Py-VS for guix-patches@gnu.org; Mon, 23 Oct 2023 21:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66704] [PATCH 0/1] patman depends on Git Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Oct 2023 01:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66704 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: 66704@debbugs.gnu.org Received: via spool by 66704-submit@debbugs.gnu.org id=B66704.169810959120786 (code B ref 66704); Tue, 24 Oct 2023 01:07:01 +0000 Received: (at 66704) by debbugs.gnu.org; 24 Oct 2023 01:06:31 +0000 Received: from localhost ([127.0.0.1]:52603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv5sM-0005PC-7u for submit@debbugs.gnu.org; Mon, 23 Oct 2023 21:06:30 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:54444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv5sJ-0005Os-2Q for 66704@debbugs.gnu.org; Mon, 23 Oct 2023 21:06:28 -0400 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-7789a4c01easo257411185a.0 for <66704@debbugs.gnu.org>; Mon, 23 Oct 2023 18:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698109552; x=1698714352; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K6P3xRACR7PYKCD3SfUzyQRJq065QdZb/tqPFK/bNLA=; b=CW3F/P4556OqQi8hpzlzSbv+xgxGT93zkccRCzhyTCs+ThyzfvW7NqPaeAIDBVvIBB d39MPBGXJzhTZXiwr8oIRvN8K1GePtYfw9UV+1fH6uY7xuJruAaCLaf1CgWdR0nb6BsS yRpnmVKNDAhLpgdnIxugPfNvQES9yhduTyNDVBSGcFidKYeD9LIxwUze8RlGMcEiuEb4 4dSBUBvG1Je382Z19B6F2QSWb9W0j3JRppKx96+xEQ0wrn405eovEBizsupDE+GMCdg0 gEmefInEDRFUNh9TdHQfqAPOg6SoCCNCwBBqijpYSZkfM2cDwmmqcXKfggGJ1YF1DHod tNxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698109552; x=1698714352; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K6P3xRACR7PYKCD3SfUzyQRJq065QdZb/tqPFK/bNLA=; b=QoujAMxISfArbJUoN9qgU5SsGF6RlEi/BBqS/cecIUKAy6UE0S0EtxmC5XDW/4NL9G yD36TKdVkECzH2c6kP7owwHNLpZY2RvRWSEe/vUfeHBVS4oJlhcRoCSuatZSXRBmt0c6 We5qcSsOQBCeZvqBuomYR5sRYNPxZCVChDFz/dA//BL+lGBKtj9kRiwLpdlqdXV8odI5 afoeZB9CudI9iTMYwCB+h6cUlrtUC5FJRM8StcUUSyOTmDNMlwC4yRjpugO7Nr7ZMC+C 6GQMK+lfEcLvHflRSEq7T0imo8ZWrJ5TEYkSdowLuGxlO9YJgH8FMoG2zjzitk/NEw7m LIYQ== X-Gm-Message-State: AOJu0YyE+bmoPWRTTJsYV/8khxTtZsL2kHsFRYud+B4+KhiB7obdajDO BMGSztwnQkx6US8639Ix5MtkhjhKyJ7TTQ== X-Google-Smtp-Source: AGHT+IH0d4IhfCUn4/7NqeF1k4vQwHv5ch0EJfx7qj7sWTFHkpwG3WfN8IBoeZTGaEwBoDoPa/yXWA== X-Received: by 2002:a05:620a:40d6:b0:778:b559:4744 with SMTP id g22-20020a05620a40d600b00778b5594744mr9232816qko.58.1698109551997; Mon, 23 Oct 2023 18:05:51 -0700 (PDT) Received: from hurd (dsl-10-148-194.b2b2c.ca. [72.10.148.194]) by smtp.gmail.com with ESMTPSA id qs21-20020a05620a395500b007671cfe8a18sm3109231qkn.13.2023.10.23.18.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 18:05:51 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: (Simon Tournier's message of "Mon, 23 Oct 2023 18:07:56 +0200") References: Date: Mon, 23 Oct 2023 21:05:50 -0400 Message-ID: <87jzrc6d8x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.87 X-Spam-Score: 2.87 X-Migadu-Queue-Id: B919B39317 X-TUID: RG6edUdsC19E Hi Simon, Simon Tournier writes: > Hi, > > Assume, I am running in some Git repository, e.g., > > $ git config --get branch.tmp.remote > origin > > Then, I get this error: > > $ guix shell -C patman -- patman -h > Traceback (most recent call last): > File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2= 023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, i= n run_pipe > last_pipe =3D cros_subprocess.Popen(cmd, cwd=3Dcwd, **kwargs) > File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2= 023.07.02/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", li= ne 83, in __init__ > super(Popen, self).__init__(args, stdin=3Dstdin, > File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/pyt= hon3.10/subprocess.py", line 969, in __init__ > self._execute_child(args, executable, preexec_fn, close_fds, > File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/pyt= hon3.10/subprocess.py", line 1845, in _execute_child > raise child_exception_type(errno_num, err_msg, err_filename) > FileNotFoundError: [Errno 2] No such file or directory: 'git' > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/bin= /.patman-real", line 47, in > parser.add_argument('-p', '--project', default=3Dproject.detect_proje= ct(), > File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib= /python3.10/site-packages/patman/project.py", line 19, in detect_project > top_level =3D gitutil.get_top_level() > File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib= /python3.10/site-packages/patman/gitutil.py", line 627, in get_top_level > return command.output_one_line('git', 'rev-parse', '--show-toplevel') > File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2= 023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 128, = in output_one_line > result =3D run_pipe([cmd], capture=3DTrue, oneline=3DTrue, > File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2= 023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 99, i= n run_pipe > raise Exception("Error running '%s': %s" % (user_pipestr, str)) > Exception: Error running 'git rev-parse --show-toplevel': > > > That=E2=80=99s because =E2=80=99patman=E2=80=99 runs =E2=80=99git=E2=80= =99 via the file gitutils.py, see: > > -*- mode:grep; default-directory: "/tmp/u-boot-2023.07.02/tools/patman/" = -*- > > 20 candidates: > ./gitutil.py:29: cmd =3D ['git'] > ./gitutil.py:87: pipe =3D ['git', 'name-rev', commit_hash] > ./gitutil.py:139: remote =3D command.output_one_line('git', '--git= -dir', git_dir, 'config', > ./gitutil.py:141: merge =3D command.output_one_line('git', '--git-= dir', git_dir, 'config', > ./gitutil.py:231: pipe =3D ['git'] > ./gitutil.py:252: pipe =3D ['git', 'clone', git_dir, '.'] > ./gitutil.py:265: pipe =3D ['git'] > ./gitutil.py:285: pipe =3D ['git', '--git-dir', git_dir, 'worktree', '= list'] > ./gitutil.py:300: pipe =3D ['git', '--git-dir', git_dir, 'worktree', '= add', '.', '--detach'] > ./gitutil.py:315: pipe =3D ['git', '--git-dir', git_dir, 'worktree', '= prune'] > ./gitutil.py:337: cmd =3D ['git', 'format-patch', '-M'] > ./gitutil.py:414: 'git', 'config', 'sendemail.suppresscc', raise_o= n_error=3DFalse) > ./gitutil.py:496: git_config_to =3D command.output('git', 'config'= , 'sendemail.to', > ./gitutil.py:511: cmd =3D ['git', 'send-email', '--annotate'] > ./gitutil.py:627: return command.output_one_line('git', 'rev-parse', '= --show-toplevel') > ./gitutil.py:636: fname =3D command.output_one_line('git', 'config', '= sendemail.aliasesfile', > ./gitutil.py:654: uname =3D command.output_one_line('git', 'config', '= --global', 'user.name') > ./gitutil.py:664: uemail =3D command.output_one_line('git', 'config', = '--global', 'user.email') > ./gitutil.py:675: 'git', 'config', 'format.subjectprefix', raise_o= n_error=3DFalse) > ./gitutil.py:699: return command.output_one_line('git', 'show', '-s', = '--pretty=3Dformat:%H') > > I propose to wrap =E2=80=99patman=E2=80=99 with =E2=80=99git=E2=80=99, se= e patch. I see 'git send-email' in the above, so you'll also want to wrap with `(,git "send-email"). Did you test that this suffices to get a fully self-contained working patman? Maybe you can send a v2 with patman. You can add these 'Series-*' git trailers to your commit: --8<---------------cut here---------------start------------->8--- Change-Id: xxxxxxx [...] Series-to: 66704@debbugs.gnu.org Series-version: 2 Series-changes: 2 - Also add 'send-email' output of git to wrapper --8<---------------cut here---------------end--------------->8--- Then to send, you simply do: $ patman And it'll annotate the patch for you and you don't need to remember tracking the '--to' value. --=20 Thanks, Maxim