summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-12-19 16:04:41 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-12-19 16:04:41 +0000
commitdfe85635a5050b621b50bf50a389b4399cea4312 (patch)
tree5cab8380b9ea5276d2af4d8824c39569ff6998c8 /usr.bin
parent9437d03d7d6ce7b2dcb99c7762474eac94deefe4 (diff)
add some bits to handle Remove-entry.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/client.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 847ac750544..2e96fd2b473 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.37 2006/12/19 15:12:59 joris Exp $ */
+/* $OpenBSD: client.c,v 1.38 2006/12/19 16:04:40 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -738,10 +738,26 @@ cvs_client_removed(char *data)
void
cvs_client_remove_entry(char *data)
{
- char *dir;
+ CVSENTRIES *entlist;
+ struct cvs_ent *ent;
+ char *dir, *entry;
dir = cvs_remote_input();
+ entry = cvs_remote_input();
xfree(dir);
+
+ cvs_log(LP_TRACE, "cvs_client_remove_entry(%s)", entry);
+
+ if ((ent = cvs_ent_parse(entry)) == NULL)
+ fatal("cvs_client_remove_entry: cvs_ent_parse failed");
+
+ entlist = cvs_ent_open(data);
+
+ cvs_ent_remove(entlist, ent->ce_name);
+ cvs_ent_free(ent);
+ cvs_ent_close(entlist, ENT_SYNC);
+
+ xfree(entry);
}
void