diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 17:20:15 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 17:20:15 +0000 |
commit | 59f57d2e74e3e3c8cd9e4db61a68a644bfe31552 (patch) | |
tree | 434d6a029a9edefe972477c530bcecea73bf2ef4 /usr.bin/cvs/server.c | |
parent | c5bee9b77e859fa642c97be06613bd046d890c7f (diff) |
better CVSROOT/module support, includes remote support and modules
that are not aliases (-a);
OK tobias@
Diffstat (limited to 'usr.bin/cvs/server.c')
-rw-r--r-- | usr.bin/cvs/server.c | 21 |
1 files changed, 16 insertions, 5 deletions
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 <joris@openbsd.org> * @@ -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); |