[svk-commit] r2150 - trunk/lib/SVK/Command
clkao at bestpractical.com
clkao at bestpractical.com
Thu Nov 16 10:40:22 EST 2006
Author: clkao
Date: Thu Nov 16 10:40:22 2006
New Revision: 2150
Modified:
trunk/lib/SVK/Command/Commit.pm
Log:
the pipeline process is accidentally saving commit message for us.
Modified: trunk/lib/SVK/Command/Commit.pm
==============================================================================
--- trunk/lib/SVK/Command/Commit.pm (original)
+++ trunk/lib/SVK/Command/Commit.pm Thu Nov 16 10:40:22 2006
@@ -83,7 +83,7 @@
$self->{message} = get_buffer_from_editor
(loc('log message'), $self->message_prompt,
join ("\n", $self->{message} || '', $self->message_prompt, ''), 'commit');
- ++$self->{save_message};
+ $self->{save_message} = $$;
}
$self->decode_commit_message;
}
@@ -122,6 +122,7 @@
sub save_message {
my $self = shift;
return unless $self->{save_message};
+ return unless $self->{save_message} == $$;
local $@;
my ($fh, $file) = tmpfile ('commit', DIR => '', TEXT => 1, UNLINK => 0);
print $fh $self->{message};
@@ -360,7 +361,7 @@
get_buffer_from_editor (loc('log message'), $self->target_prompt,
undef, $file, $target->copath, $target->source->{targets});
die loc("No targets to commit.\n") if $#{$targets} < 0;
- ++$self->{save_message};
+ $self->{save_message} = $$;
unlink $file;
}
More information about the svk-commit
mailing list