From 15898420b698ef6903c46af4084c532aeb09cc81 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 21 Jan 2008 16:36:47 +0000 Subject: Fixed export to be fully functional and compliant to GNU cvs in local and remote setups. OK xsa@ --- usr.bin/cvs/util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/util.c') diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index fbf95c8b91e..e5d76a25b2f 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.124 2008/01/10 10:09:27 tobias Exp $ */ +/* $OpenBSD: util.c,v 1.125 2008/01/21 16:36:46 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink @@ -505,7 +505,8 @@ cvs_get_repository_name(const char *dir, char *dst, size_t len) } } } else { - if (cvs_cmdop != CVS_OP_CHECKOUT) { + if ((cvs_cmdop == CVS_OP_EXPORT && strcmp(dir, ".")) || + cvs_cmdop != CVS_OP_CHECKOUT) { if (strlcat(dst, dir, len) >= len) fatal("cvs_get_repository_name: " "truncation"); @@ -616,6 +617,9 @@ cvs_mkpath(const char *path, char *tag) if (mkdir(rpath, 0755) == -1 && errno != EEXIST) fatal("cvs_mkpath: %s: %s", rpath, strerror(errno)); + if (cvs_cmdop == CVS_OP_EXPORT && !cvs_server_active) + continue; + cvs_mkadmin(rpath, current_cvsroot->cr_str, repo, tag, NULL, 0); -- cgit v1.2.3