# HG changeset patch # User Marcin Kuzminski # Date 2018-09-26 08:28:04 # Node ID 619a7f2a3ca3efe9947e355d00f2f74df8dcf445 # Parent 7b8645d6dc0180afa507a46a8d3b0176769d7465 git: use nicer failed command debug. Allows verifiy the directory, and env options that might change call behaviour. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -689,9 +689,9 @@ class GitRemote(object): gitenv['GIT_DISCOVERY_ACROSS_FILESYSTEM'] = '1' cmd = [settings.GIT_EXECUTABLE] + _copts + cmd + _opts = {'env': gitenv, 'shell': False} try: - _opts = {'env': gitenv, 'shell': False} _opts.update(opts) p = subprocessio.SubprocessIOChunker(cmd, **_opts) @@ -699,7 +699,9 @@ class GitRemote(object): except (EnvironmentError, OSError) as err: cmd = ' '.join(cmd) # human friendly CMD tb_err = ("Couldn't run git command (%s).\n" - "Original error was:%s\n" % (cmd, err)) + "Original error was:%s\n" + "Call options:%s\n" + % (cmd, err, _opts)) log.exception(tb_err) if safe_call: return '', err