bug-cvs
[Top][All Lists]
Advanced

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

Problems with cvs watch add and directories


From: Jim.Hyslop
Subject: Problems with cvs watch add and directories
Date: Wed, 9 Feb 2005 17:21:42 -0500

OK, my understanding is, if you issue:

cvs watch add [dirname]

(where [dirname] specifies a directory)

then, if any subdirectories are added to [dirname], you will automatically
get a watch for that new directory.

However, CVS doesn't seem to be doing this. I've tried using version 1.11.9
and 1.12.9, and neither one will add the D entries to CVS/fileattr, and if
you add a subdirectory, then no CVS/fileattr file is created. Yes, I know
these are both old versions, but I've checked the NEWS file and there is no
mention of any bug fixes to 'cvs watch'.

Here is a sequence of commands that illustrates the problem:
address@hidden:$ cvs co cvs-test/jhyslop
cvs checkout: Updating cvs-test/jhyslop
address@hidden:$ cd cvs-test/jhyslop/
address@hidden:$ mkdir subdir
address@hidden:$ cvs add subdir
Directory /cvs/cvs-test/jhyslop/subdir added to the repository
address@hidden:$ cvs watch add subdir
address@hidden:$ cvs watchers
address@hidden:$ cat /cvs/cvs-test/jhyslop/CVS/fileattr
cat: cannot open /cvs/cvs-test/jhyslop/CVS/fileattr

[at this point, I would expect the fileattr to exist, since I issued a
'watch add' command]

address@hidden:$ cd subdir
address@hidden:$ echo some stuff>afile
address@hidden:$ cvs add afile
cvs add: scheduling file `afile' for addition
cvs add: use 'cvs commit' to add this file permanently
address@hidden:$ cvs ci -m "a file" afile
RCS file: /cvs/cvs-test/jhyslop/subdir/afile,v
done
Checking in afile;
/cvs/cvs-test/jhyslop/subdir/afile,v  <--  afile
initial revision: 1.1
done
address@hidden:$ cvs watch add .
address@hidden:$ cat /cvs/cvs-test/jhyslop/subdir/CVS/fileattr
Fafile  _watchers=jhyslop>edit+unedit+commit

[well, OK, it created the fileattr file, but where's the entry
D       _watchers=jhyslop>edit+unedit+commit
I *did* specify a directory name. Hmm... maybe it doesn't like
'.' as a directory specifier]

address@hidden:$ cd ..
address@hidden:$ cvs watch add subdir
address@hidden:$ cat /cvs/cvs-test/jhyslop/subdir/CVS/fileattr
Fafile  _watchers=jhyslop>edit+unedit+commit

[Still no 'D   _watchers=' entry in fileattr]

address@hidden:$ cd subdir
address@hidden:$ mkdir nowatches
address@hidden:$ cvs add nowatches
Directory /cvs/cvs-test/jhyslop/subdir/nowatches added to the repository
address@hidden:$ cd nowatches
address@hidden:$ cvs watchers
address@hidden:$ cat /cvs/cvs-test/jhyslop/subdir/nowatches/CVS/fileattr
cat: cannot open /cvs/cvs-test/jhyslop/subdir/nowatches/CVS/fileattr

[still nothing]

address@hidden:$ vi /cvs/cvs-test/jhyslop/subdir/CVS/fileattr
[ at this point, I manually added the line
D  _watchers=jhyslop>edit+unedit+commit
to fileattr]

address@hidden:$ cd ..
address@hidden:$ mkdir haswatches
address@hidden:$ cvs add haswatches
Directory /cvs/cvs-test/jhyslop/subdir/haswatches added to the repository
address@hidden:$ cat /cvs/cvs-test/jhyslop/subdir/haswatches/CVS/fileattr
D       _watchers=jhyslop>edit+unedit+commit

[Oh, look, there it is - but only because it was there to begin with]

As the last line of my log indicates, if the fileattr _already_ contains a
'D' entry, then new directories behave as expected. It's only if the
fileattr does not already have a 'D' entry that there's a problem.

So, am I doing something wrong, or is this a bug that nobody's noticed yet?

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )







reply via email to

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