=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/root.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- src/usr.bin/cvs/root.c 2009/02/21 12:52:47 1.46 +++ src/usr.bin/cvs/root.c 2010/10/23 18:36:35 1.47 @@ -1,4 +1,4 @@ -/* $OpenBSD: root.c,v 1.46 2009/02/21 12:52:47 joris Exp $ */ +/* $OpenBSD: root.c,v 1.47 2010/10/23 18:36:35 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -172,8 +172,11 @@ if (cvs_server_active == 1) return cvsroot_parse(dir); - if (cvs_cmdop == CVS_OP_IMPORT) - return NULL; + if (cvs_cmdop == CVS_OP_IMPORT) { + if ((rootstr = getenv("CVSROOT")) != NULL) + return (cvsroot_parse(rootstr)); + return (NULL); + } (void)xsnprintf(rootpath, MAXPATHLEN, "%s/%s", dir, CVS_PATH_ROOTSPEC);