Solved

CVS question

Posted on 2004-10-18
6
239 Views
Last Modified: 2013-12-14
if two people are using a block within a module but in different projects, how should that
be handled in cvs?

would it be correct to commit that one block as a project, and then the two people can check it in and out as necessary?
0
Comment
Question by:danlarkin
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:MogalManic
Comment Utility
They should commit and syncronize daily.  This minimizes the chances that any changes they make would distrupt the other programmer.  These should be the rules:
  1) Only commit code that compiles. If the code doesn't comple yet, either comment it out or commit tomorrow morning
  2) Enter cvs checkin comments whenever possible (I try to enter comments always)
  3) Unit Test the code.  Look in to JUNIT(http://www.junit.org) for Java projects (There are unit test frameworks with simalar API's for other languages as well.  Google C++ Junit.)
  4) COMMUNICATE.  Each programmer should know what the other is doing.  (CVS stands for CONCURRENT Versioning System)  If it is a big project, have daily 5-minute status meetings where each programmer JUST describes how his sub-project is going.
  5) Syncronize BEFORE commiting.  It is the programmer that checks in LAST who is responsible for resolving conficts if two people edit the same line.
0
 

Author Comment

by:danlarkin
Comment Utility
ok that sounds ok... but as regards the "mechanics" of the cvs...should the common block (which i presume will be a separate project from the two developers perspective) be checked in under each developers project?? Is this "double" version control the best way forward or is there a neater solution
0
 
LVL 21

Accepted Solution

by:
MogalManic earned 50 total points
Comment Utility
Yes, I would set up 3 projects:

     Common Libraries:
          /            \
   Project A       Project B


The common library builds a JAR (or LIB if C/C++) as its results.
Project A and Probject B include the common library.

I would also recommend using a build tool such as ANT.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:danlarkin
Comment Utility
ok this makes alot more sense.

I had initally thought i should have the following type structure....

Project A                Project B                    Common Library
         |                        |                                  
common library       common library              


thus my concern about a cvs project inside a cvs project......

So my only concern then is if someone checks out a projectA or projectB they also must *somehow* know to checkout the common library - is this situation  alright?


(I'm using c++, makefiles, and cvs)
0
 
LVL 21

Expert Comment

by:MogalManic
Comment Utility
You could also just create a LIB project.

The common library project will build its results to the LIB project.

That way, if a user checks out Project A (he would also need to include the LIB project as well), he would NOT need to check out the source for common libraries unless he wants to.
0
 

Author Comment

by:danlarkin
Comment Utility
aha of course - ok thanks very much for the help
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now