Re: CVS hatred

[prev] [thread] [next] [lurker] [Date index for 2004/09/03]

From: Peter Pentchev
Subject: Re: CVS hatred
Date: 09:19 on 03 Sep 2004
--VkVuOCYP9O7H3CXI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Aug 31, 2004 at 04:54:42AM -0700, Ann Barcomb wrote:
> Peter wrote:
>=20
> > > When I commit a file, permissions are changed in accordance with my d=
efault
> > > umask.  Why?  It isn't as if the file even needs to be modified local=
ly.
> >
> > Not even to update the version number in the CVS comment?
>=20
> I'm not using any CVS variables in the file, so as far as I know it should
> only need to write to CVS/Entries.

Well, if you are not using any CVS keywords, then why don't you just
say so?  CVS has keyword expansion flags for that, especially -ko,
although -kb might also be desirable in some cases.  Of course, this
will not help when you check out or update your work on the production
servers, but at least on your development machines ko-marked scripts
will not be touched.

Script started on Fri Sep  3 11:13:05 2004
[roam@straylight ~/lang/sh]> setenv LANG C
[roam@straylight ~/lang/sh]> mkdir permtest
[roam@straylight ~/lang/sh]> cd permtest
[roam@straylight ~/lang/sh/permtest]> cat  > normal.sh
#!/bin/sh
echo '$Ringlet$'
[roam@straylight ~/lang/sh/permtest]> cp normal.sh ko.sh
[roam@straylight ~/lang/sh/permtest]> cp normal.sh kb.sh
[roam@straylight ~/lang/sh/permtest]> chmod 777 *.sh
[roam@straylight ~/lang/sh/permtest]> ls -l
total 6
-rwxrwxrwx  1 roam  1001  27 Sep  3 11:13 kb.sh
-rwxrwxrwx  1 roam  1001  27 Sep  3 11:13 ko.sh
-rwxrwxrwx  1 roam  1001  27 Sep  3 11:13 normal.sh

So, now we have three files with silly modes.

[roam@straylight ~/lang/sh/permtest]> cd ..
[roam@straylight ~/lang/sh]> cvs add permtest
Directory /home/cvs/ringlet/sh/permtest added to the repository
[roam@straylight ~/lang/sh]> cd permtest
[roam@straylight ~/lang/sh/permtest]> cvs add normal.sh
cvs add: scheduling file `normal.sh' for addition
cvs add: use 'cvs commit' to add this file permanently
[roam@straylight ~/lang/sh/permtest]> cvs add -ko ko.sh
cvs add: scheduling file `ko.sh' for addition
cvs add: use 'cvs commit' to add this file permanently
[roam@straylight ~/lang/sh/permtest]> cvs add -kb kb.sh
cvs add: scheduling file `kb.sh' for addition
cvs add: use 'cvs commit' to add this file permanently
[roam@straylight ~/lang/sh/permtest]> date
Fri Sep  3 11:14:03 EEST 2004
[roam@straylight ~/lang/sh/permtest]> cvs ci -m 'Permissions test' *.sh
RCS file: /home/cvs/ringlet/sh/permtest/kb.sh,v
done
Checking in kb.sh;
/home/cvs/ringlet/sh/permtest/kb.sh,v  <--  kb.sh
initial revision: 1.1
done
RCS file: /home/cvs/ringlet/sh/permtest/ko.sh,v
done
Checking in ko.sh;
/home/cvs/ringlet/sh/permtest/ko.sh,v  <--  ko.sh
initial revision: 1.1
done
RCS file: /home/cvs/ringlet/sh/permtest/normal.sh,v
done
Checking in normal.sh;
/home/cvs/ringlet/sh/permtest/normal.sh,v  <--  normal.sh
initial revision: 1.1
done
[roam@straylight ~/lang/sh/permtest]> ls -l
total 8
drwxr-xr-x  2 roam  1001  512 Sep  3 11:14 CVS
-rwxrwxrwx  1 roam  1001   27 Sep  3 11:13 kb.sh
-rwxrwxrwx  1 roam  1001   27 Sep  3 11:13 ko.sh
-rwxr-xr-x  1 roam  1001   86 Sep  3 11:14 normal.sh

Yep, according to the modification times, normal.sh was overwritten, but
ko.sh and kb.sh were not touched at all - so CVS seems to DTRT indeed
for -ko and -kb expansion modes.

[roam@straylight ~/lang/sh/permtest]> ./normal.sh=20
$Ringlet: sh/permtest/normal.sh,v 1.1 2004/09/03 08:14:10 roam Exp $
[roam@straylight ~/lang/sh/permtest]> ./ko.sh=20
$Ringlet$
[roam@straylight ~/lang/sh/permtest]> ./kb.sh=20
$Ringlet$
[roam@straylight ~/lang/sh/permtest]> exit
exit

Script done on Fri Sep  3 11:14:23 2004

One could certainly argue that CVS should do the same for the normal
keyword expansion mode (-kkv), if there really are no keywords to be
expanded in the file, and IMHO one would be right to say so :)  Still,
it seems that -ko does provide some consolation.

G'luck,
Peter

--=20
Peter Pentchev	roam@xxxxxxx.xxx    roam@xxxxx.xx    roam@xxxxxxx.xxx
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am jealous of the first word in this sentence.

--VkVuOCYP9O7H3CXI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBOCku7Ri2jRYZRVMRArSpAJ9Mtp9aL98ar2vflCv9UVfGeeQxcwCfdQ2C
9i5A0EZa1VlLyrX4Gqb57rk=
=YTLA
-----END PGP SIGNATURE-----

--VkVuOCYP9O7H3CXI--
There's stuff above here

Generated at 02:00 on 04 Sep 2004 by mariachi 0.52