Wednesday, January 10, 2007

Branching In CVS

I tried to do a branch the way I think is should work and failed.

Steps tried.

  • File with modification that I don't want on the trunk
  • using TortoiseCVS tried to create a branch
  • failed
The branch doesn't seem to be related to the file but to the tag.

I would guess at this point that I need to create a tag to be used for the branch I want to build and than check in the files using that tag.

Found a CVS Branch and Tag Primer and that is where the following notes come from.

Tags can be used to specify a place to create a branch.

The trunk of the CVS repository is named by only the module name.

Check out a trunk module by:

cvs checkout module

Can check in from the main trunk by the following command:

cvs commit

Branches are add to allow different development paths.

To create a branch you must first create a tag:

cvs tag

or

cvs rtag

To create a branch at the last revision:

cvs rtag -b Branchname my_Module

To create a branch from a tagged revision of the module:

cvs rtag -t Tagname -b Branchname my_Module

What is a branch?

Are all the files in the branch?

Is the branch file by file or for the entire module?

I think I need to do this before I make any changes.

The rtag effects a specified place. By default this is the end of main trunk.

The tag effects at the place where the working directory was check out or last committed.

The branch name refers to the latest revision of the branch.

Can I check stuff in with a tag and than turn those revisions into a branch?

This primer was good, but I still don't have enough to know what is going on with a branch.

Wednesday, January 3, 2007

CVSNT Manual

This is the general manual. It looks pretty good. I probably need to review it.

CVSNT Manual

Does the manual talk about the info command in detail?

Yes it does

cvs info

Thursday, December 21, 2006

Error: malformed CVS/Notify file

The Notify file under the CVS directory became malformed.

Here is the contents of the file.


Retesting to make sure that the MasterTOStatusAutoKey still builds properly after deletes.
EF-16TOList.mdb Wed Dec 20 22:05:45 2006 GMT DNIX C:\Sandbox\F16_TOs\Restore EUC HEAD X Ready to create the form for MasterTOStatusAutoKey table.

Here is the whole error message.

In C:\Sandbox\F16_TOs: "C:\Program Files\CVS Suite\TortoiseCVS\cvs.exe" "-x" "update" "-d" "-P"
"Restore/F-16TOList.mdb"
CVSROOT=:sspi:sh25@localhost:/SUSTAIN

