New to CVS: multiplatform projects

2001-10-01 Thread kynn




I'm new to CVS, and version control in general.  I understand the
basic idea of having a repository that preserves the history over time
of a software project.

My problem is that, for reasons too complex to go into here, I must
manage two parallel Java development projects.  These two projects are
99 % identical, except in the few areas in which one must be
compatible with v. 1.1.8 of the JDK, and the other must be compatible
with v. 1.3 of the JDK.

The v. 1.3 branch is our main area of development, while the v. 1.1.8
one is a secondary effort to satisfy a significant fraction of our
customers who have not upgraded from Mac OS 9 to Mac OS X.

Since the two versions are so similar, it would be convenient to
generate the v. 1.1.8 code by applying patches to the v. 1.3 code.
(If this were C/C++, the situation could be handled trivially with
conditional compilation, but, alas, Java does not have conditional
compilation.)  This seems like a problem well suited to CVS, but all
the introductory material I've read so far centers around the problem
updating versions over time, instead of the problem of generating one
secondary version from a primary one.

It seems to me that, schematically, things would look like this:

 1.3-branch-1.1 --1.1.8-branch-1.1 (patch)

   |
   v

 1.3-branch-1.2 --1.1.8-branch-1.2 (patch)
   .  .
   .  .
   .  .

Hence, CVS would have to keep track of not only the diffs between
successive versions of the 1.3-branch code, but also the diffs between
the 1.1.8-branch and the 1.3 branch.  (It is not clear to me whether
it would be useful to keep track of the diffs between successive
1.1.8-branch versions, even if it were possible).

Can CVS be cajoled into helping with such a problem?

Thanks,

KJ


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs



Re: New to CVS: multiplatform projects

2001-10-01 Thread Kaz Kylheku

In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote:



I'm new to CVS, and version control in general.  I understand the
basic idea of having a repository that preserves the history over time
of a software project.

My problem is that, for reasons too complex to go into here, I must
manage two parallel Java development projects.  These two projects are
99 % identical, except in the few areas in which one must be
compatible with v. 1.1.8 of the JDK, and the other must be compatible
with v. 1.3 of the JDK.

In C programming, minor differences between target platforms can be
handled using the preprocessor to select alternate areas of program
text for translation. In their infinite wisdom, the Java designers
decided not to add such a thing.  I suggest you add it yourself.

The v. 1.3 branch is our main area of development, while the v. 1.1.8
one is a secondary effort to satisfy a significant fraction of our
customers who have not upgraded from Mac OS 9 to Mac OS X.

The problem is that this isn't really a branch, but two different
targets. Branching is not the appropriate tool for targetting a program
to multiple platforms.

Since the two versions are so similar, it would be convenient to
generate the v. 1.1.8 code by applying patches to the v. 1.3 code.

Why not use a preprocessor to generate the code?  Those Jva files which
need target configuration could be given an extra suffix. Have a Makefile
rule which will reduce files which have this suffix to .java files.

Can CVS be cajoled into helping with such a problem?

Yes, at the cost of doing a lot of merging all the time to keep the
branches in sync, all for the sake of a few differences that are
largely static! 
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs