diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-29 12:42:06 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-29 12:42:06 +0000 |
commit | 1baf0bb4f000ef7c3f2ef43d8e3f4d3479527d99 (patch) | |
tree | 2323f5f85861a6333752ea7c816aa44dbccb787e /usr.bin/cvs | |
parent | 163634d5cf8f7e686b9403fce43fcb5c07f9aa97 (diff) |
Server-side bits for release command.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/client.c | 5 | ||||
-rw-r--r-- | usr.bin/cvs/remote.h | 5 | ||||
-rw-r--r-- | usr.bin/cvs/server.c | 13 |
3 files changed, 18 insertions, 5 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c index 7a5000e823f..7dd2305b21f 100644 --- a/usr.bin/cvs/client.c +++ b/usr.bin/cvs/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.67 2007/06/28 21:38:09 xsa Exp $ */ +/* $OpenBSD: client.c,v 1.68 2007/06/29 12:42:05 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -98,7 +98,8 @@ struct cvs_req cvs_requests[] = { { "admin", 0, cvs_server_admin, REQ_NEEDDIR }, { "export", 0, NULL, 0 }, { "history", 0, NULL, 0 }, - { "release", 0, NULL, 0 }, + { "release", 0, cvs_server_release, + REQ_NEEDDIR }, { "watch-on", 0, NULL, 0 }, { "watch-off", 0, NULL, 0 }, { "watch-add", 0, NULL, 0 }, diff --git a/usr.bin/cvs/remote.h b/usr.bin/cvs/remote.h index 08d537f8625..8bd0d759441 100644 --- a/usr.bin/cvs/remote.h +++ b/usr.bin/cvs/remote.h @@ -1,4 +1,4 @@ -/* $OpenBSD: remote.h,v 1.22 2007/06/27 20:42:19 joris Exp $ */ +/* $OpenBSD: remote.h,v 1.23 2007/06/29 12:42:05 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -97,8 +97,9 @@ void cvs_server_checkout(char *); void cvs_server_diff(char *); void cvs_server_init(char *); void cvs_server_log(char *); -void cvs_server_rlog(char *); +void cvs_server_release(char *); void cvs_server_remove(char *); +void cvs_server_rlog(char *); void cvs_server_status(char *); void cvs_server_tag(char *); void cvs_server_update(char *); diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 2499afeafe3..c15e21f58fd 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.63 2007/06/27 20:42:19 joris Exp $ */ +/* $OpenBSD: server.c,v 1.64 2007/06/29 12:42:05 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -550,6 +550,17 @@ cvs_server_init(char *data) } void +cvs_server_release(char *data) +{ + if (chdir(server_currentdir) == -1) + fatal("cvs_server_init: %s", strerror(errno)); + + cvs_cmdop = CVS_OP_RELEASE; + cvs_release(server_argc, server_argv); + cvs_server_send_response("ok"); +} + +void cvs_server_remove(char *data) { if (chdir(server_currentdir) == -1) |