[PATCH STABLE] import: mark --exact as experimental

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Feb 25 09:53:26 UTC 2016


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1456060026 -3600
#      Sun Feb 21 14:07:06 2016 +0100
# Branch stable
# Node ID a412b87ce53add0d4304de0170140bff1dc266b3
# Parent  cb6a952efbf48d306a7c82d7fe46115f072cbb1d
# EXP-Topic expexact
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r a412b87ce53a
import: mark --exact as experimental

The feature have been plagued by very serious bugs for years. Let's hide if from
unsuspecting users until theses get fixed.

The main issue is that --exact is going to test that the resulting node match
the one recorded in the patch, matches the resulting commit. However, as we
don't export most of the "extra" contents in the patch, they are not preserved
and the hash changes, leading to the import being aborted even if everything
else applied cleanly.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4593,15 +4593,15 @@ def identify(ui, repo, source=None, rev=
     ('', 'bypass', None,
      _("apply patch without touching the working directory")),
     ('', 'partial', None,
      _('commit even if some hunks fail')),
     ('', 'exact', None,
-     _('apply patch to the nodes from which it was generated')),
+     _('apply patch to the nodes from which it was generated (EXPERIMENTAL)')),
     ('', 'prefix', '',
      _('apply patch to subdirectory'), _('DIR')),
     ('', 'import-branch', None,
-     _('use any branch information in patch (implied by --exact)'))] +
+     _('use any branch information in patch'))] + # (implied by --exact)
     commitopts + commitopts2 + similarityopts,
     _('[OPTION]... PATCH...'))
 def import_(ui, repo, patch1=None, *patches, **opts):
     """import an ordered set of patches
 


More information about the Mercurial-devel mailing list