summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/remove.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-14 03:19:16 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-14 03:19:16 +0000
commite0521522cf3a43f99da13b4e1a59bd82bb470015 (patch)
tree05bc8014a274d830c1ce4f23347e9fd2fd708b44 /usr.bin/cvs/remove.c
parentdc650b3cd564bb3f7b03f782108ce9e181b89ed4 (diff)
don't always re-open the same CVS/Entries file, instead keep the
last opened CVS/Entries around to operate on and close it whenever we switch directory. gives us a small performance boost, obviously. while doing this, switch the way we write revisions to disk by using fwrite(3) so stuff can get written to disk in chunks instead of writing everything line by line, another win. with help from otto@ ok tobias@
Diffstat (limited to 'usr.bin/cvs/remove.c')
-rw-r--r--usr.bin/cvs/remove.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index 195947dd6f0..e52975fd0af 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.77 2008/06/14 02:43:47 tobias Exp $ */
+/* $OpenBSD: remove.c,v 1.78 2008/06/14 03:19:15 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -168,7 +168,6 @@ cvs_remove_local(struct cvs_file *cf)
case FILE_REMOVE_ENTRY:
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_remove(entlist, cf->file_name);
- cvs_ent_close(entlist, ENT_SYNC);
(void)xsnprintf(buf, sizeof(buf), "%s/%s/%s%s",
cf->file_wd, CVS_PATH_CVSDIR, cf->file_name,
@@ -210,7 +209,6 @@ cvs_remove_local(struct cvs_file *cf)
} else {
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_add(entlist, entry);
- cvs_ent_close(entlist, ENT_SYNC);
}
xfree(entry);