diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-10-04 14:55:37 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-10-04 14:55:37 +0000 |
commit | fad42bc0f80e1f0cf920254868655f2a1bf549b4 (patch) | |
tree | ee6f77e0030829ac8728e971d0baddb231faba6c /usr.bin/cvs/rcs.c | |
parent | 54686bf81709f358cb16c969982256717d0e4b38 (diff) |
write locks to the RCS file;
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 0e070d6d48e..bc8fe0cd71f 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.74 2005/10/02 21:44:18 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.75 2005/10/04 14:55:36 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -458,8 +458,10 @@ rcs_write(RCSFILE *rfp) struct rcs_sym *symp; struct rcs_branch *brp; struct rcs_delta *rdp; + struct rcs_lock *lkp; ssize_t nread; int fd, from_fd, to_fd; + from_fd = to_fd = fd = -1; if (rfp->rf_flags & RCS_SYNCED) @@ -506,7 +508,15 @@ rcs_write(RCSFILE *rfp) } fprintf(fp, ";\n"); - fprintf(fp, "locks;"); + fprintf(fp, "locks"); + TAILQ_FOREACH(lkp, &(rfp->rf_locks), rl_list) { + rcsnum_tostr(lkp->rl_num, numbuf, sizeof(numbuf)); + fprintf(fp, "\n\t%s:%s", lkp->rl_name, numbuf); + if (lkp != TAILQ_LAST(&(rfp->rf_locks), rcs_llist)) + fprintf(fp, ";"); + } + + fprintf(fp, ";"); if (rfp->rf_flags & RCS_SLOCK) fprintf(fp, " strict;"); |