Skip to content

Commit

Permalink
package-build--revdesc(hg): Implement method properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Dec 13, 2024
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
Expand Up @@ -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

Expand Down

0 comments on commit 0f778dd

Please sign in to comment.