[PATCH 2 of 3] import: cross-reference ui.patch option from `hg help import`

Jordi GutiƩrrez Hermoso jordigh at octave.org
Tue Jun 23 12:59:24 CDT 2015


# HG changeset patch
# User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
# Date 1435082259 14400
#      Tue Jun 23 13:57:39 2015 -0400
# Node ID 64c3c8ec068b6cc6fd1fb19abe930e4fea828506
# Parent  452d3c9b0041c5a44efbb8327863599b6da27342
import: cross-reference ui.patch option from `hg help import`

This is a fairly obscure patch option. It seems reasonable to expose
it a bit more from the help text for `hg import`.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4173,6 +4173,11 @@ def import_(ui, repo, patch1=None, *patc
     cleanly, :hg:`import --partial` will create an empty changeset,
     importing only the patch metadata.
 
+    It is possible to use external patch programs to perform the patch
+    by setting the ``ui.patch`` configuration option.
+    See :hg:`help config` for more information about configuration
+    files and how to use this option.
+
     To read a patch from standard input, use "-" as the patch name. If
     a URL is specified, the patch will be downloaded from it.
     See :hg:`help dates` for a list of formats valid for -d/--date.
@@ -4198,6 +4203,11 @@ def import_(ui, repo, patch1=None, *patc
 
           hg import --exact proposed-fix.patch
 
+      - use an external tool to apply a patch which is too fuzzy for
+        the default internal tool.
+
+          hg import --config ui.patch="patch --merge" fuzzy.patch
+
     Returns 0 on success, 1 on partial success (see --partial).
     """
 


More information about the Mercurial-devel mailing list