Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 1996 12:31:41 +0800
From:      Peter Wemm <peter@spinner.DIALix.COM>
To:        Tom Samplonius <tom@sdf.com>
Cc:        jdp@polstra.com, hackers@freebsd.org
Subject:   Re: Local CVS commits (and cvsup) 
Message-ID:  <199611260431.MAA05157@spinner.DIALix.COM>
In-Reply-To: Your message of "Mon, 25 Nov 1996 20:17:34 PST." <Pine.NEB.3.94.961125200854.25765A-100000@misery.sdf.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Tom Samplonius wrote:
> 
>   I have some questions about the CVS "Local Commit" feature.  I
> understand the basic idea of setting CVS_LOCAL_BRANCH_NUM, but not the
> actual procedure.
> 
>   I assume something like the following is required:
> 
> cvs co src
> (edit a file)
> setenv CVS_LOCAL_BRANCH_NUM 1000
> cvs commit (edited file)	# commit is made on unique, new branch
> 
> 
>   But what is recommended way of hacking stuff in $CVSROOT/CVSROOT to
> allow non-freefall committers?  How would I "protect" local changes in
> this directory from removal by cvsup?  Since this directory is just book
> keeping, and technically not part of the repository, cvsup's local commit
> protection will not work on them will it, right? 
> 
> Tom

I'm sure John Polstra can fill in some more details, but there's a couple
of extra steps needed.

Yes, you need to set CVS_LOCAL_BRANCH_NUM.  But you also need to create
a local branch on the files you want to edit...

eg:
setenv CVS_LOCAL_BRANCH_NUM 1000
cvs tag -b MY_BRANCH file.c
cvs update -r MY_BRANCH file.c
cvs commit file.c

But beware, you will no longer see changes made in -current, you'll have
to merge them in manually, and this can get quite messy since cvs has
no way of remembering what you have merged so far.. 'cvs update -jHEAD' will
produce the same merge conflicts over and over again, and create new ones
as time goes by.

Another option is to tag the HEAD revision each time you merge.. eg:

cvs tag MERGE_BASE file.c
cvs tag -b MY_BRANCH file.c
... edit, commit etc.
.. cvsup, new deltas arrive that you want to integrate...
cvs tag MERGE_1 file.c
cvs update -j MERGE_BASE -j MERGE_1 file.c
cvs commit -m 'merged changes from -current' file.c
.. etc.

Also, be aware of the 'cvs update -f' option,  you use it like this:
cvs update -f -r MY_BRANCH
This causes you to use the -current version for everything but use your
version for files that have a MY_BRANCH tag on them.

You can tell cvsup to leave your CVSROOT/* alone by creating a 
sup/<collection>/refuse file.  I've done this before with cvsup but don't
remember the details.

Also, you need to modify your supfile a little.. I think you need to
remove the "delete" keyword to stop cvsup trying to delete stuff that
you've added.  It can't tell the difference between things you've added
and things that have been deleted on freefall, so you have to be very
careful here, as you can end up with stray files.

Cheers,
-Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611260431.MAA05157>