summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Höfling <bjoern.hoefling@bjoernhoefling.de>2018-11-23 18:38:27 +0100
committerBjörn Höfling <bjoern.hoefling@bjoernhoefling.de>2018-12-03 12:29:08 +0100
commitb8ca5b3146f94785c4e54ade1f64dc783a9b1a85 (patch)
treec36898cd5c2df7cf50a2ac6d98a1b8d0d61b3a4a
parenta03894416e6d2b4b017129d280c4ce83409c622d (diff)
hg-fetch: Remove .hg directories of sub-repositories.
* guix/build/hg.scm (hg-fetch): Remove all .hg directories recursively.
-rw-r--r--guix/build/hg.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/build/hg.scm b/guix/build/hg.scm
index ea51eb670b3..b3e3ff7ac39 100644
--- a/guix/build/hg.scm
+++ b/guix/build/hg.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> 2;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> 3;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
4;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -45,8 +46,10 @@ Mercurial changeset identifier. Return #t on success, #f otherwise."
45 ;; The contents of '.hg' vary as a function of the current 46 ;; The contents of '.hg' vary as a function of the current
46 ;; status of the Mercurial repo. Since we want a fixed 47 ;; status of the Mercurial repo. Since we want a fixed
47 ;; output, this directory needs to be taken out. 48 ;; output, this directory needs to be taken out.
48 (with-directory-excursion directory 49 ;; Since the '.hg' file is also in sub-modules, we have to
49 (delete-file-recursively ".hg")) 50 ;; search for it in all sub-directories.
51 (for-each delete-file-recursively
52 (find-files directory "^\\.hg$" #:directories? #t))
50 53
51 #t) 54 #t)
52 55