summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2007-01-02 23:55:15 +0000
committerjoris <joris@openbsd.org>2007-01-02 23:55:15 +0000
commit0a6fb2eec679abb97daa3e2123bc701d5e17d124 (patch)
tree5720e8a7491f5d977ff3d4c19fa42a658ca00e81 /usr.bin/cvs/commit.c
parentbetter support for IPv6 hostname/numeric representation. (diff)
downloadwireguard-openbsd-0a6fb2eec679abb97daa3e2123bc701d5e17d124.tar.xz
wireguard-openbsd-0a6fb2eec679abb97daa3e2123bc701d5e17d124.zip
- fix cvs_client_remove_entry to correctly handle the passed data
- when commiting in a remote setup, allow the opencvs server to send the correct response to the client when a file has been removed
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index 1ae744eb597..bc5d1631b75 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.82 2006/12/31 15:11:23 xsa Exp $ */
+/* $OpenBSD: commit.c,v 1.83 2007/01/02 23:55:15 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -186,7 +186,7 @@ cvs_commit_local(struct cvs_file *cf)
int l, openflags, rcsflags;
char *d, *f, rbuf[24], nbuf[24];
CVSENTRIES *entlist;
- char *attic, *repo, *rcsfile;
+ char *attic, *repo, *rcsfile, *p;
cvs_log(LP_TRACE, "cvs_commit_local(%s)", cf->file_path);
cvs_file_classify(cf, NULL, 0);
@@ -366,6 +366,20 @@ cvs_commit_local(struct cvs_file *cf)
cvs_log(LP_NOTICE, "checking in '%s'; revision %s -> %s",
cf->file_path, rbuf, nbuf);
}
+
+ if (cvs_server_active == 1) {
+ if ((p = strrchr(cf->file_rpath, ',')) != NULL)
+ *p = '\0';
+
+ if (cf->file_status == FILE_REMOVED) {
+ cvs_server_send_response("Remove-entry %s/",
+ cf->file_wd);
+ cvs_remote_output(cf->file_rpath);
+ }
+
+ if (p != NULL)
+ *p = ',';
+ }
}
static char *