diff options
author | Xinglu Chen <public@yoctocell.xyz> | 2021-06-12 13:57:19 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-06-14 18:35:18 +0200 |
commit | c4ff4928798b1c2f02fd905b1bf7c75632cef376 (patch) | |
tree | 9b5aafc2c23d6680172f633f420100e44a99c7e8 /guix | |
parent | f70c3429ed0064eb4554722b4a60031385fd6785 (diff) |
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>
Diffstat (limited to 'guix')
-rw-r--r-- | guix/swh.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/swh.scm b/guix/swh.scm index f6d5241e06..b5c800011d 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> +;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -455,8 +456,13 @@ URL could not be found." ((visit . _) (let ((snapshot (visit-snapshot visit))) (match (and=> (find (lambda (branch) - (string=? (string-append "refs/tags/" tag) - (branch-name branch))) + (or + ;; Git specific. + (string=? (string-append "refs/tags/" tag) + (branch-name branch)) + ;; Hg specific. + (string=? tag + (branch-name branch)))) (snapshot-branches snapshot)) branch-target) ((? release? release) |