Squid Development projects -> CVS repository

CVS repository

Please see http://wiki.squid-cache.org/CvsInstructions for CVS repository access or http://wiki.squid-cache.org/Squid3VCS for current versioning system access

Modules

Module Description
website Web site on devel.squid-cache.org
squid3 Squid HTTP proxy Version 3 (read-only mirror)
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 are covered in the Squid Wiki under MergeProcedure.

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.78 2009/09/09 11:02:28 amosjeffries Exp $