Difference between revisions of "Tags and Branches"

From GeeklogWiki
Jump to: navigation, search
(Fixed anonymous checkout command)
m (typo (missing 'z'))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Geeklog 1.x CVS ==
+
== General Information ==
  
=== 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.
  
[http://www.geeklog.net/staticpages/index.php/CVS See geeklog.net]
+
'''Note:''' The default branch in a [[Using Mercurial|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").
  
  
=== Tags and Branches ===
+
== Naming conventions ==
  
* The CVS main trunk (aka HEAD) always contains the Geeklog version currently under development.
+
A tag for a specific release uses the following naming convention:
  
* 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.
+
* <tt>geeklog_x_y_zb1</tt> for Geeklog x.y.zb1 (beta 1)
 +
* <tt>geeklog_x_y_zrc1</tt> for Geeklog x.y.zrc1 (release candidate 1)
 +
* <tt>geeklog_x_y_z_stable</tt> for Geeklog x.y.z (final release)
  
* Branches are created off of CVS tags for bugfix and security releases, if necessary.
+
After a stable release, there will usually be a branch off of that version. The naming convention for the branch is to attach <tt>_1</tt> ("underscore one"), i.e.
  
 +
* <tt>geeklog_x_y_z_1</tt>
  
==== Naming conventions ====
+
Tags in the branch then follow the same naming convention as above. Additionally:
  
A CVS tag for a specific release uses the following naming convention:
+
* <tt>geeklog_x_y_zsr1</tt> for Geeklog x.y.zsr1 (security release 1)
 +
* <tt>geeklog_x_y_z_1_1</tt> for Geeklog x.y.z-1 (bugfix release 1). Note the <tt>_1_1</tt> postfix to avoid name collision with the branch name.
  
*<tt>geeklog_x_y_zb1</tt> for Geeklog x.y.zb1 (beta 1)
 
*<tt>geeklog_x_y_rc1</tt> for Geeklog x.y.zrc1 (release candidate 1)
 
*<tt>geeklog_x_y_z_stable</tt> 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 <tt>_1</tt> ("underscore one"), i.e.
+
== Switching to a branch ==
  
*<tt>geeklog_x_y_z_1</tt>
+
To switch an existing repository to a branch (or go back to a tag), simply do:
  
Tags in the branch then follow the same naming convention as above. Additionally:
+
<pre>hg up -r geeklog_1_7_1_1</pre>
  
*<tt>geeklog_x_y_zsr1</tt> for Geeklog x.y.zsr1 (security release 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 "<code>hg branch</code>" - 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).
*<tt>geeklog_x_y_z_1_1</tt> for Geeklog x.y.z-1 (bugfix release 1). Note the <tt>_1_1</tt> postfix to avoid name collision with the branch name.
 
  
  
=== Checking out ===
+
== Checking out ==
  
==== Checking out by CVS tag ====
+
=== Checking out by tag ===
  
 
To check out a specific Geeklog version, e.g. 1.3.11sr2, use:
 
To check out a specific Geeklog version, e.g. 1.3.11sr2, use:
  
<pre>cvs -d :ext:devname@cvs.geeklog.net:/cvsroot/geeklog co -r geeklog_1_3_11sr2 Geeklog-1.x</pre>
+
<pre>hg clone -r geeklog_1_3_11sr2 ssh://username@cvs.geeklog.net//cvsroot/hg/geeklog geeklog-1.3.11sr2</pre>
 
 
(where ''devname'' is the name of the CVS account) or
 
 
 
<pre>cvs -d :ext:anonymous@cvs.geeklog.net:/cvsroot/geeklog co -r geeklog_1_3_11sr2 Geeklog-1.x</pre>
 
 
 
for anonymous CVS access.
 
  
 +
(where ''username'' is the name of the Mercurial [[Setting up an account on cvs.geeklog.net|account]]) or
  
==== Checking out a branch ====
+
<pre>hg clone -r geeklog_1_3_11sr2 http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/ geeklog-1.3.11sr2</pre>
  
Checking out a branch works exactly the same way as checking out by CVS tag, only that you specify the branch name after the <tt>-r</tt> option.
+
for anonymous access.
  
However, for a branch it is recommended to do a
+
=== Checking out a branch ===
  
<pre>cvs -q up -Pd</pre>
+
Checking out a branch works exactly the same way as checking out by tag, only that you specify the branch name after the <tt>-r</tt> option.
  
after the initial checkout to get rid of unused / empty directories.
+
The version you get when checking out a branch is the tip of the branch, i.e. the latest version on that branch.
  
Note that you should ''never'' include the '''A''' option (e.g. <tt>cvs up -PdA</tt>) as that would check out from CVS head and mess up your local repository.
 
  
Other than that, you can always use <tt>cvs up -Pd</tt> to receive any changes made on a branch (the <tt>-q</tt> option only tells CVS to be "quiet" and only print relevant information).
+
[[Category:Development]]

Latest revision as of 06:59, 12 June 2011

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.