Suggest Debian packages for some optional dependencies.

Index: mercurial-4.5/hgext/bugzilla.py
===================================================================
--- mercurial-4.5.orig/hgext/bugzilla.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/bugzilla.py	2018-02-11 07:35:32.365483051 +0200
@@ -451,7 +451,8 @@
             import MySQLdb as mysql
             bzmysql._MySQLdb = mysql
         except ImportError as err:
-            raise error.Abort(_('python mysql support not available: %s') % err)
+            raise error.Abort(_('python mysql support not available: %s') % err +
+                              _(' (try installing the %s package)') % 'python-mysqldb')
 
         bzaccess.__init__(self, ui)
 
Index: mercurial-4.5/hgext/convert/bzr.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/bzr.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/bzr.py	2018-02-11 07:35:32.365483051 +0200
@@ -55,7 +55,8 @@
             # access bzrlib stuff
             bzrdir
         except NameError:
-            raise common.NoRepo(_('Bazaar modules could not be loaded'))
+            raise common.NoRepo(_('Bazaar modules could not be loaded') +
+                         _(' (try installing the %s package)') % 'bzr')
 
         path = os.path.abspath(path)
         self._checkrepotype(path)
Index: mercurial-4.5/hgext/convert/common.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/common.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/common.py	2018-02-11 07:35:32.365483051 +0200
@@ -40,14 +40,15 @@
 class MissingTool(Exception):
     pass
 
-def checktool(exe, name=None, abort=True):
+def checktool(exe, name=None, abort=True, debname=None):
     name = name or exe
     if not util.findexe(exe):
         if abort:
             exc = error.Abort
         else:
             exc = MissingTool
-        raise exc(_('cannot find required "%s" tool') % name)
+        raise exc(_('cannot find required "%s" tool') % name +
+                   (debname and _(' (try installing the %s package)') % debname or ''))
 
 class NoRepo(Exception):
     pass
Index: mercurial-4.5/hgext/convert/cvs.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/cvs.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/cvs.py	2018-02-11 07:35:32.365483051 +0200
@@ -39,7 +39,7 @@
         if not os.path.exists(cvs):
             raise NoRepo(_("%s does not look like a CVS checkout") % path)
 
-        checktool('cvs')
+        checktool('cvs', debname='cvs')
 
         self.changeset = None
         self.files = {}
Index: mercurial-4.5/hgext/convert/darcs.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/darcs.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/darcs.py	2018-02-11 07:35:32.365483051 +0200
@@ -49,14 +49,15 @@
         if not os.path.exists(os.path.join(path, '_darcs')):
             raise NoRepo(_("%s does not look like a darcs repository") % path)
 
-        common.checktool('darcs')
+        common.checktool('darcs', debname='darcs')
         version = self.run0('--version').splitlines()[0].strip()
         if version < '2.1':
             raise error.Abort(_('darcs version 2.1 or newer needed (found %r)')
                               % version)
 
         if "ElementTree" not in globals():
-            raise error.Abort(_("Python ElementTree module is not available"))
+            raise error.Abort(_("Python ElementTree module is not available") +
+                              _(" (try installing the %s package)") % 'python-celementtree')
 
         self.path = os.path.realpath(path)
 
Index: mercurial-4.5/hgext/convert/git.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/git.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/git.py	2018-02-11 07:35:32.365483051 +0200
@@ -95,7 +95,7 @@
         else:
             self.simopt = []
 
-        common.checktool('git', 'git')
+        common.checktool('git', 'git', debname="git-core")
 
         self.path = path
         self.submodules = []
Index: mercurial-4.5/hgext/convert/gnuarch.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/gnuarch.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/gnuarch.py	2018-02-11 07:35:32.365483051 +0200
@@ -51,7 +51,8 @@
             if util.findexe('tla'):
                 self.execmd = 'tla'
             else:
