[PATCH] filemerge: don't pass function name as loadpath's module_name param

tom_hindle at sil.org tom_hindle at sil.org
Thu May 24 17:57:24 EDT 2018


# HG changeset patch
# User hindlemail <tom_hindle at sil.org>
# Date 1527199007 21600
#      Thu May 24 15:56:47 2018 -0600
# Node ID c5db59b1bae015d926ef172d9201141a40719781
# Parent  bd7a3fa71a72666691b8b77e6bf03be1d2273391
filemerge: don't pass function name as loadpath's module_name param

diff -r bd7a3fa71a72 -r c5db59b1bae0 mercurial/filemerge.py
--- a/mercurial/filemerge.py	Thu May 24 23:26:28 2018 +0900
+++ b/mercurial/filemerge.py	Thu May 24 15:56:47 2018 -0600
@@ -569,17 +569,17 @@ def _xmerge(repo, mynode, orig, fcd, fco
                           blockedtag='mergetool')
         else:
             repo.ui.debug('launching python merge script: %s:%s\n' %
                           (toolpath, scriptfn))
             r = 0
             try:
                 # avoid cycle cmdutil->merge->filemerge->extensions->cmdutil
                 from . import extensions
-                mod = extensions.loadpath(toolpath, 'hgmerge.%s' % scriptfn)
+                mod = extensions.loadpath(toolpath, 'hgmerge.%s' % tool)
             except Exception:
                 raise error.Abort(_("loading python merge script failed: %s") %
                                   toolpath)
             mergefn = getattr(mod, scriptfn, None)
             if mergefn is None:
                 raise error.Abort(_("%s does not have function: %s") %
                                   (toolpath, scriptfn))
             argslist = procutil.shellsplit(args)


More information about the Mercurial-devel mailing list