comparison mercurial/subrepo.py @ 15190:6dc67dced8c1

subrepo: improve error message when svn isn't found subprocess was returning the following unhelpful message: abort: No such file or directory
author Matt Mackall <mpm@selenic.com>
date Sun, 02 Oct 2011 13:02:15 -0500
parents 91dc8878f888
children d0694223861a
comparison
equal deleted inserted replaced
15189:dc360709cea9 15190:6dc67dced8c1
546 def __init__(self, ctx, path, state): 546 def __init__(self, ctx, path, state):
547 self._path = path 547 self._path = path
548 self._state = state 548 self._state = state
549 self._ctx = ctx 549 self._ctx = ctx
550 self._ui = ctx._repo.ui 550 self._ui = ctx._repo.ui
551 self._exe = util.findexe('svn')
552 if not self._exe:
553 raise util.Abort(_("'svn' executable not found for subrepo '%s'")
554 % self._path)
551 555
552 def _svncommand(self, commands, filename='', failok=False): 556 def _svncommand(self, commands, filename='', failok=False):
553 cmd = ['svn'] 557 cmd = [self._exe]
554 extrakw = {} 558 extrakw = {}
555 if not self._ui.interactive(): 559 if not self._ui.interactive():
556 # Making stdin be a pipe should prevent svn from behaving 560 # Making stdin be a pipe should prevent svn from behaving
557 # interactively even if we can't pass --non-interactive. 561 # interactively even if we can't pass --non-interactive.
558 extrakw['stdin'] = subprocess.PIPE 562 extrakw['stdin'] = subprocess.PIPE