From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov 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: Tue, 30 Aug 2022 10:20:10 +0300 Organization: LINKOV.NET Message-ID: <865yia2opx.fsf@mail.linkov.net> References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35632"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , Lars Ingebrigtsen , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 30 09:32:02 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 1oSvj7-00092o-NC for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 09:32:01 +0200 Original-Received: from localhost ([::1]:36170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSvj6-0004M3-KH for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 03:32:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSvh7-0002jp-As for emacs-devel@gnu.org; Tue, 30 Aug 2022 03:29:57 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:36565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSvh5-0002Wi-Ab; Tue, 30 Aug 2022 03:29:56 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id E530BE000A; Tue, 30 Aug 2022 07:29:46 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Mon, 29 Aug 2022 20:05:10 +0300") Received-SPF: pass client-ip=217.70.183.196; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, GAPPY_SUBJECT=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:294325 Archived-At: >> Can we please implement this for other VCSes as well? > > Personally I hope we discover some popular extension to Mercurial which > we'll be able to use in the same way as we do Git's index area here. And > then say job well done and keep the less-popular and outdated backends > unsupported. > > 'man hg' didn't give me enough clues, though. I am unfamiliar with Mercurial, but looking at https://www.mercurial-scm.org/wiki/GitConcepts#Git.27s_staging_area where the table says that index/staging area is not necessary in Mercurial and suggests to use shelve instead that corresponds to Git's stash, it would be possible to do the same with Hg as we first tried to do with Git using stash: put changes to stash/shelve, commit and restore the previous state. In older VCSes that have neither index/staging area nor stash/shelve, working area should be cleared by temporarily moving changed files somewhere. Anyway, the main point is that adepts of any existing VCS or any future VCS can easily adapt their VCSes for this feature by just implementing the backend call 'checkin-patch'.