[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: outsider's perspective

From: Steve deRosier
Subject: Re: outsider's perspective
Date: Tue, 27 May 2003 11:39:22 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313


As you know, CVS doesn't version directories and frankly was never designed with that in mind (never mind the argument over if it should or should not, it simply doesn't). But...there is a program that does record directory structure: tar. Perhaps you could somehow use tar in conjunction w/ CVS to do what you want to do.


Alternatively, since you're a Perl programmer, why not just write a simple script to parse the directories. You could write two scripts: -> This one recursively parses the directories, writing a file (or to stdout) a representation (in text, best if easily human readable) of the directory structure. -> This one parses the representation file and creates the directory structure.

The representation since it is in text _could_ and in this scenario _should_ be checked into CVS and properly versioned. There may be a way to get CVS to handle a ci and co of the full ERP system using these scripts and the wrappers (not sure, I've never used the wrappers), but if not, you could always have a project 'ERP' that contains a Makefile and the representation file. You checkout the ERP module, run make, and boom, you've got your whole ERP retrieved from the repository. The Makefile would have the instructions to: 1. run on the representation file and build the ERP directory structure 2. run the necessary CVS co or export commands to grab the required files and put them in the right places.

Maybe your Makefile could have both a ci and a co target so you could run 'make co' and 'make ci' to do what you want to do.

Anyone with some competence in Perl and make should be able to build this little build environment in a few days (and don't ask me, I already have a full time job). Do it in house or hire a consultant. (And don't forget to check the scripts into CVS while you're at it).

But, you've got to decide on a trade off -> pay the big bucks for ClearCase or pay (either time or money) to have someone build you a custom build environment. And, you need to evaluate ClearCase to decide if it really does what you are trying to do, or if you're going to have to bend to their way of doing things. I don't know, I have no experience or knowledge with ClearCase at all.

Really, this was all anyone was trying to suggest when they said that CVS doesn't do directories and you'd have to use a build tool to handle them (and frankly, this is the 'proper' way to do it from the CVS paradigm).

As to the CVS paradigm, it's pretty simple:
CVS versions files (text files primarily) and allows for multiple people to checkout and edit those files concurrently. CVS doesn't think anything about directory structure except that it is possible to nest Modules within one another. (Frankly it seems to work best and is happiest when the directory structure is relatively flat.) Directories have no purpose other than to be containers for files (which CVS does care about and will version) and as such, other than structure and name, are so un-interesting to be beneath notice.

That's it. Don't think too hard on it. As is typical with Linux and other UNIX systems, CVS is a simple tool meant to do one simple job and nothing else. CVS versions files. If you want to do more, add more tools into the mix (tar collects files and directories into one large file, but doesn't compress them; gzip compresses single files but doesn't collect them; together the two can grab and archive a large swath of the filesystem and make it small enough to fit on one CD).

I don't know if any of this helps, but I hope I gave you an idea that you hadn't considered.

- Steve

Phil R Lawrence wrote:
Well, I want to say thank you to all who posted regarding my query regarding dir 
versioning.  That was a heck of a discussion.  My resulting perspective:  CVS seems 
innapropriate for our real world needs, preferring instead to serve a "purer" 
versioning paradigm.  (A paradigm which, by the way, seems too complex for me to easily 

To recap, I was looking for:
  - the complete history and versioning of every individual file
  - the ability to recreate dir structures, including hard and
    symbolic links

These 2 things would have allowed me to checkout our whole ERP dir structure as of a given date. Sweet!
Greg says to use the right tool for the right job.  Well, I wish CVS were the right tool, 
because the two "right tools" I've read about have real problems!

ClearCase costs a lot of money.  I mean a *lot* of money.  Now, my organization 
might pay for it, or they might not, I don't know.  We are a University in the 
USA, so we do have money.  But I guarantee most of this world would never in a 
million years be able to pay that sort of money.  So while my org might get by, 
the rest of the world suffers for the lack of an open source solution.

My own custom build tool, wrapped around CVS:
Gimme a break.  It's taken our ERP vendor a decade (more?) to evolve their 
current ... um...  way of doing things.  I'm pretty good at hacking and 
munging, but I am not prepared to try and automate all of the linking and the 
recreation of the other inconsistent results of their upgrade scripts upon CVS 
checkout.  No, I need a tool that can simply capture the *results* of their way 
of doing things and leave it at that.

In conclusion, I know I have little choice but to follow Greg's advice.  I'll 
use CVS for my little perl modules, but I'll be sorry to report to my boss that 
CVS won't work for our ERP versioning project.


Info-cvs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]