[Python-checkins] merge in devguide (hg_transition): Merge
brett.cannon
python-checkins at python.org
Sun Feb 27 21:21:47 CET 2011
brett.cannon pushed a478c5a5a7b5 to devguide:
http://hg.python.org/devguide/rev/a478c5a5a7b5
changeset: 346:a478c5a5a7b5
branch: hg_transition
tag: tip
parent: 345:4a1997d6cf53
parent: 343:6fcbafdf681f
user: Brett Cannon <brett at python.org>
date: Sun Feb 27 12:21:39 2011 -0800
summary:
Merge
files:
diff --git a/committing.rst b/committing.rst
--- a/committing.rst
+++ b/committing.rst
@@ -58,6 +58,44 @@
.. _collapse: http://mercurial.selenic.com/wiki/CollapseExtension
+Minimal Configuration
+---------------------
+
+To use Mercurial as a committer (both of your and others' patches), you should
+set up some basic options in your `configuration file`_. Under Windows,
+TortoiseHg has a graphical settings dialog for most options, meaning you
+don't need to edit the file directly (it is still available in
+``%USERPROFILE%\Mercurial.ini``). Under other platforms, you must edit
+``~/.hgrc``.
+
+Here are the minimal options you need to activate:
+
+* your *username*: this setting defines the name that will be used when you
+ :ref:`commit <hg-commit>` changes. The usual convention is to also include
+ an e-mail contact address in there::
+
+ [ui]
+ username = Your Name <email at example.org>
+
+* *extended diffing*: this setting enables an `extended diff format`_
+ which is more useful than the standard unified diff format as it includes
+ metadata about file copies and permission bits::
+
+ [diff]
+ git = on
+
+Under Windows, you should also enable the `eol extension`_, which will
+fix any Windows-specific line endings your text editor might insert when you
+create or modify versioned files. The public repository has a hook which
+will reject all changesets having the wrong line endings, so enabling this
+extension on your local computer is in your best interest.
+
+
+.. _configuration file: http://www.selenic.com/mercurial/hgrc.5.html#files
+.. _extended diff format: http://www.selenic.com/mercurial/hg.1.html#diffs
+.. _eol extension: http://mercurial.selenic.com/wiki/EolExtension
+
+
Handling Other's Code
---------------------
@@ -95,10 +133,6 @@
Porting Within a Major Version
''''''''''''''''''''''''''''''
-.. note::
- XXX Update to using hg qimport if that ends up being the way non-core
- developers are told to go.
-
Assume that Python 3.3 is the current in-development version of Python and that
you have a patch that should also be applied to Python 3.2. To properly port
the patch to both versions of Python, you should first apply the patch to
@@ -150,11 +184,12 @@
"hg qimport -r tip -P" afterwards but that would add another level of
complexity.
-To move a patch between, e.g., Python 3.2 and 2.7, use the `transplant
-extension`_. Assuming you committed in Python 2.7 first, to pull changeset
-``a7df1a869e4a`` into Python 3.2, do::
+To port a patch from, e.g., Python 3.2 to 2.7, you can use the `transplant
+extension`_. Assuming you first committed your changes as changeset
+``a7df1a869e4a`` in the 3.2 branch and have now :ref:`updated
+<hg-switch-branches>` your working copy to the 2.7 branch, do::
- hg transplant -s <URL to 2.7 repo> a7df1a869e4a
+ hg transplant a7df1a869e4a
# Compile; run the test suite
hg push
diff --git a/faq.rst b/faq.rst
--- a/faq.rst
+++ b/faq.rst
@@ -124,6 +124,8 @@
"default" branch (or any other branch, if such exists).
+.. _hg-current-branch:
+
Which branch is currently checked out in my working copy?
---------------------------------------------------------
@@ -142,6 +144,8 @@
update: (current)
+.. _hg-switch-branches:
+
How do I switch between branches inside my working copy?
--------------------------------------------------------
@@ -241,17 +245,32 @@
Run::
- hg pull <remote repository>
- hg update
+ hg pull <remote repository>
-from the directory you wish to update. The first command retrieves any
-changes from the specified remote repository and merges them into the local
-repository. The second commands updates the current directory and all its
-subdirectories from the local repository.
+from the repository you wish to pull the latest changes into. Most of the
+time, that repository is a clone of the repository you want to pull from,
+so you can simply type::
-You can combine the two commands in one by using::
+ hg pull
- hg pull -u <remote repository>
+This doesn't update your working copy, though. See below:
+
+
+How do I update my working copy with the latest changes?
+--------------------------------------------------------
+
+Do::
+
+ hg update
+
+This will update your working copy with the latest changes on the
+:ref:`current branch <hg-current-branch>`. If you had :ref:`uncommitted
+changes <hg-status>` in your working copy, they will be merged in.
+
+If you find yourself typing often ``hg pull`` followed by ``hg update``,
+be aware that you can combine them in a single command::
+
+ hg pull -u
.. _hg-local-workflow:
diff --git a/patch.rst b/patch.rst
--- a/patch.rst
+++ b/patch.rst
@@ -119,7 +119,7 @@
make patchcheck
This will check and/or fix various common things people forget to do for
-patches, such as adding any new files needing for the patch to work (do not
+patches, such as adding any new files needing for the patch to work (note
that not all checks apply to non-core developers).
Assume you are using the :ref:`mq approach <mq-workflow>` suggested earlier,
diff --git a/setup.rst b/setup.rst
--- a/setup.rst
+++ b/setup.rst
@@ -21,28 +21,6 @@
<http://tortoisehg.org/>`_ graphical client.
-Minimal Configuration
-'''''''''''''''''''''
-
-To use ``hg`` on the command line, you should set up some basic options in
-your `configuration file`_ (``~/.hgrc`` on POSIX,
-``%USERPROFILE%\Mercurial.ini`` on Windows). ::
-
- [ui]
- username = Your Name <email at example.org>
-
- [diff]
- git = on
-
-The first setting defines the name that will be used when you :ref:`commit
-<hg-commit>` changes. The second setting enables an `extended diff format`_
-which is more useful than the standard unified diff format.
-
-Note that TortoiseHg has a graphical settings dialog.
-
-.. _configuration file: http://www.selenic.com/mercurial/hgrc.5.html#files
-.. _extended diff format: http://www.selenic.com/mercurial/hg.1.html#diffs
-
.. _checkout:
Getting the Source Code
--
Repository URL: http://hg.python.org/devguide
More information about the Python-checkins
mailing list