branch: externals/vc-hgcmd
commit 876f7cbb1a8d37dd693e2a880f961dec08b2c2d2
Author: muffinmad <[email protected]>
Commit: muffinmad <[email protected]>
Handle nil on reading parents
---
vc-hgcmd.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vc-hgcmd.el b/vc-hgcmd.el
index fa365db..62424e1 100644
--- a/vc-hgcmd.el
+++ b/vc-hgcmd.el
@@ -470,8 +470,9 @@ Insert 'Running command' and display buffer text if COMMAND"
(defun vc-hgcmd-dir-extra-headers (_dir)
"Return summary command for DIR output as dir extra headers."
- (let* ((parents (split-string (vc-hgcmd-command "log" "-r" "p1()+p2()"
"--template" "{rev}:{node|short}\\0{branch}\\0{tags}\\0{desc|firstline}\n")
"\n"))
- (result (apply #'concat (mapcar #'vc-hgcmd--parent-info parents))))
+ (let* ((parents (vc-hgcmd-command "log" "-r" "p1()+p2()" "--template"
"{rev}:{node|short}\\0{branch}\\0{tags}\\0{desc|firstline}\n"))
+ (result (when parents
+ (apply #'concat (mapcar #'vc-hgcmd--parent-info
(split-string parents "\n"))))))
(with-temp-buffer
(vc-hgcmd-command-output-buffer (current-buffer) "summary")
(concat result