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.bugs Subject: bug#60569: 29.0.60; vc-pull-and-push unsupported on non-git vcs Date: Tue, 24 Jan 2023 19:49:24 +0200 Organization: LINKOV.NET Message-ID: <86sffzx1sj.fsf@mail.linkov.net> References: <864jt58l8f.fsf@mail.linkov.net> <861qnr4yet.fsf@mail.linkov.net> <86edrm4gyk.fsf@mail.linkov.net> <838rhtjw9p.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="39862"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60569@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 24 18:52:30 2023 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 1pKNTC-000ADL-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Jan 2023 18:52:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKNSy-0007jY-DN; Tue, 24 Jan 2023 12:52:21 -0500 Original-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 1pKNSl-0007in-4A for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKNSk-0004EH-KT for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKNSk-0003EA-Fn for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jan 2023 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60569 X-GNU-PR-Package: emacs Original-Received: via spool by 60569-submit@debbugs.gnu.org id=B60569.167458269912378 (code B ref 60569); Tue, 24 Jan 2023 17:52:02 +0000 Original-Received: (at 60569) by debbugs.gnu.org; 24 Jan 2023 17:51:39 +0000 Original-Received: from localhost ([127.0.0.1]:57513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKNSN-0003Da-5X for submit@debbugs.gnu.org; Tue, 24 Jan 2023 12:51:39 -0500 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:59097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKNSK-0003DB-Sf for 60569@debbugs.gnu.org; Tue, 24 Jan 2023 12:51:37 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 13484240008; Tue, 24 Jan 2023 17:51:29 +0000 (UTC) In-Reply-To: <838rhtjw9p.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Jan 2023 14:00:34 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254058 Archived-At: >> > Thanks for keeping VC generic. >> >> Here is a one-line patch that adds support for vc-bzr. >> >> diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el >> @@ -381,7 +381,8 @@ vc-bzr--pushpull >> (setq-local compile-command >> (concat vc-bzr-program " " command " " >> (if args (mapconcat #'identity args " ") ""))))) >> - (vc-set-async-update buf)))) >> + (vc-set-async-update buf) >> + (get-buffer-process buf)))) > > Looks OK to me, but could you add some details regarding why this > change is needed? Did we change our requirements from the return > value of the pushpull method? Yes, to support vc-pull-and-push now the backend should return the process for the pull operation. Here is the improved documentation: diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 6443f6d57aa..f66e37fffa4 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -381,7 +381,9 @@ vc-bzr--pushpull (setq-local compile-command (concat vc-bzr-program " " command " " (if args (mapconcat #'identity args " ") ""))))) - (vc-set-async-update buf)))) + (vc-set-async-update buf) + ;; Return the process for `vc-pull-and-push' + (get-buffer-process buf)))) (defun vc-bzr-pull (prompt) "Pull changes into the current Bzr branch. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ef93edd1616..e551a243c80 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1289,6 +1289,7 @@ vc-git--pushpull (lambda (_name-of-mode) buffer) nil)))) (vc-set-async-update buffer) + ;; Return the process for `vc-pull-and-push' proc)) (defun vc-git-pull (prompt) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 0890b63d417..72160c35f57 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3064,7 +3064,8 @@ vc-pull-and-push operation on the current branch, prompting for the precise command if required. Optional prefix ARG non-nil forces a prompt for the VCS command to run. If this is successful, a \"push\" -operation will then be done. +operation will then be done. This is supported only in backends +where the pull operation returns a process. On a non-distributed version control system, this signals an error. It also signals an error in a Bazaar bound branch."