=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/resp.c,v retrieving revision 1.43 retrieving revision 1.44 diff -c -r1.43 -r1.44 *** src/usr.bin/cvs/Attic/resp.c 2005/07/05 12:00:45 1.43 --- src/usr.bin/cvs/Attic/resp.c 2005/07/10 00:12:52 1.44 *************** *** 1,4 **** ! /* $OpenBSD: resp.c,v 1.43 2005/07/05 12:00:45 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: resp.c,v 1.44 2005/07/10 00:12:52 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 440,448 **** return (-1); } /* add a directory entry to the parent */ ! if ((entf = cvs_ent_open(subdir, O_WRONLY)) != NULL) { ! if ((ent = cvs_ent_get(entf, CVS_FILE_NAME(cf))) == NULL) { snprintf(buf, sizeof(buf), "D/%s////", CVS_FILE_NAME(cf)); ent = cvs_ent_parse(buf); --- 440,459 ---- return (-1); } + /* + * If the Entries file for the parent is already + * open, operate on that, instead of reopening it + * and invalidating the opened list. + */ + if (!strcmp(subdir, cvs_resp_lastdir)) + entf = cvs_resp_lastent; + else + entf = cvs_ent_open(subdir, O_WRONLY); + /* add a directory entry to the parent */ ! if (entf != NULL) { ! if ((ent = cvs_ent_get(entf, ! CVS_FILE_NAME(cf))) == NULL) { snprintf(buf, sizeof(buf), "D/%s////", CVS_FILE_NAME(cf)); ent = cvs_ent_parse(buf); *************** *** 452,458 **** else cvs_ent_add(entf, ent); } ! cvs_ent_close(entf); } } --- 463,471 ---- else cvs_ent_add(entf, ent); } ! ! if (strcmp(subdir, cvs_resp_lastdir)) ! cvs_ent_close(entf); } }