diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-09 16:52:28 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-09 16:52:28 +0000 |
commit | 1730f52ea3eb717abfb91ad37619b80cd35a50a6 (patch) | |
tree | 228bec817918c350316db55d310f0eb8d5cfa49a | |
parent | 6ed3d1f5c8ed298f7f615cf644fe7500822f7e10 (diff) |
if the CVS/ directory already exists when we reach cvs_mkadmin()
we will definatly need to recreate it with the correct information.
otherwise sucessive checkouts of the same module with other arguments
(like -rOPENBSD_X_X or -D "3 years ago") will not store the correct
information.
-rw-r--r-- | usr.bin/cvs/util.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 73d09fccd56..846ec83e21f 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.132 2008/02/04 19:08:32 joris Exp $ */ +/* $OpenBSD: util.c,v 1.133 2008/02/09 16:52:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -527,9 +527,6 @@ cvs_mkadmin(const char *path, const char *root, const char *repo, (void)xsnprintf(buf, sizeof(buf), "%s/%s", path, CVS_PATH_CVSDIR); - if (stat(buf, &st) != -1) - return; - if (mkdir(buf, 0755) == -1 && errno != EEXIST) fatal("cvs_mkadmin: %s: %s", buf, strerror(errno)); @@ -549,12 +546,6 @@ cvs_mkadmin(const char *path, const char *root, const char *repo, fprintf(fp, "%s\n", repo); (void)fclose(fp); - (void)xsnprintf(buf, sizeof(buf), "%s/%s", path, CVS_PATH_ENTRIES); - - if ((fp = fopen(buf, "w")) == NULL) - fatal("cvs_mkadmin: %s: %s", buf, strerror(errno)); - (void)fclose(fp); - cvs_write_tagfile(path, tag, date); } |