diff options
author | 2005-04-22 15:16:15 +0000 | |
---|---|---|
committer | 2005-04-22 15:16:15 +0000 | |
commit | 8629a39cac1edbfc821871b94ec709c912cf9954 (patch) | |
tree | 513d211df9e84317e37d2ad58723137029a3b2a9 /usr.bin/cvs/entries.c | |
parent | sync add command usage w/ man page; joris ok (diff) | |
download | wireguard-openbsd-8629a39cac1edbfc821871b94ec709c912cf9954.tar.xz wireguard-openbsd-8629a39cac1edbfc821871b94ec709c912cf9954.zip |
finish support for the '-' token in the Entry file, this allows
us to mark files as removed, and lets the remove command work
completely.
tested and ok xsa@, jfb@
Diffstat (limited to 'usr.bin/cvs/entries.c')
-rw-r--r-- | usr.bin/cvs/entries.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 17ed953199e..cf8350682d5 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.26 2005/04/15 14:34:15 xsa Exp $ */ +/* $OpenBSD: entries.c,v 1.27 2005/04/22 15:16:15 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -473,7 +473,8 @@ cvs_ent_write(CVSENTRIES *ef) revbuf[0] = '\0'; } else { rcsnum_tostr(ent->ce_rev, revbuf, sizeof(revbuf)); - if (ent->ce_mtime == CVS_DATE_DMSEC) + if (ent->ce_mtime == CVS_DATE_DMSEC || + ent->ce_status == CVS_ENT_REMOVED) strlcpy(timebuf, CVS_DATE_DUMMY, sizeof(timebuf)); else { @@ -484,8 +485,9 @@ cvs_ent_write(CVSENTRIES *ef) } } - fprintf(ef->cef_file, "/%s/%s/%s/%s/%s\n", ent->ce_name, - revbuf, timebuf, "", ""); + fprintf(ef->cef_file, "/%s/%s%s/%s/%s/%s\n", ent->ce_name, + (ent->ce_status == CVS_ENT_REMOVED) ? "-" : "", revbuf, + timebuf, "", ""); } /* terminating line */ |