[Python-checkins] devguide: Closes #14479: replace transplant advice with graft
georg.brandl
python-checkins at python.org
Tue Apr 3 08:57:31 CEST 2012
http://hg.python.org/devguide/rev/b1dfbaae4458
changeset: 500:b1dfbaae4458
user: Georg Brandl <georg at python.org>
date: Tue Apr 03 08:57:38 2012 +0200
summary:
Closes #14479: replace transplant advice with graft
files:
committing.rst | 35 +++++++++++++++--------------------
faq.rst | 2 +-
2 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/committing.rst b/committing.rst
--- a/committing.rst
+++ b/committing.rst
@@ -308,30 +308,27 @@
''''''''''''''''''''''''''''''
Let's say you have committed your changes as changeset ``a7df1a869e4a``
-in the 3.2 branch and now want to port it to 2.7. This is simple. First
-update your working copy to the 2.7 branch, then import the patch::
+in the 3.2 branch and now want to port it to 2.7. This is simple using
+the "graft" command, which uses Mercurial's merge functionality to
+cherry-pick::
+
+ hg update 2.7
+ hg graft a7df1a869e4a
+ # Compile; run the test suite
+
+Graft always commits automatically, except in case of conflicts, when you
+have to resolve them and run ``hg graft --continue`` afterwards.
+
+Another method is using "export" and "import": this has the advantage that
+you can run the test suite before committing, but the disadvantage that
+in case of conflicts, you will only get ``.rej`` files, not inline merge
+markers. ::
hg update 2.7
hg export a7df1a869e4a | hg import --no-commit -
# Compile; run the test suite
hg commit
-You can also use the `transplant extension`_::
-
- hg update 2.7
- hg transplant a7df1a869e4a
- # Compile; run the test suite
-
-If you often get failures porting patches this way, you should consider
-using the :ref:`mpatch <merge-patch>` utility.
-
-
-.. warning::
- transplant always commits automatically. This breaks the
- "run the test suite before committing" rule. We could advocate using
- "hg qimport -r tip -P" afterwards but that would add another level of
- complexity.
-
Using several working copies
''''''''''''''''''''''''''''
@@ -408,8 +405,6 @@
someone else that haven't been merged yet.
-.. _transplant extension: http://mercurial.selenic.com/wiki/TransplantExtension
-
.. seealso::
`Merging work
<http://hgbook.red-bean.com/read/a-tour-of-mercurial-merging-work.html>`_,
diff --git a/faq.rst b/faq.rst
--- a/faq.rst
+++ b/faq.rst
@@ -758,7 +758,7 @@
Mercurial comes with many bundled extensions which can be explicitly enabled.
You can get a list of them by typing ``hg help extensions``. Some of these
extensions, such as ``color``, can prettify output; others, such as ``fetch``
-or ``transplant``, add new Mercurial commands.
+or ``graphlog``, add new Mercurial commands.
There are also many `configuration options`_ to tweak various aspects of the
command line and other Mercurial behaviour; typing `man hgrc`_ displays
--
Repository URL: http://hg.python.org/devguide
More information about the Python-checkins
mailing list