mercurial/filemerge.py
changeset 39163 e09fad982ef5
parent 39162 cded904f7acc
child 39293 82555d7186d0
--- a/mercurial/filemerge.py	Wed Aug 15 22:24:50 2018 +0900
+++ b/mercurial/filemerge.py	Tue Aug 14 22:20:28 2018 +0900
@@ -989,6 +989,12 @@
         internals['internal:' + name] = func
         internalsdoc[fullname] = func
 
+        capabilities = sorted([k for k, v in func.capabilities.items() if v])
+        if capabilities:
+            capdesc = _("(actual capabilities: %s)") % ', '.join(capabilities)
+            func.__doc__ = (func.__doc__ +
+                            pycompat.sysstr("\n\n    %s" % capdesc))
+
 # load built-in merge tools explicitly to setup internalsdoc
 loadinternalmerge(None, None, internaltool)