From: Xinglu Chen <public@yoctocell.xyz>
To: 48971@debbugs.gnu.org
Subject: [bug#48971] [PATCH 1/2] swh: Support lookup of Hg tags.
Date: Sat, 12 Jun 2021 13:57:19 +0200 [thread overview]
Message-ID: <cf5071f214629f4fda9cdfb6aad3bf243e8ff070.1623498543.git.public@yoctocell.xyz> (raw)
In-Reply-To: <cover.1623498543.git.public@yoctocell.xyz>
* guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just
Git tags.
---
I noticed that the ‘commit-id?’ procedure checks if REFERENCE is of
length 40, this will result in false negatives because some packages
that use ‘hg-fetch’ only specify the first ~10 or ~15 characters of the
changeset revision. We should probably fix that.
guix/swh.scm | 10 ++++++++--
1 file 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)
--
2.32.0
next prev parent reply other threads:[~2021-06-12 11:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-12 11:52 [bug#48971] [PATCH 0/2] Add SWH support for Hg repositories Xinglu Chen
2021-06-12 11:57 ` Xinglu Chen [this message]
2021-06-12 11:57 ` [bug#48971] [PATCH 2/2] hg-download: Support falling back to SWH Xinglu Chen
2021-06-14 16:44 ` [bug#48971] [PATCH 0/2] Add SWH support for Hg repositories Ludovic Courtès
2021-06-15 5:37 ` Xinglu Chen
2021-06-16 5:23 ` zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf5071f214629f4fda9cdfb6aad3bf243e8ff070.1623498543.git.public@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=48971@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.