cvs update: malformed CVS/Notify file
cvs [server aborted]: no such directory `Restore'

Error, CVS operation failed (exit code 1)

The 'E' in front of the file name is necessary.

Is there some way to know what the format should be?

I renamed the Notify file to Notify.Old so that it could not be found and the error goes away. Adding the '.Old' extension seems to be how CVS moves old files out of the way.

Friday, December 15, 2006

Loging

cvs log - requires a checked out copy of your documents.

cvs rlog - doesn't require a checked out copy.

Continue Review of "All About CVS"

Concurrent Versioning System (CVS) - the cominant open-source network-transparent version control system.

I need to design, install and maintain a CVS Suite configuration management solutions on a Windows based system.

Theory behind configuration management and in particular source code control.

Secure Shell protocol (SSH)

CVSNT helps computer users keep track of changes to files.

Configuration Management (CM) - a discipline to ensure that the configuration of a item and its components is known, documented and that changes are controlled and tracked.

Purpose - to ensure the integrity of a product and to make its evolution more manageable.

For CM to be effective, it must ensure the integrity of all managed items in each development stage, and make their evolution more manageable, and their interrelationship clear.

Version identifiers or version numbers of individual files do not relate specifically to the version number of an entire application. Since our applications are made up of more than a single file, the collection of files that make a product version is numbered separetely to the version numbers of the individual files.

It is important to distinguish between the version numbers used internally by CVSNT and external numbering schemes used by us. These external numbering schemes are recorded in CVSNT ad tables or labels.

concurrent development - massively parallel development.

Client software - manages the files on your computers.

Server software - manages the repository of files from all computers and users on the network.

A single server can host multiple repositories.

A single repository can host multiple projects.

Each repository and each project can have different users with varying permissions to objects, branches and meta data such as tags.

Ant is a tool similar to Make designed for use in Java projects.

For configuration management t obe effective it must be implemented in such a way that is consistent with our corporate or 'project' culture and is designed to deliver results according to our managment objectives.

Choices for a CM solution are guided overall by management objectives and then by company culture. Do I understand these?

I should avoid using personal preference as a guide.

The most important thing is delivery.

Reserved/Unreserved - is a file reserved for editing by a single user, or can multiple users all edit the same version of the same file at once.

Centralized/De-Centralized - Is a central reference copy of the source code always available, or do users work more autonomously on their own personal copy?

This give 4 possible models:

  • Reserved Centralized
  • Reserved Distributed
  • Unreserved Centralized
  • Unreserved Distributed
Right now I would lean to 'Unreserved Distributed'

Object code can always be re-generated a long as the source code is available.

Branches are used whenever the evolution of changes to the code is not sequential. Branching supports to streams of development.

Magic branches are used when the code exists as several variations, however as individual documents the majority is identical.

CVS stores three things for each document it is managing:

  • The latest version
  • The history as differences to the latest version
  • meta data about each version d
When a person creates a branch there are two "latest versions" stored by CVS in the repository. This allows differences to be kept for both.

Development models assume that the majority of changes will be performed on the Trunk, and then migrated as necessary to other branches.

Branching intensive development model. Most flexible, least control.

Promotion intensive development model. Least flexible, most control.

Mixed model 1:

  • develop version 1 on the trunk
  • when version 1 is feature complete branch version 1 maintenance
  • begin work on version 2 on the trunk
  • finalize version 1 on the branch
  • promote version 1 branch to test
  • fix version 1 bugs on the version 1 branch and promote to test again
Mixed model 2:

  • develop version 1 on the trunk
  • when version 1 is feature complete promote to integration
  • development for version 2 is placed on a branch to be integrated in later
  • when version 1 is integrated promote to testing
  • when version 1 is promoted to production
I am not sure this model makes sense.

ELSYS has been following a promotional model in development.

The client side of CVS works with the files in a sandbox locally.

The server side of CVS works with the files in the repository.

What model is SUSTAIN using?

What backup do we need to do for the repositories?

The CVS repository stores CVS configuration information plus all the versions of each of the documents and also meta data about each of these versions.

The repository should not be named CVS or CVSROOT since these names have specific meaning to CVS.

Don't version control a directory or file name CVS, AUX, LPT, CON, or other "Microsoft DOS" reserved word.

Should be using Server 2000 or 2003.

It is best to have 10 times the size of the files being checked in available in memory. Three times is the absolute minimum.

  • 100 meg file means 1000 meg (1 gig) of memory (best)
  • 100 meg file means 300 meg of memory (minimal)
Faster disks are generally more valuable than more processors or faster processor in a CVSNT server system.

For maimum security let the operating system handle the security (SSPI - Windows, SSH Unix).

Pserver should be disabled.

Refactoring of the repository (name changes)

Project and module refer to the same thing.

Each top-level directory is a module.

Directories below the top-level are module aliases.

Email sending is disabled by default.

Thursday, December 14, 2006

Binary File Types

CVSNT has a default set of binary file types (see "All About CVS" page 259).

Notes that this doesn't include the Borland Project Group types files (*.bpg) or the BCBProject files (*.bpr).

TortoiseCVS will scan the first 4000 bytes to see if a file needs to be checked in as a binary file.

I don't know if WinCVS does any similar checking.

Additional files types can be defined as binary by add them in the cvswrappers administration file.

This can be done by checking out the CVSROOT module from CVSCNT, modifying the cvswrappers file and than checking the file back in.

Review of "All About CVS" for CVSNT

All About CVS

CVSNT 2.5.03.2383 July 2006

Need to look in the help file for information on:

  • CVSROOT versus CVSROOT
  • iconv (supported codepages)
  • /etc/cvsnt/PServer, /etc/cvsnt/Plugin linus/unix configuration files
There is an upcoming 2.6.01 version.