summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Isaacson <aisaacson@penguincomputing.com>2007-09-18 12:20:48 -0700
committerYann Dirson <ydirson@altern.org>2008-03-31 16:09:13 +0200
commit527e493dc1a72484fb593b7c03e577ccf8eb4028 (patch)
tree3b47d46963ce6f5e006f53649ed39be93d00777d
parentcb552aff68b69c5cd8bd12206c6593bf21cecbf9 (diff)
downloadcvsps-527e493dc1a72484fb593b7c03e577ccf8eb4028.tar.gz
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
-rw-r--r--cvsps.c7
1 files changed, 7 insertions, 0 deletions
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);
}