[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: commit 101
Re: commit 101
Tue, 05 Oct 2004 09:32:19 -0500
It is just a little difficult for me to follow your questions, but I will have
a try at them.
> CVS newbie here trying do a simple test.
> I have application files under /a/jcl I want to protect with
> I created a repository under /a/cvs using user cvs
<SNIP import, and user change example>
> So here's my dumb, newbie, highlevel question - when I created the
> repository /a/cvs/ and added a project /a/jcl/ to it I was under the
> impression that somehow I'd be able to version the original /a/jcl
> source directory with CVS commands.
Yes and No.
Yes it is now under version control, but the directory was treated as a third
party source and CVS did not modify it as it imported.
If you want to version /a/jcl, then as user cvs
mv /a/jcl /a/jcl_original_source
cvs -d /a/cvs/ checkout jcl
changes should only be made in directories that have been gotten by `cvs
checkout`, the one exception is code you get from a third party (or out of a
different version control system if you are transitioning to cvs) and that
code should be handled as described in the manual section "Tracking
> It appears commit is only updating
> the repository. I can tell the repository is getting updated with the
> commit as checkout shows changes, but /a/jcl is not. How do I verion
> /a/jcl, understanding that userb is unable to write to /a/jcl becasue
> group dev does not have Write to that directory (this of course is by
> design to enforce the use of CVS). Am I correct in pressuming that CVS
> will be able to write files where users can't without using CVS?
1) when you want an update, as user cvs
cd /a/jcl; cvs update -dP
2) have CVS do it as described in "Keeping a checked out copy"
> In very simple design, If I'm administrating cvs with user csv, and
you had used user "cvs" above and I will use cvs as a user below
> administrating an application with user usera, and have developer
> user userb in group dev, and my repository is under /a/cvs and my
> protected application sources are under /a/jcl. What's a simple
> security scheme (using groups) that keeps cvs admin files under cvs
> control, application files (/a/jcl) under usera , but allows userb to
> version /a/jcl recorded under cvs.
chown cvs: /a/cvs
chown cvs: /a/cvs/CVSROOT
chmod og-w /a/cvs
chmod og-w /a/cvs/CVSROOT
chmod og+rw /a/cvs/CVSROOT/history
chmod og+rw /a/cvs/CVSROOT/val-tags
chown cvs:dev /a/cvs/jcl
chmod o-w /a/cvs/jcl
chmod g+ws /a/cvs/jcl
have usera do the checkout in /a/jcl thus the directory gets that user's
permissions and group.
sorry two users sharing a sand box is just a bad idea, either have userb
control /a/jcl and usera just use it, or have usera do everything with /a/jcl
The above chown & chmod commands are about what I do, but they may be
insufficient for you, YMMV, use with care, no warranties.
Note that if you have a problem with userb having the ability to go into
/a/cvs/jcl and modifying files directly, you have one of two problems (from my
1) you need to hire developers you can trust.
2) your boss needs to loosen his/her tie enough to allow oxygen to the brain,
and do number one.
> Many thanks in advance for any help or information.
As a newbie, who sounds like they may be becoming the VC manager, I suggest
that if you have not already, get a copy of the manual, and read the whole
thing or at least through section 9 and add in 13. I did read the whole thing
(several versions ago) and it has been helpful.
> Following up on my own question - after *some* reading. I guess the
> issue for us is that we currently don't stage code. We allow
> developers to promote right into production, but use our homegrown VC
> only to log changes... don't say it.. I know.
Not sure what you are asking here, as it is only a statement, however I will
try to answer the question "how do we use our homegrown VC with CVS?"
short: any way you want.
long: use tags in cvs to relate to your homegrown VC releases.
cvs -d /a/cvs/ checkout jcl
check directory jcl to see that it matches what you want for the homegrown VC
cvs tag HG_VC_Release_number
then if you ever want that release back
cvs -d /a/cvs/ checkout -rHG_VC_Release_number jcl
did you want to ask a better question?
 there is usually a copy with the source, or get it from
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter