I generally prefer rtag to tag since:

1. You don't need a checked-out working copy of the repository.  This is often
handy.

2. With tag, the new tag is placed on the revisions your working copy of each
file was based on.  If some of your files have not been committed, you might not
be tagging what you think.  Also, if you haven't checked out a complete copy of
the module (of if some files have been deleted, etc),  tag will not apply to all
files in the repository.  Since rtag applies to every file in the module, you
don't have to worry about what state your checked-out working copy is in.

3. Other people may commit changes to the repository of which you are unaware.
With rtag, your tag applies to all files in the repository, capturing their
state at the time the command is issued.  If your local working copy of the
repository is out-of-date do to another's changes, you may not be tagging what
you think you are tagging.

Of course, there are situations where cvs tag is precisely what you do want to
do; i.e. when you want to capture the state of your local copy of the sources.
When you want to capture the state of the repository, cvs rtag is the best way
to go.

For what we do, we use cvs rtag >= 90% of the time; cvs tag less than 10%.  Your
situation may vary, of course.  You might consider looking at your operations,
and see if some of them might be more foolproof using cvs rtag rather than cvs
tag.

Good luck!

Alan Thompson




To:   Alan Thompson/Orincon@Orincon
cc:
Subject:  Re: cvs tag vs. rtag

How does this (doing an rtag just before committing a change) differ from doing
a
regular tag just before a change?

How does
> % cvs rtag  codeBeforeChange  moduleName
> % <make major change and commit>
> % cvs rtag  codeAfterChange  moduleName

differ from

(in directory for module)

cvs tag codeBeforeChange
<make major change and commit>
cvs tag codeAfterChange

Michael



Reply via email to