Hi all:
I am working on a patch to loginfo-handler to support the _new_
string format for CVS. Specifically loginfo will now pass each
filename and version as separate arguments. Right now, even in
yesterday's dev, I noticed that ViewVC still requires the
comatibility option, %1{sVv}, which makes CVS spit warnings to CVS
clients.
Specifically CVS 1.12.9 from Debian/stable.
My proposal is to have loginfo-handler also handle the new CVS
args (in addition to the old cvs way, and the cvsnt way). Each
new CVS loginfo arg is as follows. I am proposing to call
loginfo-handler for newer CVS's like this:
<path/bin/loginfo-handler %p %{sVv}
This will make the args:
argv[1] = modulename(directory name) (This is the %p)
Then, every next three args will be (n=2 .. n=x)
argv[n] = filename
argv[n+1] = old_version
argv[n+2] = new_version
then n=n+3, etc...
I have a working patch now. I am not sure if there are any
preferences on how it will work. Since the _new_ way CVS does
files and versions, each one becomes a separate argument, there is
no need to do weird reg-ex matching. Counting up and grouping by
threes is all that is required.
Suggestions? I know it needs some clean up to make it a nice
enough patch for actual inclusion, but, prior to doing any bigger
changes, I just wanted to pass it by some of you.
The only real change is between the "if len(sys.argv) > 3:" and
the "else:". The > 1 and >2 sections just happen iff > 3 doesn't
happen.
patch is attached; patched against:
viewvc-1.1-dev-20060911/bin/loginfo-handler
Thanks,
Jeremy
--
"Prediction is very difficult, especially of the future."
Niels Bohr
http://www.nirvani.net
|
|