swh: Support lookup of Hg tags.
* guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just Git tags. Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
f70c3429ed
commit
c4ff492879
10
guix/swh.scm
10
guix/swh.scm
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||||
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -455,8 +456,13 @@ URL could not be found."
|
||||||
((visit . _)
|
((visit . _)
|
||||||
(let ((snapshot (visit-snapshot visit)))
|
(let ((snapshot (visit-snapshot visit)))
|
||||||
(match (and=> (find (lambda (branch)
|
(match (and=> (find (lambda (branch)
|
||||||
(string=? (string-append "refs/tags/" tag)
|
(or
|
||||||
(branch-name branch)))
|
;; Git specific.
|
||||||
|
(string=? (string-append "refs/tags/" tag)
|
||||||
|
(branch-name branch))
|
||||||
|
;; Hg specific.
|
||||||
|
(string=? tag
|
||||||
|
(branch-name branch))))
|
||||||
(snapshot-branches snapshot))
|
(snapshot-branches snapshot))
|
||||||
branch-target)
|
branch-target)
|
||||||
((? release? release)
|
((? release? release)
|
||||||
|
|
Reference in New Issue