|
|
@ -343,6 +343,7 @@ def CheckCallAndFilter(args, stdout=None, filter_fn=None,
|
|
|
|
# This has to be done on a per byte basis to make sure it is not buffered:
|
|
|
|
# This has to be done on a per byte basis to make sure it is not buffered:
|
|
|
|
# normally buffering is done for each line, but if svn requests input, no
|
|
|
|
# normally buffering is done for each line, but if svn requests input, no
|
|
|
|
# end-of-line character is output after the prompt and it would not show up.
|
|
|
|
# end-of-line character is output after the prompt and it would not show up.
|
|
|
|
|
|
|
|
try:
|
|
|
|
in_byte = kid.stdout.read(1)
|
|
|
|
in_byte = kid.stdout.read(1)
|
|
|
|
if in_byte:
|
|
|
|
if in_byte:
|
|
|
|
if call_filter_on_first_line:
|
|
|
|
if call_filter_on_first_line:
|
|
|
@ -363,6 +364,10 @@ def CheckCallAndFilter(args, stdout=None, filter_fn=None,
|
|
|
|
if len(in_line):
|
|
|
|
if len(in_line):
|
|
|
|
filter_fn(in_line)
|
|
|
|
filter_fn(in_line)
|
|
|
|
rv = kid.wait()
|
|
|
|
rv = kid.wait()
|
|
|
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
|
|
|
print >> sys.stderr, 'Failed while running "%s"' % ' '.join(args)
|
|
|
|
|
|
|
|
raise
|
|
|
|
|
|
|
|
|
|
|
|
if rv:
|
|
|
|
if rv:
|
|
|
|
raise subprocess2.CalledProcessError(
|
|
|
|
raise subprocess2.CalledProcessError(
|
|
|
|
rv, args, kwargs.get('cwd', None), None, None)
|
|
|
|
rv, args, kwargs.get('cwd', None), None, None)
|
|
|
|