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:
jhyslop@ashiko:$ cvs co cvs-test/jhyslop
cvs checkout: Updating cvs-test/jhyslop
jhyslop@ashiko:$ cd cvs-test/jhyslop/
jhyslop@ashiko:$ mkdir subdir
jhyslop@ashiko:$ cvs add subdir
Directory /cvs/cvs-test/jhyslop/subdir added to the repository
jhyslop@ashiko:$ cvs watch add subdir
jhyslop@ashiko:$ cvs watchers
jhyslop@ashiko:$ 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]

jhyslop@ashiko:$ cd subdir
jhyslop@ashiko:$ echo some stuff>afile
jhyslop@ashiko:$ cvs add afile
cvs add: scheduling file `afile' for addition
cvs add: use 'cvs commit' to add this file permanently
jhyslop@ashiko:$ 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
jhyslop@ashiko:$ cvs watch add .
jhyslop@ashiko:$ 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]

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

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

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

[still nothing]

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

jhyslop@ashiko:$ cd ..
jhyslop@ashiko:$ mkdir haswatches
jhyslop@ashiko:$ cvs add haswatches
Directory /cvs/cvs-test/jhyslop/subdir/haswatches added to the repository
jhyslop@ashiko:$ 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]