info-cvs
[Top][All Lists]
Advanced

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

RE: tag doesn't always tag


From: Jacob Weber
Subject: RE: tag doesn't always tag
Date: Wed, 26 Oct 2005 12:12:53 -0400

Dave,
I'm not so concerned with having CVS create my directory when I do a
checkout. I understand that CVS won't know the difference between my empty
directory and a directory whose files were all deleted.

My main concern is comparing against a tagged version of the directory; I
need it to be a reliable comparison. It works if I add the tag's name to
val-tags; it will show me all the files that have been added since the
(empty) tag.

Jacob



-----Original Message-----
From: Dave Korn [mailto:address@hidden
Sent: Wednesday, October 26, 2005 12:00 PM
To: 'Jacob Weber'; address@hidden
Subject: RE: tag doesn't always tag


Jacob Weber wrote:
> Here's a sort-of simple problem. If I do "cvs tag" on an empty directory,

  You can't do that.  You can only tag files, not directories.  In fact, you
can only do _any_ cvs operations on files, not on directories.

> it looks like CVS doesn't add anything to the CVSROOT/val-tags file, and
> thus has no idea that the tag ever existed.
>
> So say I'm trying to remember the state of a directory, which happens to
> be empty, so I can restore it later. When I try to restore it. CVS won't
> find the tag, and it won't do anything. It should restore an empty
> directory.
>
> Is this a bug?

  Nope, it's a misunderstanding.  CVS doesn't version directories, it
versions files.  It handles directories implicitly: if it has to create a
file, it creates the directory to put it in.  Since no files have the tag
that you are trying to recall (because you never applied it to any files),
cvs does not need to fetch any files, hence does not need to create your
directory.

> Is there a way to force it to add the tag to the val-tags
> file?

  It's not a matter of having it in the val-tags file.  It's more a matter
of using "cvs update" with the -d option but not the -P option if you want
to have an empty dir tree.

    cheers,
      DaveK
--
Can't think of a witty .sigline today....







reply via email to

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