Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc When using rcs to track backups, force the rcs archive t...
details: https://anonhg.NetBSD.org/src/rev/50e4ec4d93b3
branches: trunk
changeset: 509689:50e4ec4d93b3
user: atatat <atatat%NetBSD.org@localhost>
date: Thu May 10 14:04:22 2001 +0000
description:
When using rcs to track backups, force the rcs archive to be unlocked,
use only non-strict locking, and leave the archives unlocked after
checking in changes.
diffstat:
etc/rc.subr | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diffs (48 lines):
diff -r b5578c46f4b6 -r 50e4ec4d93b3 etc/rc.subr
--- a/etc/rc.subr Thu May 10 13:21:58 2001 +0000
+++ b/etc/rc.subr Thu May 10 14:04:22 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.35 2001/05/09 16:40:59 lukem Exp $
+# $NetBSD: rc.subr,v 1.36 2001/05/10 14:04:22 atatat Exp $
#
# Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -681,27 +681,32 @@
_msg0="backup archive"
_msg1="update"
+ # ensure that history file is not locked
+ if [ -f $_cur,v ]; then
+ rcs -q -u -U -M $_cur
+ fi
+
# ensure after switching to rcs that the
# current backup is not lost
if [ -f $_cur ]; then
# no archive, or current newer than archive
if [ ! -f $_cur,v -o $_cur -nt $_cur,v ]; then
- ci -q -f -l -t-"$_msg0" -m"$_msg1" $_cur
- rcs -q -kb $_cur
+ ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
+ rcs -q -kb -U $_cur
fi
fi
case $_action in
add|update)
cp -p $_file $_cur
- ci -q -f -l -t-"$_msg0" -m"$_msg1" $_cur
- rcs -q -kb $_cur
+ ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
+ rcs -q -kb -U $_cur
chown root:wheel $_cur $_cur,v
;;
remove)
cp /dev/null $_cur
- ci -q -f -l -t-"$_msg0" -m"$_msg1" $_cur
- rcs -q -kb $_cur
+ ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
+ rcs -q -kb -U $_cur
chown root:wheel $_cur $_cur,v
rm $_cur
;;
Home |
Main Index |
Thread Index |
Old Index