[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: directory name with space bug (commitinfo and loginfo)
From: |
Mark D. Baushke |
Subject: |
Re: directory name with space bug (commitinfo and loginfo) |
Date: |
Sat, 20 Nov 2004 01:44:42 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Philippe Marchesseault <P.Marchesso@videotron.ca> writes:
> Hello,
>
> I believe I have hit a limitation with CVS's handling of directories with
> spaces in the directory name. When I commit a file from a directory with a
> space in the path name, the commitinfo and loginfo script become unparsable.
> Let me explain this with a nice example,
>
> commitinfo output:
> pmarches commitinfo /home/pmarches/cvstest/cvstest/src/a s d toto.java
>
> loginfo output:
> pmarches loginfo "cvstest/src/a s d toto.java,1.4,1.5"
> Update of /home/pmarches/cvstest/cvstest/src/a s d
> In directory linux:/tmp/cvs-serv7187/src/a s d
>
> Modified Files:
> toto.java
> Log Message:
> A Comment
>
> -------End Nice example-------------
>
> So in the above commitinfo, it is impossible to determine what is the
> directory name and what is the filename. Could be any one of:
> a/s d toto.java
> a s/d toto.java
> a s d/toto.java
>
> The loginfo is parsable in an akward way by using the string Update
> of /home/pmarches/cvstest/cvstest/src/a s d to determine the directory.
>
> My suggestion is to append a trailing / to the directory portion of loginfo
> and commitinfo. It is probably very easy to do and will not break path
> compatibility.
cvs 1.12.10 allows each part of the %{sVv} format to each be given as a
separate argument.
https://www.cvshome.org/docs/manual/cvs-1.12.10/cvs_18.html#SEC184
UseNewInfoFmtStrings=yes
Use the command-line arguments to determine the directory with %p
and the filename with %s as separate arguments to your scripts.
Good luck,
-- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFBnxIK3x41pRYZE/gRAhhtAKCepIcIXAAtunH9I3cYUCtzeMavlwCeNPlD
yhdAVP3yZyoG5NO2yqbg6cU=
=mT8O
-----END PGP SIGNATURE-----