Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Fix timestamp extraction logic for Mercurial repos to use UTC.
details: https://anonhg.NetBSD.org/src/rev/1a69b3f6571b
branches: trunk
changeset: 1023604:1a69b3f6571b
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Sep 17 21:22:38 2021 +0000
description:
Fix timestamp extraction logic for Mercurial repos to use UTC.
Extend logic to also cover "hg archive".
diffstat:
build.sh | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r a3995f6832a0 -r 1a69b3f6571b build.sh
--- a/build.sh Fri Sep 17 21:15:19 2021 +0000
+++ b/build.sh Fri Sep 17 21:22:38 2021 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.356 2021/09/09 15:00:01 martin Exp $
+# $NetBSD: build.sh,v 1.357 2021/09/17 21:22:38 joerg Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1972,7 +1972,7 @@
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.356 2021/09/09 15:00:01 martin Exp $
+# Generated from: \$NetBSD: build.sh,v 1.357 2021/09/17 21:22:38 joerg Exp $
# with these arguments: ${_args}
#
@@ -2337,8 +2337,11 @@
t=$(cd "${d}" && git log -1 --format=%ct)
vcs=git
elif [ -d "${d}.hg" ]; then
- t=$(cd "${d}" &&
- hg log -r . --template '{date(date, "%s")}\n')
+ t=$(hg --repo "$d" log -r . --template '{date.unixtime}\n')
+ vcs=hg
+ elif [ -f "${d}.hg_archival.txt" ]; then
+ local stat=$(print_tooldir_program stat)
+ t=$("${stat}" -t '%s' -f '%m' "${d}.hg_archival.txt")
vcs=hg
else
bomb "Cannot determine VCS for '$d'"
Home |
Main Index |
Thread Index |
Old Index