From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57400: 29.0.50; Support sending patches from VC directly Date: Fri, 07 Oct 2022 15:30:11 +0000 Message-ID: <87edvj7it8.fsf@posteo.net> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35878"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , 57400@debbugs.gnu.org, Antoine Kalmbach To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 18:10:51 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 1ogpw2-0009AJ-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 18:10:50 +0200 Original-Received: from localhost ([::1]:35782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogpw1-0006Zo-6D for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 12:10:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpJW-0006mx-QC for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 11:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpJW-0007lj-Cg for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 11:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogpJW-000641-6r for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 15:31: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.166515662523253 (code B ref 57400); Fri, 07 Oct 2022 15:31:02 +0000 Original-Received: (at 57400) by debbugs.gnu.org; 7 Oct 2022 15:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:37225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpIu-00062z-DK for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:30:24 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:54529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpIs-00062c-CD for 57400@debbugs.gnu.org; Fri, 07 Oct 2022 11:30:23 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5BFA8240026 for <57400@debbugs.gnu.org>; Fri, 7 Oct 2022 17:30:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156616; bh=TjEzwvjqmDL3DARCk8w8r8CvRnyetxA5J1T0VgppBj8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=ADzqU2sHNTdQ/HbHDhC9C4VVaZFRQg/Qjop5UafD0LA07O9f15tBo/YlTKYHepsaO a9wkAtOYoUk7bJE4kpnf9BrZShgkBPqfubXikcS25Nq8WeszffBKw39IJkju0lvQIS +wzt6t1WYkqYq34hHNp3cNZ0UhYmsYMmWPA3MSNTp9wEiY61IBKdL5GFC298cwJf45 hwdlG1dBQ5iyLUF5gXBHqBB9s7qsmEvk7JuigKBDgX5WI0aUfqzu0NktFwyIFJ1zV0 RWyuC1+vsjE0dOjuXeAizWpW7ahWoa84IMimLJSNnTuBUE0PKQtFHWyRUowkH967zM mVlDvMu7lghIw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkXLX0H2Lz9rxK; Fri, 7 Oct 2022 17:30:11 +0200 (CEST) In-Reply-To: (Dmitry Gutov's message of "Fri, 7 Oct 2022 15:56:54 +0300") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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:244823 Archived-At: Dmitry Gutov writes: > > 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. It could be the default too, I guess it depends on how well the feature works. I certainly know from my own works flow that I don't always want to submit all the commits on a branch, but just one or two, so having the option would be appreciated. >> 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. I will take a look at those. >>> 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'. That appears to only work if the backend defines a root directory. >> 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. I could imagine falling back onto the manual selection of revisions when the root directory is not defined, but I fear that would be too inconsistent and might lead to unintended/unexpected behaviour when switching between VCSs.