[NTLUG:Discuss] Re: CVS question - matter of style or ignorance

Bryan J. Smith b.j.smith at ieee.org
Thu Aug 26 19:54:06 CDT 2004


On Thu, 2004-08-26 at 20:21, Will Senn wrote:
> Hi all,
> I'm reading the book - Pragmatic Version Control: Using CVS by Thomas 
> and Hunt, in it the authors create a CVS repository:
> cvs -d ~/sandbox init
> and then use it as the basis for a series of examples throughout the 
> book. Doesn't this violate the purpose of a sandbox?

Depends on your definition of "sandbox."

The "init" command creates a repository.  You can have as many CVS
repositories as you want.  Typically I only use one (and maybe a backup)
on a network per department.

But anyone is free to create their own in their own home directory
(there is really no way to avoid that).

If you are the only person who will use this repository (such as well
learning reading a book), then it could be in your home directory.  I
think that is what the author is saying.

Unless he says you should work out of that directory.  That seems a bit
strange.  You normally want a "working directory" that is separate. 
Does he not talk about this in the next (or some subsequent) chapter?

> Wouldn't it make 
> more sense to:
> cvs -d ~/cvs init

I would _avoid_ using "cvs" as a subdirectory name.  "CVS" is the
subdirectory where administrative files are created in a working
directory.  If you have multiplatform development going on, DOS/NT is
case insensitive and you can expect massive issues/data loss.  ;-ppp

> create a sandbox:
> mkdir ~/sandbox
> and make changes to the source in the 'sandbox':
> cd ~/sandbox
> mkdir myCoolProject
> cd myCoolProject
> vi Hello.txt
> cd ..
> cvs add myCoolProject
> cvs add myCoolProject/Hello.txt
> etc.
> in otherwords isn't the sandbox where you'd 'play'?

Again, depends on your definition of sandbox.

All the author is saying is that you should create your own CVS
repository.  I calls that a "sandbox" because it's separate from any
"production" CVS repository.

But I agree, you do _not_ want to work out of it.  You can to be doing
your cvs add, cvs co, cvs update, etc... to/from different locations.

One is the "repository" that you _never_ enter (except to fix things
wrong with the repository itself).  The other is the "working directory"
that you edit files in and run your cvs commands inside of.

They can _both_ be in your home directory.  Just be careful you know
which one is the repository and which one is working.

If they author is advocating the repository be your "working" directory,
and you edit source files directly in it -- yes, he is very much
mistaken on how CVS works.  Does he not talk about "working" directories
in the next chapter? 

Otherwise, you might as well use RCS directly, because CVS isn't buying
you much.


-- 
Compatibility and update matrix of Red Hat(R) distributions:  
http://www.vaporwarelabs.com/files/temp/RH-Distribution-FAQ-3.html 
http://www.vaporwarelabs.com/files/temp/RH-Distribution-FAQ-4.html 
------------------------------------------------------------------ 
Bryan J. Smith                                  b.j.smith at ieee.org 





More information about the Discuss mailing list