CVS'ers,

I'm using "pserver" WinCVS 1.1b9 client against a Sun Solaris 2.6 CVS
1.10.8 server.

I'm trying to use cvs import to bring an existing directory tree into
CVS (without the particular need to subsequently maintain that code on
the import's vendor branch).  Per documentation, the vendor branch is
made the "HEAD" revision, but I really want the trunk revision to be the
HEAD.  The main reason is that if anyone checks out (but does not
commit) and then tags, I want the tag to go to the trunk revision, not
the vendor branch revision.  I've seen reference to a patch to import to
the trunk only, but it appears to no longer be accessible from
www.cyclic.com - and anyway, I'd rather stick with the "official"
releases.

What is the preferred way to make the HEAD revision of imported files
point to the trunk?

I found an info-cvs post suggesting a post-import way to move the HEAD
revision to the trunk and generally clean up if the vendor branch is
unwanted:
 >  cd {some-working-directory}
 >  cvs admin -b1 .
 >  cvs tag -d {vendor-tag-1} .
 >  cvs tag -d {vendor-tag-2} .
 >  cvs tag -d {vendor-branch-tag} .
 >  cvs admin -o1.1.1: .
Unfortunately, this doesn't seem to work (anymore?).  Specifically, upon
trying "cvs admin -b1 ." I get the following:
cvs admin: while processing more than one file:
cvs [admin aborted]: attempt to specify a numeric revision

I then tagged the 1.1 revision as "IMPORT_TAG" and tried "cvs admin
-bIMPORT_TAG".  I get the following:
cvs server:
/export/home/project/repository/cvs_repository/cvs_install/index.html,v:
Symbolic name IMPORT_TAG is undefined.
cvs server: cannot modify RCS file for `index.html'

I can explicitly indicate a filename,  e.g. "cvs admin -b1 blah.txt",
but I have to do this on each imported file individually (or run a
script to perform this operation on all files in the imported directory
tree).

After a day of tinkering, the best procedure I've come up with is the
following:

First, import:
cvs import -I ! -I CVS -W "*.exe -k 'b'" -W "*.pdf -k 'b'" -W "*.ppt -k
'b'" -W "*.zip -k 'b'" -W "*.doc -k 'b'" -W "*.jpg -k 'b'" -m "Imported
files" cvs_install avendor arelease

Second, checkout:
cvs checkout -P cvs_install
(at this point the HEAD revision points to the vendor branch, per
documentation)

Third, force a commit, which has the effect of moving HEAD to the trunk:

cvs commit -f -R "-mForce commit to move HEAD from vendor branch to
trunk"
(Now the HEAD revision points to 1.2 - on the trunk, which is what I
want).

The only "problem" with this approach is that I have an extra trunk
revision, 1.2.  If this is the easiest, cvs-friendly way to accomplish
this goal (without scripting), so be it - I can live with that.  But I'd
welcome to other ideas or recommendations.

Thanks,
David

Reply via email to