From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 60569@debbugs.gnu.org
Subject: bug#60569: 29.0.60; vc-pull-and-push unsupported on non-git vcs
Date: Tue, 24 Jan 2023 19:49:24 +0200 [thread overview]
Message-ID: <86sffzx1sj.fsf@mail.linkov.net> (raw)
In-Reply-To: <838rhtjw9p.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Jan 2023 14:00:34 +0200")
>> > 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."
next prev parent reply other threads:[~2023-01-24 17:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 7:58 bug#60569: 29.0.60; vc-pull-and-push unsupported on non-git vcs Juri Linkov
2023-01-18 17:39 ` Juri Linkov
2023-01-20 4:02 ` Richard Stallman
2023-01-22 17:28 ` Juri Linkov
2023-01-23 12:00 ` Eli Zaretskii
2023-01-24 17:49 ` Juri Linkov [this message]
2023-01-24 18:08 ` Eli Zaretskii
2023-01-24 18:29 ` Juri Linkov
2023-01-22 2:25 ` Dmitry Gutov
2023-01-22 17:27 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86sffzx1sj.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=60569@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.