diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-10-03 20:54:38 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-10-08 11:51:38 +0200 |
commit | 59df0a7bd9e54003108c938519d64f6607cf48d8 (patch) | |
tree | 57356cfa46901741c2436efebfd5bc9286da19fd /lisp/vc/vc-bzr.el | |
parent | 5e7e85af02c18571837c8e2669b5bf2b7b9198a3 (diff) | |
download | emacs-59df0a7bd9e54003108c938519d64f6607cf48d8.tar.gz |
Add a VC command to prepare patches
* doc/emacs/vc1-xtra.texi (Miscellaneous VC): Add new node.
(Editing VC Commands): Document new feature.
* etc/NEWS: Mention 'vc-prepare-patch'.
* lisp/vc/log-view.el: Autoload 'log-view-get-marked'.
* lisp/vc/vc-git.el (vc-git-prepare-patch): Add Git implementation.
* lisp/vc/vc-hg.el (vc-git-prepare-patch): Add Mercurial implementation.
* lisp/vc/vc-bzr.el (vc-git-prepare-patch): Add Bazaar implementation.
* lisp/vc/vc.el (vc-read-revision): Add a MULTIPLE argument.
(vc-read-multiple-revisions): Add an auxiliary function that always
calls 'vc-read-revision' with a non-nil value for MULTIPLE.
(vc-prepare-patches-separately): Add user option.
(message-goto-body): Declare function.
(message--name-table): Declare function.
(vc-default-prepare-patch): Add a default implementation.
(vc-prepare-patch): Add command. (Bug#57400)
Diffstat (limited to 'lisp/vc/vc-bzr.el')
-rw-r--r-- | lisp/vc/vc-bzr.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index bce79967127..6f77f995554 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1324,6 +1324,20 @@ stream. Standard error output is discarded." (match-string 1) (error "Cannot determine Bzr repository URL"))))) +(defun vc-bzr-prepare-patch (rev) + (with-current-buffer (generate-new-buffer " *vc-bzr-prepare-patch*") + (vc-bzr-command + "send" t 0 '() + "--revision" (concat (vc-bzr-previous-revision nil rev) ".." rev) + "--output" "-") + (let (subject) + ;; Extract the subject line + (goto-char (point-min)) + (search-forward-regexp "^[^#].*") + (setq subject (match-string 0)) + ;; Return the extracted data + (list :subject subject :buffer (current-buffer))))) + (provide 'vc-bzr) ;;; vc-bzr.el ends here |