From 59f57d2e74e3e3c8cd9e4db61a68a644bfe31552 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sun, 3 Feb 2008 17:20:15 +0000 Subject: better CVSROOT/module support, includes remote support and modules that are not aliases (-a); OK tobias@ --- usr.bin/cvs/server.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'usr.bin/cvs/server.c') diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 6229633748e..1aaf74aa794 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.80 2008/02/01 17:18:59 tobias Exp $ */ +/* $OpenBSD: server.c,v 1.81 2008/02/03 17:20:14 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -168,6 +168,7 @@ cvs_server_root(char *data) fatal("Invalid Root specified!"); cvs_parse_configfile(); + cvs_parse_modules(); umask(cvs_umask); } @@ -752,8 +753,13 @@ cvs_server_set_sticky(char *dir, char *tag) { char fpath[MAXPATHLEN]; - (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", - current_cvsroot->cr_dir, dir); + if (module_repo_root != NULL) { + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s/%s", + current_cvsroot->cr_dir, module_repo_root, dir); + } else { + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", + current_cvsroot->cr_dir, dir); + } cvs_server_send_response("Set-sticky %s", dir); cvs_remote_output(fpath); @@ -765,8 +771,13 @@ cvs_server_clear_sticky(char *dir) { char fpath[MAXPATHLEN]; - (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", - current_cvsroot->cr_dir, dir); + if (module_repo_root != NULL) { + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s/%s", + current_cvsroot->cr_dir, module_repo_root, dir); + } else { + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", + current_cvsroot->cr_dir, dir); + } cvs_server_send_response("Clear-sticky %s", dir); cvs_remote_output(fpath); -- cgit v1.2.3