GNU bug report logs -
#48971
[PATCH 0/2] Add SWH support for Hg repositories
Previous Next
Reported by: Xinglu Chen <public <at> yoctocell.xyz>
Date: Sat, 12 Jun 2021 11:53:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48971 <at> debbugs.gnu.org (full text, mbox):
* 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 <at> gnu.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2021 Xinglu Chen <public <at> 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
This bug report was last modified 3 years and 343 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.