Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 1997 03:12:59 -0800
From:      Josh MacDonald <jmacd@CS.Berkeley.EDU>
To:        Mikael Karpberg <karpen@ocean.campus.luth.se>
Cc:        hackers@freebsd.org
Subject:   Re: Source code commits 
Message-ID:  <199701311113.DAA01372@paris.CS.Berkeley.EDU>
In-Reply-To: Your message of "Fri, 31 Jan 1997 11:20:48 %2B0100." <199701311020.LAA26256@ocean.campus.luth.se> 

next in thread | previous in thread | raw e-mail | index | archive | help
The problem with your idea is you're trying to fix a problem
that wouldn't exist if CVS operated *better* on projects, not
on individual files.  Its a limitation imposed by the CVS
repository format.  I think you're approach takes the wrong
direction.  If CVS didn't have such a hard-coded notion of
the directory, you could just have each project have a list
of files, some of which could be other projects, then you 
could share code by including the same subproject in two
higher level projects.  You could implement this by wrapping
CVS in a layer of scripts, even, but I tend to dislike such
solutions.

-josh

> 
> That sounds great! If you do, however, PLEASE fix the fundamental flaw in
> cvs: It treats projects, not files. *sigh*
> 
> This is VERY annoying when using C++, wher eyou have one class per file,
> and you try to do code reuse.
> 
> It would be SO nice if you just checked all the files in a "global heap",
> (unless you specifically said it was to be a project specific file) and
> what the "project" normally was was just a file looking something like
> the current ".../CVS/Entries" files.
> 
> Then you could start building a project, using old classes that had some
> nice basic functionality you need, like a mutex wrapper, or so.
> Imagine if you could do something like this to create a new project:
> 
> me@my> cvs new MyNewProject
> me@my> cd MyNewProject
> me@my> mkdir thread_sync
> me@my> cd thread_sync
> me@my> cvs include mutexwrapper.cc
> me@my> emacs semaphorewrapper.cc
> me@my> cvs add semaphorewrapper.cc
> me@my> ls
> mutexwrapper.cc      semaphorewrapper.cc
> me@my> cd ..
> me@my> vi Makfile
> me@my> cvs add -private Makefile
> me@my> ls $CVSROOT/PUBLIC/
> mutexwrapper.cc      semaphorewrapper.cc
> me@my> ls $CVSROOT/MyNewProject
> PUBLIC_INCLUDES      Makefile
> me@my> echo "YES! HURRAY!"
> etc...
> 
> Then, if I made a bugfix in my mutexwrapper, it would automatically spread
> to all my other projects using it, and they could in turn include the
> semaphore wrapper from this project and start using that. Maybe my example
> above is wrong. Maybe it should be default private, and have a -public
> switch. Or maybe have both switches and a .cvsrc option to set the default.
> It would greatly simplyfy code reuse, and would be very useful, at least 
> for me, trying to track bugfixes across projects at work, and at home.
> Maybe you should also be able to include a project specific file in another
> project, if two of your projects need an extra funktion in the mutexwrapper
> that you don't want to add for all other projects.
> 
> I just had to get that out of my system :-)
> It's THE greatest flaw with CVS as it is today, IMHO.
> 
>   /Mikael
> 
> 



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