Skip to content

Commit

Permalink
package-build--revdesc(hg): Implement method properly
Browse files Browse the repository at this point in the history
tarsius committed Dec 13, 2024

Verified

This commit was signed with the committer’s verified signature.
tarsius Jonas Bernoulli
1 parent e3c1b80 commit 0f778dd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions package-build.el
Original file line number Diff line number Diff line change
@@ -424,8 +424,15 @@ 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

0 comments on commit 0f778dd

Please sign in to comment.