From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#57400: 29.0.50; Support sending patches from VC directly Date: Fri, 7 Oct 2022 15:56:54 +0300 Message-ID: References: <84v8qgn1z9.fsf@iki.fi> <87h71zo3p8.fsf@posteo.net> <87sfljmgwz.fsf@posteo.net> <87y1twvima.fsf@posteo.net> <84sfk2p846.fsf@iki.fi> <87h70i9ntt.fsf@posteo.net> <87edvl6vbj.fsf@gmail.com> <8735c1nn3y.fsf@posteo.net> <8fa87ad2-6d5c-2f9d-ed37-0b956fbadd2c@yandex.ru> <87sfk0jc0x.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16170"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: Robert Pluim , 57400@debbugs.gnu.org, Antoine Kalmbach To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 16:41:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogoXe-00043d-M6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 16:41:34 +0200 Original-Received: from localhost ([::1]:60144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogoXd-0000ko-P9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 10:41:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogmvS-0001mf-PI for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:58:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogmvS-0008CB-GX for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogmvS-0007fZ-26 for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57400 X-GNU-PR-Package: emacs Original-Received: via spool by 57400-submit@debbugs.gnu.org id=B57400.166514742529412 (code B ref 57400); Fri, 07 Oct 2022 12:58:02 +0000 Original-Received: (at 57400) by debbugs.gnu.org; 7 Oct 2022 12:57:05 +0000 Original-Received: from localhost ([127.0.0.1]:34770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogmuW-0007eJ-LW for submit@debbugs.gnu.org; Fri, 07 Oct 2022 08:57:04 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:41933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogmuV-0007dq-4Y for 57400@debbugs.gnu.org; Fri, 07 Oct 2022 08:57:03 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id bu30so7167366wrb.8 for <57400@debbugs.gnu.org>; Fri, 07 Oct 2022 05:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=DDUKhLKf1UFzSwd6drH9HB/Izdp4L5MPyHoAJYHHNJk=; b=VYD6hfOMNe3SfDf2BXQI07E23wbesHknOgeZgnFz1tznHIri+HTW2EgFh2iGaEduMK zNueDzkTqlpdVBA+6HGPdu3eR11NNIIiMLl0BFRmF4CpN/J+2gxJs2e2+KFXfO6itaVD RN6R3CUoD1H+uzmgOAJc2ifKFqqh+uzAP5AAqVlNboClg2mVXGDxoq9cZkzojxYfjnT4 HnJglG7mm8iEqlCDTNrIPIzlM5ZKjwx0rSTcisJAgbZDO+KGLiDA0Hna0tSVCG/kgT5M O55/xAoI3+QMGj3j4p7frl0WN7F4XvG0IpC/mEaqRPqQPPxNx5h/FWpfHriRWdQbPI72 qOPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DDUKhLKf1UFzSwd6drH9HB/Izdp4L5MPyHoAJYHHNJk=; b=NQOHQEkGQyJkT9u3cl7wJG6shEW4X9HhQv226XixYUW8dIYjAe4ZbfJvrm3tZqMinP fqcvZSDbVwo1KHu0UNgwUFOKjIEcbScS91V5HtnAxY6vKPDBGNYMWI86M7bNJYQtAWK7 d1vvZX0fsVOiIuVcpgxYolXDFyF6v+KEyQyylBrrOtQR05VLLVpg9jcIGIA4hTeZfX8h hGOOjpFNoDg1EH/igftiuHG49O7nlECaANOufdf9qMJVf4fR03o22uGsECuvb95NlIRn DSIzWc7kwfsOANIbi9Ufv57WrtJfX30e9rjU6UkUbxYtpgeu2+2W75OCsaZC9IB168dj cLww== X-Gm-Message-State: ACrzQf2FpWgN5jdWDzYEx/wjnCmteX7kTDexgMfw+j92l5bn+jR35UMs QixzdnuI3jtjB6WQg6JsXuo= X-Google-Smtp-Source: AMsMyM4DfhxVl5/5PjFVoiXwKRG7amC5aP9QQF+vHrbgK/rYfRsL66Fi3UuMtYVMr/yyc9y3c7953Q== X-Received: by 2002:a5d:64aa:0:b0:226:de65:810c with SMTP id m10-20020a5d64aa000000b00226de65810cmr3300812wrp.536.1665147417128; Fri, 07 Oct 2022 05:56:57 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m65-20020a1c2644000000b003c3339dfaaesm1546551wmm.4.2022.10.07.05.56.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 05:56:56 -0700 (PDT) Content-Language: en-US In-Reply-To: <87sfk0jc0x.fsf@posteo.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244798 Archived-At: On 07.10.2022 11:03, Philip Kaludercic wrote: > Dmitry Gutov writes: > >> Hi Philip, >> >> On 06.10.2022 15:38, Philip Kaludercic wrote: >>> I'm glad to hear that. Here is the updated patch: >> >> This version resolves the main questions I had as well. >> >> Here's one more, though: the way I normally used 'git format-patch' is >> I pass just one ref, and that's usually the name of the branch to >> start the history at (the argument from the manual). So I >> never had to "type revisions in the Git syntax" for this to work, >> something Eli was worried about. > > It might be tricky to do this in a VC-generic way, but what I can think > of would be if the command is invoked with a prefix argument, then prefix argument? Ok. I would imagine this to be the "default" usage scenario, though. > instead of querying for specific revisions, we query for one only, then > use 'next-revision' to check if it is a predecessor of the current > revision. If so, all the commits in-between are used. is not necessarily a predecessor: 'git format-patch master' works even when master has some more extra commits since the "merge base" commit. 'master' will point to the commit that's not present in the current branch. But vc-log-mergebase is fine with such situation. It calls (vc-call-backend backend 'mergebase rev1 rev2) to find the most recent common revision, and start after it. > The main issue I see here is that 'next-revision' requires a file > argument. What should that be? The 'mergebase' and 'print-log' actions don't seem to require it. >> Should this new command support this usage as well? >> >> The range of revisions could be fetched by passing the base revision >> as LIMIT to the 'print-log' action (like vc-log-mergebase does), but >> how the updated calling convention for vc-prepare-patch will look is >> not obvious to me. > > Even if we do this, the value of the argument "files" still remains an > open question. vc-log-mergebase passes (list rootdir) as FILES to 'print-log'. > It is for this reason that I prefer the current approach, especially > when combined with the ability to select commits in a log. I'm definitely not going to insist: I'm not the target audience of this feature.