From 527e493dc1a72484fb593b7c03e577ccf8eb4028 Mon Sep 17 00:00:00 2001 From: Andy Isaacson Date: Tue, 18 Sep 2007 12:20:48 -0700 Subject: handle running cvsps in root of checkout [Yann, David said I should bounce this to you. After this week I can be reached at the Reply-To address.] I'm dealing with a CVS repo that looks like this: % ls CVSROOT/ Makefile,v foo/ quux/ (along with a few dozen other subdirectories). CVSROOT/modules has project -a \ Makefile foo quux etc. So I check out with "cvs -d /path/to/cvs co project", and the result is: % head CVS/R* ==> CVS/Repository <== . ==> CVS/Root <== /path/to/cvs When I run cvsps in the resulting checkout, it blows up all over the place with thousands of error messages like: % cvsps -u cvs rlog: Logging . WARNING: file /path/to/cvs/Makefile doesn't match strip_path /path/to/cvs/./. ignoring The following patch seems to resolve this problem. -andy --- cvsps.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cvsps.c b/cvsps.c index 1735665..02a12dc 100644 --- a/cvsps.c +++ b/cvsps.c @@ -1079,6 +1079,13 @@ static void init_paths() exit(1); } + if (strip_path_len > 3 && !strcmp(strip_path + strip_path_len - 3, "/./")) + { + debug(DEBUG_STATUS, "pruning /./ off end of strip_path"); + strip_path_len -= 2; + strip_path[strip_path_len] = '\0'; + } + debug(DEBUG_STATUS, "strip_path: %s", strip_path); } -- cgit v1.2.1