=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.121 retrieving revision 1.122 diff -c -r1.121 -r1.122 *** src/usr.bin/cvs/util.c 2007/10/09 12:14:09 1.121 --- src/usr.bin/cvs/util.c 2008/01/10 10:00:53 1.122 *************** *** 1,4 **** ! /* $OpenBSD: util.c,v 1.121 2007/10/09 12:14:09 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink --- 1,4 ---- ! /* $OpenBSD: util.c,v 1.122 2008/01/10 10:00:53 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink *************** *** 566,575 **** void cvs_mkpath(const char *path, char *tag) { FILE *fp; size_t len; ! char sticky[CVS_REV_BUFSZ]; ! char *sp, *dp, *dir, rpath[MAXPATHLEN], repo[MAXPATHLEN]; dir = xstrdup(path); --- 566,576 ---- void cvs_mkpath(const char *path, char *tag) { + CVSENTRIES *ent; FILE *fp; size_t len; ! char entry[CVS_ENT_MAXLINELEN], sticky[CVS_REV_BUFSZ]; ! char *sp, *dp, *dir, *p, rpath[MAXPATHLEN], repo[MAXPATHLEN]; dir = xstrdup(path); *************** *** 620,625 **** --- 621,637 ---- cvs_mkadmin(rpath, current_cvsroot->cr_str, repo, tag, NULL, 0); + + if (dp != NULL) { + if ((p = strchr(dp, '/')) != NULL) + *p = '\0'; + ent = cvs_ent_open(rpath); + xsnprintf(entry, sizeof(entry), "D/%s/////", dp); + cvs_ent_add(ent, entry); + cvs_ent_close(ent, ENT_SYNC); + if (p != NULL) + *p = '/'; + } if (cvs_server_active == 1 && strcmp(rpath, ".")) { if (tag != NULL) {