In main.c of cvs-1.10.8 we have :
/* Create the list. */
assert (root_directories == NULL);
root_directories = getlist ();
/* Prime it. */
if (CVSroot != NULL)
{
Node *n;
n = getnode ();
n->type = NT_UNKNOWN;
n->key = xstrdup (CVSroot);
n->data = NULL;
if (addnode (root_directories, n))
error (1, 0, "cannot add initial CVSROOT %s", n->key);
}
But "getlist" has already added a default node inside of type "HEADER".
So we got *two* nodes in the list when cvs goes the main loop :
while (
#ifdef SERVER_SUPPORT
server_active ||
#endif
walklist (root_directories, set_root_directory, NULL)
)
The side effect is that the loop is executed *twice* !!! It takes twice
the time to update, commit...
A quick fix is :
static int
set_root_directory (p, ignored)
Node *p;
void *ignored;
{
> if (current_root == NULL && p->data == NULL && p->type == NT_UNKNOWN)
< if (current_root == NULL && p->data == NULL)
{
current_root = p->key;
return 1;
}
return 0;
}
alex.