From 5818e4abf88f9354691c1359f74e269403578c11 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Fri, 13 Dec 2024 18:18:49 +0100 Subject: [PATCH] package-build--revdesc(hg): Implement method properly --- package-build.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package-build.el b/package-build.el index 2566f92..513b23f 100644 --- a/package-build.el +++ b/package-build.el @@ -424,8 +424,14 @@ or snapshots are build.") "--abbrev=12" "--match" tag rev)) (car (process-lines "git" "rev-parse" "--short=12" rev)))) -(cl-defmethod package-build--revdesc ((_rcp package-hg-recipe) rev &optional _tag) - rev) +(cl-defmethod package-build--revdesc ((_rcp package-hg-recipe) rev &optional tag) + ;; Cannot use "{shortest(node, minlength=12)}" because that results + ;; in "hg: parse error: can't use a key-value pair in this context". + (car (process-lines + "hg" "id" "--id" "--rev" rev "--template" + (if tag + (format "{latesttag('%s') % '{tag}-{distance}-m{short(node)}'}\n" tag) + "{short(node)}\n")))) ;;;; Tag