[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: validate_repo $cvsroot trailing '/' handling
From: |
Erik Cumps |
Subject: |
PATCH: validate_repo $cvsroot trailing '/' handling |
Date: |
Tue, 4 Oct 2005 14:25:10 +0200 |
Hello,
if you try to run validate_repo with a CVS repository specification
containing a
trailing '/' character you will get a 'cvs rlog' error for each file the
script wants to
extract info from.
(I ran my test with cvs 1.11.6 on a linux system with local repository)
This is because the 'process_file' function attempts to clean up its $path
argument
by removing the content of the $cvsroot variable from the front. This
fails if the
$cvsroot variable's value contains one or more trailing '/' characters
(the regexp
fails to match). And this results in an invocation of 'cvs rlog' with a
'-d' option for
the repository and a filename that is actually an absolute path iso a path
relative
to the repository.
I know that CVS itself cannot handle trailing '/' characters in a
repository specification
(at least until version 1.11.6 that is, haven't checked later versions),
so this problem
is probably only an issue when you invoke validate_repo from the shell
prompt
while using tab-expansion to specify a CVS repository.
So I applied the following trivial fix that I would like to share with
you. (patch is attached)
It basically adds a last step to the $cvsroot configuration handling which
removes any
trailing '/' characters.
Erik Cumps
- PATCH: validate_repo $cvsroot trailing '/' handling,
Erik Cumps <=