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.devel Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349) Date: Mon, 17 Oct 2022 03:11:18 +0300 Message-ID: References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> <999d1cb2-6b7f-8020-5202-e919278d895e@yandex.ru> <877d2pnqup.fsf@yahoo.com> <86zgfknc9a.fsf@mail.linkov.net> <87sflc91q7.fsf@gnus.org> <87wnao7l74.fsf@gnus.org> <0d5679a1-7635-53db-51c7-0ac0e35325d8@yandex.ru> <87mtbke7wf.fsf@gnus.org> <87ilm8e5am.fsf@gnus.org> <87k06nz9g8.fsf@gnus.org> <874jxrz5ai.fsf@gnus.org> <4f7fa9ba-2a85-3bc6-8f4f-bf59ee6598ca@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37666"; 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: Juri Linkov , Po Lu , "Alfred M. Szmidt" , eliz@gnu.org, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 17 02:13:05 2022 Return-path: Envelope-to: ged-emacs-devel@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 1okDke-0009cw-BX for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Oct 2022 02:13:04 +0200 Original-Received: from localhost ([::1]:36256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okDkc-00028e-LD for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Oct 2022 20:13:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okDjd-0001Qk-Ls for emacs-devel@gnu.org; Sun, 16 Oct 2022 20:12:03 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:51186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okDjb-0007Ff-NW; Sun, 16 Oct 2022 20:12:01 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id y10so7658466wma.0; Sun, 16 Oct 2022 17:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=Swo8fwRfKAq5OK4+aqTMKx929ZjCs46K6fgSZ4GFYiw=; b=Xu5oObb3x1lJ7Jv+wUE1zU98+KleA2f6Kk4hzRLCjerbI61QCvQnV7Vo3w+NF5p6j8 Ml1AHUfNhXN2yn1tB4bi6mA+imiafURFPHAXLcCRvX1b0pegKMNSpf3HCkwn+Z48k3aG 5xIMLvROTSgwKsCllSbAOSLK68Xk1518LRQoqmHCVF4J/OADtGdgJYe8u3PD3EeQeQO1 zOdA8Fe2NtVR1kUwB452oQIRj+eS9w9PQXrn/LgfSQOBnQpxdXgkZ1oVrD8r2ZXD144S o3sGVadse789GYlBkn2warAetK7hkqGxKKx3PWV2sKV1hwXwLpFvvdIdc3DnKOxZgAXL iquQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :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=Swo8fwRfKAq5OK4+aqTMKx929ZjCs46K6fgSZ4GFYiw=; b=b7VzSnE4ouiinlXXsM8ios65dn/KrQUPyprlayRdY+sl6yArnepX1+vz/buf8Uxt/z Hd+MCpESgOdTTPGyl1A+YynW1Boz5NDWkTOoqN7wXzRN7mm9tOVh7mXWN0jYV3Fd3gsZ 9pLtCOYb6gVWcpaMoOl7146ve/3EGpHV2+lgvvxXVRpXOrSX8puzXO++4k6XGxmfDlWB m6Rj8OsQWj3fPdQ4ISYoObf19I+VZjQZYMGNLfq2wyx0lObeBlrvn0psMWDCBYZqo2SF /HvzC4y/3b0GBQ4jUZHCLwmRg3xx1Uzy/hSxUvsv9uuovVI3XOdbYKn1Qxn/zN7SA/NN vhAw== X-Gm-Message-State: ACrzQf26vF3pWEHgd08K/XFaDqKUmt2VhEQEbHNyftwslqR/fFkoHSTc lZl92AsZS+jr58E1BKb2BjY= X-Google-Smtp-Source: AMsMyM71EAN4icQt9YugwvIW044Z+Q9bqBbmHwQ+FwiUrzZjW2vkZaRSlQVc4AxJqyXG+4kcOiIEmw== X-Received: by 2002:a05:600c:3542:b0:3c6:e509:b051 with SMTP id i2-20020a05600c354200b003c6e509b051mr9559003wmq.142.1665965480386; Sun, 16 Oct 2022 17:11:20 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w12-20020a05600c474c00b003a682354f63sm8305960wmo.11.2022.10.16.17.11.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Oct 2022 17:11:20 -0700 (PDT) Content-Language: en-US In-Reply-To: <4f7fa9ba-2a85-3bc6-8f4f-bf59ee6598ca@yandex.ru> Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, GAPPY_SUBJECT=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297895 Archived-At: On 01.09.2022 14:48, Dmitry Gutov wrote: > On 01.09.2022 14:45, Lars Ingebrigtsen wrote: >> Dmitry Gutov  writes: >> >>> The step of "applying the saved patch" relies on our Lisp code being >>> correct and being able to handle any diff. It's not an outrageous >>> assumption, but an assumption nevertheless. >> Oh, I was assuming that we were assuming that we had "patch" installed >> for this to work.  I don't think that's unreasonable for new >> functionality like this. > > I suggested this upthread but didn't get any affirmative response. > > This would be easier, yes. So... I ended up using 'patch', but not for backing up existing uncommitted changes. It's the same reason as why 'hg shelve' and 'git stash' are a poor fit: when we try to apply the patch at the end, we can get a conflict (and not every such conflict will be easy enough to fix by hand). The file-copying approach matches Git's implementation well, and hopefully will work with various backends, including CVS. I only tested with Hg for now. Feedback welcome.