Tags and Branches

From GeeklogWiki
Jump to: navigation, search

General Information

  • The main development branch (aka HEAD) always contains the Geeklog version currently under development.
  • Once a Geeklog release is made, that version will be tagged so that it is possible to check out the exact version of all the files that were shipped in a specific release.
  • Branches are created off of those tags for bugfix and security releases, if necessary.

Note: The default branch in a Mercurial repository is usually called "default". The Geeklog repository was converted from CVS and as a result of that conversion, our default branch is called "HEAD" (and there is no branch called "default").


Naming conventions

A tag for a specific release uses the following naming convention:

  • geeklog_x_y_zb1 for Geeklog x.y.zb1 (beta 1)
  • geeklog_x_y_zrc1 for Geeklog x.y.zrc1 (release candidate 1)
  • geeklog_x_y_z_stable for Geeklog x.y.z (final release)

After a stable release, there will usually be a branch off of that version. The naming convention for the branch is to attach _1 ("underscore one"), i.e.

  • geeklog_x_y_z_1

Tags in the branch then follow the same naming convention as above. Additionally:

  • geeklog_x_y_zsr1 for Geeklog x.y.zsr1 (security release 1)
  • geeklog_x_y_z_1_1 for Geeklog x.y.z-1 (bugfix release 1). Note the _1_1 postfix to avoid name collision with the branch name.


Switching to a branch

To switch an existing repository to a branch (or go back to a tag), simply do:

hg up -r geeklog_1_7_1_1

i.e. use the branch name or tag name as the revision. You can confirm that you're on the correct branch afterwards by using "hg branch" - it should display the name of the branch you just switched to (for tags, it depends on whether the tag is located on a branch or on the trunk).


Checking out

Checking out by tag

To check out a specific Geeklog version, e.g. 1.3.11sr2, use:

hg clone -r geeklog_1_3_11sr2 ssh://username@cvs.geeklog.net//cvsroot/hg/geeklog geeklog-1.3.11sr2

(where username is the name of the Mercurial account) or

hg clone -r geeklog_1_3_11sr2 http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/ geeklog-1.3.11sr2

for anonymous access.

Checking out a branch

Checking out a branch works exactly the same way as checking out by tag, only that you specify the branch name after the -r option.

The version you get when checking out a branch is the tip of the branch, i.e. the latest version on that branch.