Suggest Debian packages for some optional dependencies.
Gbp-Pq: Name deb_specific__optional-dependencies
bzmysql._MySQLdb = mysql
except ImportError as err:
raise error.Abort(
- _(b'python mysql support not available: %s') % err
+ _(b'python mysql support not available: %s') % err +
+ _(b' (try installing the %s package)') % b'python3-mysqldb'
)
bzaccess.__init__(self, ui)
# access breezy stuff
bzrdir
except NameError:
- raise common.NoRepo(_(b'Bazaar modules could not be loaded'))
+ raise common.NoRepo(_(b'Bazaar modules could not be loaded') +
+ _(b' (try installing the %s package)') % b'bzr')
path = util.abspath(path)
self._checkrepotype(path)
pass
-def checktool(exe, name=None, abort=True):
+def checktool(exe, name=None, abort=True, debname=None):
name = name or exe
if not procutil.findexe(exe):
if abort:
exc = error.Abort
else:
exc = MissingTool
- raise exc(_(b'cannot find required "%s" tool') % name)
+ raise exc(_(b'cannot find required "%s" tool') % name +
+ (debname and _(b' (try installing the %s package)') % debname or b''))
class NoRepo(Exception):
if not os.path.exists(cvs):
raise NoRepo(_(b"%s does not look like a CVS checkout") % path)
- checktool(b'cvs')
+ checktool(b'cvs', debname=b'cvs')
self.changeset = None
self.files = {}
if not os.path.exists(os.path.join(path, b'_darcs')):
raise NoRepo(_(b"%s does not look like a darcs repository") % path)
- common.checktool(b'darcs')
+ common.checktool(b'darcs', debname=b'darcs')
version = self.run0(b'--version').splitlines()[0].strip()
if version < b'2.1':
raise error.Abort(
else:
self.simopt = []
- common.checktool(b'git', b'git')
+ common.checktool(b'git', b'git', debname=b'git')
self.path = path
self.submodules = []
if procutil.findexe(b'tla'):
self.execmd = b'tla'
else:
- raise error.Abort(_(b'cannot find a GNU Arch tool'))
+ raise error.Abort(_(b'cannot find a GNU Arch tool') +
+ _(b' (try installing the %s package)') % b'tla')
common.commandline.__init__(self, ui, self.execmd)
self.files = None
self.dirs = None
- common.checktool(b'mtn', abort=False)
+ common.checktool(b'mtn', abort=False, debname=b'monotone')
def mtnrun(self, *args, **kwargs):
if self.automatestdio:
_(b"%s does not look like a Subversion repository") % url
)
if svn is None:
- raise MissingTool(_(b'could not load Subversion python bindings'))
+ raise MissingTool(_(b'could not load Subversion python bindings') +
+ _(b' (try installing the %s package)') % b'python3-subversion')
try:
version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
b'Subversion python bindings %d.%d found, '
b'1.4 or later required'
)
- % version
+ % version +
+ _(b' (try upgrading the %s package)') % b'python-subversion'
)
except AttributeError:
raise MissingTool(
_(
b'Subversion python bindings are too old, 1.4 '
b'or later required'
- )
+ ) +
+ _(b' (try upgrading the %s package)') % b'python-subversion'
)
self.lastrevs = {}
return self.join(b'hg-authormap')
def __init__(self, ui, repotype, path):
+ common.checktool(b'svn', debname=b'subversion')
+ common.checktool(b'svnadmin', debname=b'subversion')
converter_sink.__init__(self, ui, repotype, path)
commandline.__init__(self, ui, b'svn')
cafile = util.expandpath(cafile)
if not os.path.exists(cafile):
raise error.Abort(
- _(b'could not find web.cacerts: %s') % cafile
+ _(b'could not find web.cacerts: %s') % cafile +
+ _(b' (try installing the %s package)') % b'ca-certificates'
)
elif s[b'allowloaddefaultcerts']:
# CAs not defined in config. Try to find system bundles.
cacert not found
$ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
- 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