[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: hg-fetch: Remove .hg directories of sub-repositories.
From: |
guix-commits |
Subject: |
01/01: hg-fetch: Remove .hg directories of sub-repositories. |
Date: |
Mon, 3 Dec 2018 06:37:06 -0500 (EST) |
hoebjo pushed a commit to branch master
in repository guix.
commit b8ca5b3146f94785c4e54ade1f64dc783a9b1a85
Author: Björn Höfling <address@hidden>
Date: Fri Nov 23 18:38:27 2018 +0100
hg-fetch: Remove .hg directories of sub-repositories.
* guix/build/hg.scm (hg-fetch): Remove all .hg directories recursively.
---
guix/build/hg.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/guix/build/hg.scm b/guix/build/hg.scm
index ea51eb6..b3e3ff7 100644
--- a/guix/build/hg.scm
+++ b/guix/build/hg.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ricardo Wurmus <address@hidden>
;;; Copyright © 2018 Mark H Weaver <address@hidden>
+;;; Copyright © 2018 Björn Höfling <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,8 +46,10 @@ Mercurial changeset identifier. Return #t on success, #f
otherwise."
;; The contents of '.hg' vary as a function of the current
;; status of the Mercurial repo. Since we want a fixed
;; output, this directory needs to be taken out.
- (with-directory-excursion directory
- (delete-file-recursively ".hg"))
+ ;; Since the '.hg' file is also in sub-modules, we have to
+ ;; search for it in all sub-directories.
+ (for-each delete-file-recursively
+ (find-files directory "^\\.hg$" #:directories? #t))
#t)