##// END OF EJS Templates
git: use nicer failed command debug. Allows verifiy the directory, and env options that might change call behaviour.
marcink -
r554:619a7f2a default
parent child Browse files
Show More
@@ -689,9 +689,9 b' class GitRemote(object):'
689 gitenv['GIT_DISCOVERY_ACROSS_FILESYSTEM'] = '1'
689 gitenv['GIT_DISCOVERY_ACROSS_FILESYSTEM'] = '1'
690
690
691 cmd = [settings.GIT_EXECUTABLE] + _copts + cmd
691 cmd = [settings.GIT_EXECUTABLE] + _copts + cmd
692 _opts = {'env': gitenv, 'shell': False}
692
693
693 try:
694 try:
694 _opts = {'env': gitenv, 'shell': False}
695 _opts.update(opts)
695 _opts.update(opts)
696 p = subprocessio.SubprocessIOChunker(cmd, **_opts)
696 p = subprocessio.SubprocessIOChunker(cmd, **_opts)
697
697
@@ -699,7 +699,9 b' class GitRemote(object):'
699 except (EnvironmentError, OSError) as err:
699 except (EnvironmentError, OSError) as err:
700 cmd = ' '.join(cmd) # human friendly CMD
700 cmd = ' '.join(cmd) # human friendly CMD
701 tb_err = ("Couldn't run git command (%s).\n"
701 tb_err = ("Couldn't run git command (%s).\n"
702 "Original error was:%s\n" % (cmd, err))
702 "Original error was:%s\n"
703 "Call options:%s\n"
704 % (cmd, err, _opts))
703 log.exception(tb_err)
705 log.exception(tb_err)
704 if safe_call:
706 if safe_call:
705 return '', err
707 return '', err
General Comments 0
You need to be logged in to leave comments. Login now