[Top][All Lists]

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

RE: tag doesn't always tag

From: Dave Korn
Subject: RE: tag doesn't always tag
Date: Wed, 26 Oct 2005 17:00:15 +0100

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

> 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.

Can't think of a witty .sigline today....

reply via email to

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