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 5818e4a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions package-build.el
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5818e4a

Please sign in to comment.