Function: vc-hg-cherry-pick-comment
vc-hg-cherry-pick-comment is a byte-compiled function defined in
vc-hg.el.gz.
Signature
(vc-hg-cherry-pick-comment FILES REV REVERSE)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-hg.el.gz
(defun vc-hg-cherry-pick-comment (_files rev reverse)
(let (short long comment)
(with-temp-buffer
(vc-hg-command t 0 nil "log" "--limit=1"
(format "--rev=%s" rev)
"--template={node|short}\n{node}\n{desc}")
(goto-char (point-min))
(setq short (buffer-substring-no-properties (point) (pos-eol)))
(forward-line 1)
(setq long (buffer-substring-no-properties (point) (pos-eol)))
(forward-line 1)
(setq comment (buffer-substring-no-properties (point) (point-max))))
(if reverse
(format "Summary: Backed out changeset %s\n\n" short)
;; The additional line is indeed separated from the original
;; comment by just one line break, for 'hg graft'.
(format "Summary: %s\n(grafted from %s)\n" comment long))))