[Python-checkins] devguide (hg_transition): Explain how to obtain a patch

antoine.pitrou python-checkins at python.org
Mon Feb 28 20:52:38 CET 2011


antoine.pitrou pushed 2d5e1a5058a3 to devguide:

http://hg.python.org/devguide/rev/2d5e1a5058a3
changeset:   348:2d5e1a5058a3
branch:      hg_transition
tag:         tip
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Mon Feb 28 20:52:28 2011 +0100
summary:
  Explain how to obtain a patch

files:
  committing.rst

diff --git a/committing.rst b/committing.rst
--- a/committing.rst
+++ b/committing.rst
@@ -286,3 +286,21 @@
    connections, we could offer a way for people to make a remote-to-remote
    clone (like SVN allows creating branches by remote copying).
    hg currently doesn't support that.
+
+
+Uploading a patch for review
+''''''''''''''''''''''''''''
+
+In this scheme, your work will probably consist of many commits (some of
+them merges).  If you want to upload a patch for review somewhere, you need
+a single agregate patch.  This is where having a dedicated named branch
+``mywork`` gets handy.
+
+First ensure that you have pulled *and merged* all changes from the main
+repository, as explained above.  Then, assuming your :ref:`currently checked
+out branch <hg-current-branch>` is still ``mywork``, simply do::
+
+   $ hg diff -r default > mywork.patch
+
+This will write to ``mywork.patch`` all the changes between ``default`` and
+``mywork``.

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


More information about the Python-checkins mailing list