redefine when states are different to include notion of no LAST_TREESTATE.

This commit is contained in:
kestes%walrus.com 2002-05-06 20:53:03 +00:00
parent 124e7a6c0c
commit 5d50b3ba99

View File

@ -40,8 +40,8 @@
# Contributor(s):
# $Revision: 1.40 $
# $Date: 2002/05/06 20:23:28 $
# $Revision: 1.41 $
# $Date: 2002/05/06 20:53:03 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_Bonsai.pm,v $
# $Name: $
@ -101,7 +101,7 @@ use TreeData;
use VCDisplay;
$VERSION = ( qw $Revision: 1.40 $ )[1];
$VERSION = ( qw $Revision: 1.41 $ )[1];
@ISA = qw(TinderDB::BasicTxtDB);
@ -287,7 +287,7 @@ sub apply_db_updates {
$TinderDB::MAX_UPDATES_SINCE_TRIM)
) {
$METADATA{$tree}{'updates_since_trim'}=0;
$self->trim_db_history(@_);
$self->trim_db_history($tree);
}
$self->savetree_db($tree);
@ -381,23 +381,24 @@ sub is_break_cell {
$LAST_TREESTATE = $DATABASE{$tree}{$time}{'treestate'};
}
my $is_state1_same = (defined($LAST_TREESTATE)) &&
my $is_state1_different =
(
!(defined($DATABASE{$tree}{$next_time}{'treestate'})) ||
($last_treestate eq $DATABASE{$tree}{$next_time}{'treestate'})
);
(defined($LAST_TREESTATE)) &&
(defined($DATABASE{$tree}{$next_time}{'treestate'})) &&
($last_treestate ne $DATABASE{$tree}{$next_time}{'treestate'}) &&
1);
my $is_state2_same = (defined($LAST_TREESTATE)) &&
my $is_state2_different =
(
!(defined($DATABASE{$tree}{$time}{'treestate'})) ||
($last_treestate eq $DATABASE{$tree}{$time}{'treestate'})
);
(defined($LAST_TREESTATE)) &&
(defined($DATABASE{$tree}{$time}{'treestate'})) &&
($last_treestate ne $DATABASE{$tree}{$time}{'treestate'}) &&
1);
$is_state_same = $is_state1_same && $is_state2_same;
$is_state_different = $is_state1_different || $is_state2_different;
my $is_author_data = defined($DATABASE{$tree}{$time}{'author'});
my $is_break_cell = ( !($is_state_same) || ($is_author_data) );
my $is_break_cell = ( ($is_state_different) || ($is_author_data) );
return $is_break_cell;
}