=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/server.c,v retrieving revision 1.64 retrieving revision 1.65 diff -c -r1.64 -r1.65 *** src/usr.bin/cvs/server.c 2007/06/29 12:42:05 1.64 --- src/usr.bin/cvs/server.c 2007/07/03 13:22:43 1.65 *************** *** 1,4 **** ! /* $OpenBSD: server.c,v 1.64 2007/06/29 12:42:05 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * --- 1,4 ---- ! /* $OpenBSD: server.c,v 1.65 2007/07/03 13:22:43 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * *************** *** 315,321 **** else p = xstrdup(repo + 1); ! cvs_mkpath(p); if ((dirn = basename(p)) == NULL) fatal("cvs_server_directory: %s", strerror(errno)); --- 315,321 ---- else p = xstrdup(repo + 1); ! cvs_mkpath(p, NULL); if ((dirn = basename(p)) == NULL) fatal("cvs_server_directory: %s", strerror(errno)); *************** *** 646,658 **** cvs_server_update_entry(const char *resp, struct cvs_file *cf) { char *p; if ((p = strrchr(cf->file_rpath, ',')) != NULL) *p = '\0'; cvs_server_send_response("%s %s/", resp, cf->file_wd); ! cvs_remote_output(cf->file_rpath); if (p != NULL) *p = ','; } --- 646,689 ---- cvs_server_update_entry(const char *resp, struct cvs_file *cf) { char *p; + char repo[MAXPATHLEN], fpath[MAXPATHLEN]; if ((p = strrchr(cf->file_rpath, ',')) != NULL) *p = '\0'; + cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", repo, cf->file_name); + cvs_server_send_response("%s %s/", resp, cf->file_wd); ! cvs_remote_output(fpath); if (p != NULL) *p = ','; + } + + void + cvs_server_set_sticky(char *dir, char *tag) + { + char fpath[MAXPATHLEN], tbuf[CVS_ENT_MAXLINELEN]; + + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", + current_cvsroot->cr_dir, dir); + + (void)xsnprintf(tbuf, MAXPATHLEN, "T%s", tag); + + cvs_server_send_response("Set-sticky %s", dir); + cvs_remote_output(fpath); + cvs_remote_output(tbuf); + } + + void + cvs_server_clear_sticky(char *dir) + { + char fpath[MAXPATHLEN]; + + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", + current_cvsroot->cr_dir, dir); + + cvs_server_send_response("Clear-sticky %s", dir); + cvs_remote_output(fpath); }