Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
branch = line[len(prefix):]
break
if not branch:
result['output'] = 'Could not determine parent branch',
result['returncode'] = 1
return result
result['output'] = branch
return result
def _check_executable(self):
assert BzrClient._executable is not None, \
"Could not find 'bzr' executable"
if not BzrClient._executable:
BzrClient._executable = which('bzr')
result = self._run_command(_cmd)
if not result['returncode'] and result['output'] == 'off':
return
HgClient._config_color = True
# inject arguments to force colorization
if HgClient._config_color:
cmd[1:1] = '--color', 'always'
def _check_executable(self):
assert HgClient._executable is not None, \
"Could not find 'hg' executable"
if not HgClient._executable:
HgClient._executable = which('hg')
command.url
return {
'cmd': cmd,
'cwd': self.path,
'output': output,
'returncode': None
}
def _check_executable(self):
assert SvnClient._executable is not None, \
"Could not find 'svn' executable"
if not SvnClient._executable:
SvnClient._executable = which('svn')
if GitClient._config_color_is_auto is None:
_cmd = [GitClient._executable, 'config', '--get', 'color.ui']
result = self._run_command(_cmd)
GitClient._config_color_is_auto = result['output'] in ['', 'auto']
# inject arguments to force colorization
if GitClient._config_color_is_auto:
cmd[1:1] = '-c', 'color.ui=always'
def _check_executable(self):
assert GitClient._executable is not None, \
"Could not find 'git' executable"
if not GitClient._executable:
GitClient._executable = which('git')