Changeset 318
- Timestamp:
- 07/09/2007 04:07:13 PM
- Files:
-
- trunk/script/Vss2Svn/SvnRevHandler.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/script/Vss2Svn/SvnRevHandler.pm
r248 r318 46 46 $self->{author} = undef; 47 47 $self->{comment} = undef; 48 $self->{lastcommentaction} = undef; 48 49 $self->{seen} = {}; 50 $self->{last_action} = {}; 49 51 50 52 } # End _init … … 58 60 my($physname, $itemtype, $actiontype, $timestamp, $author, $comment) = 59 61 @{ $data }{qw( physname itemtype actiontype timestamp author comment )}; 60 my($prevtimestamp, $prevauthor, $prevcomment ) =61 @{ $self }{qw( timestamp author comment )};62 my($prevtimestamp, $prevauthor, $prevcomment, $prevaction) = 63 @{ $self }{qw( timestamp author comment actiontype)}; 62 64 63 65 # Any of the following cause a new SVN revision: … … 68 70 69 71 my $wasseen = $self->{seen}->{$physname}; 72 my $last_action = $self->{last_action}->{$physname}; 70 73 71 74 # in case the current action is the same as the last action 75 if ($actiontype eq 'SHARE' && $wasseen && $last_action eq $actiontype) { 76 $wasseen = 0; 77 } 78 79 # if an add is followed by a share we omit the check for the comment. In most 80 # cases this is a bulk share started with a project. But the comment is 81 # only recorded for the project ADDs and not for the files SHARES 82 if ($actiontype eq 'SHARE' && !defined $comment 83 && defined $self->{lastcommentaction} 84 && $self->{lastcommentaction} eq 'ADD') { 85 $comment = $prevcomment; 86 } 87 else { 88 $self->{lastcommentaction} = $actiontype; 89 } 90 72 91 no warnings 'uninitialized'; 73 92 if(($author ne $prevauthor) || ($comment ne $prevcomment) || $wasseen || … … 91 110 92 111 $self->{seen}->{$physname}++; 112 $self->{last_action}->{$physname} = $actiontype;; 93 113 94 @{ $self }{qw( timestamp author comment )} =95 ($timestamp, $author, $comment );114 @{ $self }{qw( timestamp author comment actiontype)} = 115 ($timestamp, $author, $comment, $actiontype); 96 116 97 117 } # End check … … 106 126 $self->{revnum} = $self->{svncache}->{pkey}; 107 127 $self->{seen} = {}; 128 $self->{last_action} = {}; 108 129 $self->{commitPending} = undef; 109 130
