diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2009-03-26 22:54:38 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2009-03-26 22:54:38 +0000 |
commit | 37814de0cb03331fc6030e509df406316faea15d (patch) | |
tree | 55f02bd11fb50db984c332a612fe253bbe5fb24e /usr.bin/cvs/modules.c | |
parent | 85c8218e99687c48bae95db5a7c94dd609cdceae (diff) |
fix the way Attic is handled in our recursion code, so we
do not skip files or run over them twice.
also fixes -l and -r for checkout/update when a file in
Attic exists with that tag that in HEAD is a directory
in the normal repository like gnu/usr.bin/gcc/INSTALL.
as a bonus, we do not run fstat() twice per file or dir
anymore...
spotted by deraadt@
Diffstat (limited to 'usr.bin/cvs/modules.c')
-rw-r--r-- | usr.bin/cvs/modules.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/usr.bin/cvs/modules.c b/usr.bin/cvs/modules.c index b1565f36bae..09eb6e81e92 100644 --- a/usr.bin/cvs/modules.c +++ b/usr.bin/cvs/modules.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modules.c,v 1.14 2009/03/25 21:50:33 joris Exp $ */ +/* $OpenBSD: modules.c,v 1.15 2009/03/26 22:54:37 joris Exp $ */ /* * Copyright (c) 2008 Joris Vink <joris@openbsd.org> * @@ -173,9 +173,11 @@ modules_parse_line(char *line, int lineno) if (sp[0] == '!') { if (strlen(sp) < 2) fatal("invalid ! pattern"); - cvs_file_get((sp + 1), 0, &(mi->mi_ignores)); + cvs_file_get((sp + 1), 0, + &(mi->mi_ignores), 0); } else { - cvs_file_get(sp, 0, &(mi->mi_modules)); + cvs_file_get(sp, 0, + &(mi->mi_modules), 0); } } else if (sp == val) { dirname = sp; @@ -187,17 +189,19 @@ modules_parse_line(char *line, int lineno) sp++; (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", dirname, sp); - cvs_file_get(fpath, 0, &(mi->mi_ignores)); + cvs_file_get(fpath, 0, + &(mi->mi_ignores), 0); } else { (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", dirname, sp); - cvs_file_get(fpath, 0, &(mi->mi_modules)); + cvs_file_get(fpath, 0, + &(mi->mi_modules), 0); } } } if (!(mi->mi_flags & MODULE_ALIAS) && RB_EMPTY(&(mi->mi_modules))) - cvs_file_get(dirname, 0, &(mi->mi_modules)); + cvs_file_get(dirname, 0, &(mi->mi_modules), 0); TAILQ_INSERT_TAIL(&modules, mi, m_list); return (0); @@ -232,7 +236,7 @@ cvs_module_lookup(char *name) RB_INIT(&(mc->mc_modules)); RB_INIT(&(mc->mc_ignores)); - cvs_file_get(name, 0, &(mc->mc_modules)); + cvs_file_get(name, 0, &(mc->mc_modules), 0); mc->mc_canfree = 1; mc->mc_name = name; mc->mc_flags = MODULE_ALIAS; |