Squid Development projects -> CVS repository

CVS repository

The CVS repository resides on the Squid Development projects CVS server and can be reached both anonymously using pserver, online on the web, and using ssh (registered developers only). The CVS repository and server is kindly hosted by SourceForge.

SSH (requires a registered SourceForge account)
export CVS_RSH=ssh
cvs -dYOURUSERID@cvs.devel.squid-cache.org:/cvsroot/squid co -rBRANCHNAME -kk -d squid-BRANCHNAME squid3
 
Web
http://squid.cvs.sourceforge.net/squid/squid3/?only_with_tag=BRANCHNAME
 
Anonymous pserver (for brave testers not afraid of experimental code)
cvs -d:pserver:anonymous@cvs.devel.squid-cache.org:/cvsroot/squid login
[blank password, just press enter]
 
cvs -d:pserver:anonymous@cvs.devel.squid-cache.org:/cvsroot/squid co -rBRANCHNAME -d squid-BRANCHNAME squid3

All development in this repository takes place on branches with automatic change tracking from the master version using the scripts described below

Note: If you are looking for the main Squid sources please use the cvs.squid-cache.org server instead.

Modules

Module Description
website Web site on devel.squid-cache.org
squid3 Squid HTTP proxy Version 3
squid Squid HTTP proxy Version 2

Global tags in the squid3 module

tagDescription
HEAD / noneSquid-3 HEAD mirrored from cvs.squid-cache.org
Z-*Temporary tags used by automated update tools.

Global tags in the squid module

tagDescription
HEAD / noneSquid-2 HEAD mirrored from cvs.squid-cache.org
s2_5Squid-2.5 mirrored from cvs.squid-cache.org
s2_4Squid-2.4 mirrored from cvs.squid-cache.org
s2_3Squid-2.3 mirrored from cvs.squid-cache.org
s2_2Squid-2.2 mirrored from cvs.squid-cache.org
Z-*Temporary tags used by automated update tools.

Scripts

To ease the maintenance of this development CVS repository we use a set of scripts to create and maintain our branches within the CVS tree. All developers creating or maintaining branches of Squid is expected to use these scripts as suitable and the procedures outlined below.

cvsmkbranch
Sets up a new branch of development
cvsmerge
Merges changes from a master branch into the development branch
cvsmkpendingpatch
Generates a patch file from the master branch, but does not apply it. Very useful when a development branch has changes that prevent clean merges, to check that no changes will be missed.
cvsmovebranch
Moves a branch from one ancestor to another
cvsmkpatch
Generates a patch file of the developments. Can also set (or use) a patch tag for future reference to this version.
cvsgetpatch
Retreives a patch version created by cvsmkpatch
cvsmergediff
Support script when trying to resolve merge conflicts
cvsmergeinit
Manual initialization of branch tracking
cvsclosebranch
Closes a development branch, possibly leaving a patch tag with the remains. Warning: Not working properly due to limitations in current CVS versions.
diff.pl
A small CGI script to generate development patches from the web (uses cvsmkpatch)
cleanpatch
A support script to cvsmkpatch and diff.pl for cleaning up CVS patch files

Routine for adding a new branch

Step by step guide for creating and using a new branch from HEAD

  1. "cvs -d user@cvs.devel.squid-cache.org:/cvsroot/squid co squid3" to get a copy of the HEAD revision of Squid
  2. "cd squid3"
  3. Add a project description to projects.html in the website CVS module.
  4. "cvsmkbranch your_new_branch" to create your branch
  5. "cd ../your_new_branch
  6. Hack away and do whatever you are up to be doing
  7. "cvs commit" to save your changes
  8. goto 6
  9. When there has been changes in HEAD you'd like to have, run "cvsmerge HEAD"
  10. When satisfied or need feedback, mail squid-dev@squid-cache.org.

How to merge another branch into yours

