Sha256: d54c54fb0ccc28325fb7cd29cd661eee761e99f9912ea25d328f4aad25d0bb89
Contents?: true
Size: 913 Bytes
Versions: 5
Compression:
Stored size: 913 Bytes
Contents
# need to use popen3 on windows - popen4 always eventually calls fork if Lolcommits::Platform.platform_windows? module Mercurial class Command private def execution_proc proc do debug(command) result = '' error = '' status = nil Open3.popen3(command) do |_stdin, stdout, stderr, wait_thread| Timeout.timeout(timeout) do while (tmp = stdout.read(102_400)) result += tmp end end while (tmp = stderr.read(1024)) error += tmp end status = if RUBY_VERSION =~ /^1\.8/ error.empty? ? 0 : 1 else wait_thread.value end end raise_error_if_needed(status, error) result end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems