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