[Python-checkins] devguide: Two things: (1) explain how to switch between branches so people don't

brett.cannon python-checkins at python.org
Tue Feb 8 20:24:10 CET 2011


brett.cannon pushed f20f47637065 to devguide:

http://hg.python.org/devguide/rev/f20f47637065
changeset:   275:f20f47637065
branch:      hg_transition
tag:         tip
user:        Brett Cannon <brett at python.org>
date:        Tue Feb 08 11:24:02 2011 -0800
summary:
  Two things: (1) explain how to switch between branches so people don't
end up branching off of their own branches constantly, and (2) mention
that using named branches for everything is more for non-committers,
else we would end up with a ton of named branches in the main repo.

files:
  patch.rst

diff --git a/patch.rst b/patch.rst
--- a/patch.rst
+++ b/patch.rst
@@ -10,16 +10,12 @@
 Tool Usage
 ''''''''''
 
-Because Python uses Mercurial as its version control system, **anyone** can make
-commits locally to their repository. This means that you should make as many
-commits to your code checkout as you want in order for you to work effectively.
-
 .. _named-branch-workflow:
 
-Also, Mercurial allows for various workflows according to each person's or
+Mercurial allows for various workflows according to each person's or
 project's preference.  We present here a very simple solution based on `named
-branches <http://mercurial.selenic.com/wiki/NamedBranches>`_.  Before you
-start modifying things in your working copy, type::
+branches <http://mercurial.selenic.com/wiki/NamedBranches>`_ for
+non-committers.  Before you start modifying things in your working copy, type::
 
    hg branch mywork
 
@@ -27,6 +23,20 @@
 Then all your local commits will be recorded on that branch, which is an
 effective way of distinguishing them from other (upstream) commits.
 
+Make sure to do your branching from the ``default`` branch (type ``hg branch``
+to see which branch is active). To switch between branches, e.g., switch to the
+``default`` branch, do::
+
+   hg update default
+
+When you are done with a branch, you can mark it as closed by doing the
+following while the branch you wish to close is active::
+
+   hg commit --close-branch
+
+This deletes nothing, but it stops the branch from being listed as active in
+your checkout.
+
 
 Preparation
 '''''''''''

--
Repository URL: http://hg.python.org/devguide


More information about the Python-checkins mailing list