bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

commitlog


From: Anthon van der Neut
Subject: commitlog
Date: Tue, 12 Aug 2003 21:42:12 -0700

At my company (Pinnacle Systems Inc.) I have setup six CVS servers in the
various developer locations. On succesful commits to one of the
repositories, an entry for 'ALL' in the CVSROOT/loginfo file gathers
information and a cronjob might trigger a mirror (using the CVSup) program
of the committed part of the repository to one or more of the other servers.
This allows developers to check supporting libraries out from their local
server.

The loginfo entry uses the %s option ( Cederqvist appendix C.3.5) to get the
directories of the committed files.

As the Cederqvist manual points out the program specified in the loginfo
file is called by something like:
"yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13"

Being a mixed Linux, HPUX, Windows and Mac development environment, and
having some external libraries in CVS that cannot be changed without a lot
of work, we have (horror) filenames and directory names with spaces and
(bigger horror) filenames with comma's in them.
Although I have limited authority to enforce filename conventions in our own
code, I cannot enforce that on imported material.

This makes it sometimes difficult to determine where the directory name ends
and where the files start.
Although I considered providing the program with %{sVv) and trying to
pattern match on possible revision numbers,
I initially used %s and checked on the available directories. However a file
"c" in directory "a b", would be confused with
file "b c" in directory "a".
In the end it was easier to patch 1.10 and the 1.11 series of releases with
the appended three line diff that actually changes the call to the program
specified in the loginfo file. The result is that the shell calls the
program with two parameters: the directory and the list of filenames. The
double
quotes get stripped somewhere but the program now has the directory in
argv[1], which might include spaces.

This is against 1.12.1.1, I am trying to get it make it in the official
release, so I can stop worrying to break or processing on each upgrade of
the servers. Comments and critique are welcome, pointers on who to ask to
apply this patch as well.

diff -u -r1.70 logmsg.c
--- logmsg.c    23 Jul 2003 20:42:26 -0000      1.70
+++ logmsg.c    13 Aug 2003 03:58:53 -0000
@@ -882,6 +882,9 @@
        cp += fmt_percent - filter;
        *cp++ = '"';
        cp = shell_escape (cp, srepos);
+       cp++ = '"';
+       cp++ = ' ';
+       cp++ = '"';
        cp = shell_escape (cp, str_list);
        *cp++ = '"';
        (void) strcpy (cp, fmt_continue);

Regards
Anthon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]