blob: e666299ff000d049a89bf91ff8126a4bcd08db17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
From 59e20edc16b7f13c3d753ac3a28358c467e32965 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Mon, 27 Aug 2018 16:41:29 -0400
Subject: [PATCH] makepkg: Pass --stream to `hg clone` when creating the
working copy
Without --stream, `hg clone` reencodes+recompresses the entire repository,
to the storage settings of the host. But download_hg() already did that
on the initial network clone, and it is 100% pointless duplicated work for
the local clone.
The work that this saves is CPU-bound (not disk-bound), and is restricted
to a single core.
The --stream flag has only existed since Mercurial 4.4 (2017-11-01). Prior
to that, it was named --uncompressed. --uncompressed still exists as a
compatibility alias for --stream, and marked deprecated, though there is
currently no schedule for its removal.
---
scripts/libmakepkg/source/hg.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/libmakepkg/source/hg.sh.in b/scripts/libmakepkg/source/hg.sh.in
index ae9aed3b..7346e1e3 100644
--- a/scripts/libmakepkg/source/hg.sh.in
+++ b/scripts/libmakepkg/source/hg.sh.in
@@ -94,7 +94,7 @@ extract_hg() {
plain "$(gettext "Aborting...")"
exit 1
fi
- elif ! hg clone -u "$ref" "$dir" "${dir##*/}"; then
+ elif ! hg clone -u "$ref" --stream "$dir" "${dir##*/}"; then
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "hg"
plain "$(gettext "Aborting...")"
exit 1
--
2.18.0
|