monotone

monotone Commit Details

Date:2010-02-24 21:08:36 (9 years 2 months ago)
Author:Tony Cooper
Branch:net.venge.monotone.contrib.lib.automate-stdio
Commit:83d55be520adc983d02d15adb0ad3013d8f17f2c
Parents: c7293e074c8788aa1356016d3e029d3a8e922a8e
Message:Moved the `send last message down p/t stream(s)' logic to be in with the rest of

the last message logic (makes it clearer).
Changes:
Mlib/Monotone/AutomateStdio.pm (5 diffs)

File differences

lib/Monotone/AutomateStdio.pm
46054605
46064606
46074607
4608
46094608
46104609
46114610
......
47364735
47374736
47384737
4738
4739
4740
47394741
47404742
47414743
......
47864788
47874789
47884790
4791
4792
4793
4794
4795
47894796
47904797
47914798
......
47954802
47964803
47974804
4805
4806
4807
4808
47984809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
47994821
48004822
48014823
......
48074829
48084830
48094831
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
48244832
48254833
48264834
$handler_timeout,
$header,
$i,
$last_msg,
$offset_ref,
$size,
$stream);
if ($stream ne "l")
{
# Process non-last messages.
if ($size > 0)
{
}
elsif ($size == 1)
{
my $last_msg;
# Process the last message.
if (! sysread($this->{mtn_out}, $err_code, 1))
{
croak("sysread failed: " . $!);
{
$err_occurred = 1;
}
# Send the terminating last message down any stream file handle
# that had data sent down it.
$last_msg = $header . $err_code;
foreach my $ostream ("p", "t")
{
if ($details{$ostream}->{used})
{
if (! $details{$ostream}->{handle}->print($last_msg))
{
croak("print failed: " . $!);
}
}
}
}
else
{
++ $this->{cmd_cnt};
# Send the terminating last message down any stream file handle that had
# data sent down it.
foreach $stream ("p", "t")
{
if ($details{$stream}->{used})
{
if (! $details{$stream}->{handle}->print($last_msg))
{
croak("print failed: " . $!);
}
}
}
# Record any error or warning messages.
if (${$details{e}->{buffer_ref}} ne "")

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status