-                raise error.Abort(_('cannot find a GNU Arch tool'))
+                raise error.Abort(_('cannot find a GNU Arch tool') +
+                                  _(' (try installing the %s package)') % 'tla')
 
         common.commandline.__init__(self, ui, self.execmd)
 
Index: mercurial-4.5/hgext/convert/monotone.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/monotone.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/monotone.py	2018-02-11 07:35:32.365483051 +0200
@@ -75,7 +75,7 @@
         self.files = None
         self.dirs  = None
 
-        common.checktool('mtn', abort=False)
+        common.checktool('mtn', abort=False, debname='monotone')
 
     def mtnrun(self, *args, **kwargs):
         if self.automatestdio:
Index: mercurial-4.5/hgext/convert/subversion.py
===================================================================
--- mercurial-4.5.orig/hgext/convert/subversion.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/hgext/convert/subversion.py	2018-02-11 07:36:44.178752480 +0200
@@ -295,16 +295,19 @@
             raise NoRepo(_("%s does not look like a Subversion repository")
                          % url)
         if svn is None:
-            raise MissingTool(_('could not load Subversion python bindings'))
+            raise MissingTool(_('could not load Subversion python bindings') +
+                              _(' (try installing the %s package)') % 'python-subversion')
 
         try:
             version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
             if version < (1, 4):
                 raise MissingTool(_('Subversion python bindings %d.%d found, '
-                                    '1.4 or later required') % version)
+                                    '1.4 or later required') % version +
+                                  _(' (try upgrading the %s package)') % 'python-subversion')
         except AttributeError:
             raise MissingTool(_('Subversion python bindings are too old, 1.4 '
-                                'or later required'))
+                                'or later required') +
+                              _(' (try upgrading the %s package)') % 'python-subversion')
 
         self.lastrevs = {}
 
@@ -1113,6 +1116,8 @@
         return self.join('hg-authormap')
 
     def __init__(self, ui, repotype, path):
+        common.checktool('svn', debname='subversion')
+        common.checktool('svnadmin', debname='subversion')
 
         converter_sink.__init__(self, ui, repotype, path)
         commandline.__init__(self, ui, 'svn')
Index: mercurial-4.5/mercurial/hgweb/server.py
===================================================================
--- mercurial-4.5.orig/mercurial/hgweb/server.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/mercurial/hgweb/server.py	2018-02-11 07:35:32.369483121 +0200
@@ -240,7 +240,8 @@
             from .. import sslutil
             sslutil.modernssl
         except ImportError:
-            raise error.Abort(_("SSL support is unavailable"))
+            raise error.Abort(_("SSL support is unavailable") +
+                              _(" (try installing the %s package)") % 'python-openssl')
 
         certfile = ui.config('web', 'certificate')
 
Index: mercurial-4.5/mercurial/sslutil.py
===================================================================
--- mercurial-4.5.orig/mercurial/sslutil.py	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/mercurial/sslutil.py	2018-02-11 07:35:32.369483121 +0200
@@ -248,7 +248,9 @@
                 cafile = util.expandpath(cafile)
                 if not os.path.exists(cafile):
                     raise error.Abort(_('could not find web.cacerts: %s') %
-                                      cafile)
+                                      cafile +
+                                      _(' (try installing the %s package)') %
+                                        'ca-certificates')
             elif s['allowloaddefaultcerts']:
                 # CAs not defined in config. Try to find system bundles.
                 cafile = _defaultcacerts(ui)
Index: mercurial-4.5/tests/test-https.t
===================================================================
--- mercurial-4.5.orig/tests/test-https.t	2018-02-11 07:35:32.369483121 +0200
+++ mercurial-4.5/tests/test-https.t	2018-02-11 07:35:32.369483121 +0200
@@ -29,7 +29,7 @@
 
   $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  abort: could not find web.cacerts: no-such.pem
+  abort: could not find web.cacerts: no-such.pem (try installing the ca-certificates package)
   [255]
 
 Test server address cannot be reused