If you need to merge another branch into yours, as might happen when you need another unrelated change to continue your work, then use the following procedure

  1. "cvsmergeinit otherbranch its_base_branch" to set up branch tracing between your branch and the other branch.
  2. "cvsmerge otherbranch" to merge the changes of other branch into yours.

After this you can move your branchpoint to "otherbranch" if you like. If so then please delete the old tracking tags by running

Alternatively use the cvsmovebranch to move your branch in one operation (equivalent to cvsmergeinit followed by delete of old tracking tags)

How to generate a diff/patch file

To generate a diff with all changes in your branch the following CVS command can be used:
"cvs rdiff -r Z-branchname_merge_basetag -r branchname diff -u"

To simplify the above and correct some cosmetic issues with CVS diff files I have written two scripts: cvsmkpatch, and it's supporting cleanpatch script.

Usage:
cvsmkpatch basebranch >../filename.patch

How to freeze a patch release

If you need to freeze a patch release then use the cvsmkpatch script with a additional argument for the release name (usually todays date). This is suitably done when you are to submit a patch for inclusion into the main Squid source tree.

cvsmkpatch basebranch revision >../your_branch-revision.patch

This will create CVS tags to allow recreation of the exact patch file, or to check out the exact sources from either your branch or the base branch at the time of the patch.

How to close a branch

Warning: Not working properly due to limitations in current CVS versions

When a branch is finished and integraded into Squid then the branch should be closed. Closing a branch is done by running the cvsclosebranch script.

The script verifies that the branch is empty before removing. If not emtpy then it can optionally create a patch tag on the remains before removing the branch. (the branch won't get removed if there is any remains and no patch tag name has been selected)

Closing a branch is also suitable when a branch is to be merged in full into the main sources, but only do this if you are sure there won't need to be any bugfixes before it is merged. This is probably best done by the core developer member who merges your branch into the main Squid sources.

Commit checklist

Checklist/requirements when you want to get your changes committed to the main Squid release:

  1. The branch is reasonably up to date (cvsmerge HEAD)
  2. You have cleaned it up from testing/experimental code
  3. That you have read the patch manually at least once since the last cvsmerge and that you have verified that the patch only contains your changes and not any other unrelated changes.
  4. Properly indented with a style similar to the rest of the code. Any C code will be indented by GNU indent 1.9.1 (exact version, no other GNU indent version) with the options "-br -ce -i4 -ci4 -l80 -nlp -npcs -npsl -d0 -sc -di0 -psl". This is not strictly required, but If you plan on continuine development in the same branch then it is strongly recommended that you do this or else CVS will have a hard time to update your branch after the merge..
  5. That you send a request for merge to squid-dev, including a description of what has been changed since the last merge (i.e. a suitable commit log entry in the main Squid CVS sources) plus a ChangeLog entry where applicable.
  6. When the changes are in the current Squid snapshot, send a similar message to squid-users announcing the feature and refer them to the snapshot releases if you want to have people test it. (http://www.squid-cache.org/Versions/v3/HEAD/)

Reasoning:

  1. To make sure there is no conflicts when the patch is committed to HEAD
  2. We like to keep the main tree reasonably clean from experimental code.
  3. Many bugs are found by just reading what one have done one more time
  4. Having it indented before the commit to HEAD helps YOU a lot in the next merge from HEAD. This because any changes in HEAD will be properly indented, and if your branch is not then there will be many merge conflicts the next time you merge changes from HEAD.
  5. So the one that commits your changes does not need to guess what you have been doing when writing the commit entry for HEAD.
  6. Easier to retreive and Versioned/timestamped. Mainly so you/we know what code the user runs when you receive problem reports.

Developer CVS mail notifications

Change logs in this developer CVS tree are automatically mailed to the squid-cvs mailing list. Subscribe to this list if you want to be notified on changes to the developer CVS repository.


Squid Now! Cache Now! Valid HTML 4.0! SourceForge
$Id: CVS.html,v 1.76 2007/03/11 02:33:57 hno Exp $