[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: tag doesn't always tag
RE: tag doesn't always tag
Wed, 26 Oct 2005 18:07:43 +0100
Jacob Weber wrote:
> I'm trying to compare the current contents of a directory to its contents
> when I tagged it. Some files may have been added, some files may have
> been deleted, and some may have changed.
Ok, that's clear.
> Now, notwithstanding your point about CVS not knowing about versions of a
> directory, it IS usually able to do what I'm asking. If I do "rdiff -s -r
> tag1 -r HEAD module/dir", it gives me a nice little report, e.g.
> File test/file1 is removed; tag1 revision 1.1
> File test/file1 is new; HEAD revision 1.2
> Since it doesn't know about versions of a directory, it's probably looking
> at the union of files from tag1 and HEAD in that directory, and diffing
> them against each other. In that way it's able to compare the entire
Right. Well, it's not "looking at the union of files" from two tags. A tag
is not really a set of files, except implicitly and kind-of-backwards.
Instead, what it's doing is looking in the directory in the repository (and in
the attic of that directory), finding _all_ the files that are or ever have
been in there, and checking (in the ,v file) to see if either the tag has been
applied to the file, or it's the current HEAD revision.
> This seems to work in every case, as long as tag1 is in the val-tags file.
> But this won't happen if the directory is empty when I try to tag its
Well, this says to me that for some reason, the tag has not been applied to
the dead revisions of the files.
How are you applying the tag? What commands are you using to make the
directory empty? If you've properly "cvs rm"d the files, they should have
been tagged as dead revisions. Can you show me the exact command sequence
that causes this problem? When you try "cvs log" on one of the removed files,
does it show the tag?
Hey! I think I may have stumbled across just what you're looking for, in
the 'Common command options' section of the manual - take a look at this:
When you specify a particular date or tag to CVS commands, they
normally ignore files that do not contain the tag (or did not
exist prior to the date) that you specified. Use the `-f' option
if you want files retrieved even when there is no match for the
tag or date. (The most recent revision of the file will be used).
Note that even with `-f', a tag that you specify must exist (that
is, in some file, not necessary in every file). This is so that
CVS will continue to give an error if you mistype a tag name.
`-f' is available with these commands: `annotate', `checkout',
`export', `rdiff', `rtag', and `update'.
*WARNING: The `commit' and `remove' commands also have a `-f'
option, but it has a different behavior for those commands. See
*Note commit options::, and *Note Removing files::.*
Wanna try and give it a go with "cvs rdiff -f" ?
Can't think of a witty .sigline today....