Changeset 306
- Timestamp:
- 03/21/2007 07:03:18 PM
- Files:
-
- trunk/script/vss2svn.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/script/vss2svn.pl
r305 r306 298 298 $tphysname, $itemname, $itemtype, $parent, $user, $timestamp, $comment, 299 299 $is_binary, $info, $priority, $sortkey, $label, $cachename); 300 300 301 my $last_timestamp = 0; 302 301 303 VERSION: 302 304 foreach $version (@{ $xml->{Version} }) { … … 305 307 $tphysname = $action->{Physical} || $physname; 306 308 $user = $version->{UserName}; 307 $timestamp = $version->{Date};308 309 309 310 $itemname = &GetItemName($name); … … 313 314 314 315 if (!$info) { 315 warn "\nWARNING: Unknown action '$actionid'\n";316 &ThrowWarning ("'$physname': Unknown action '$actionid'\n"); 316 317 next VERSION; 317 318 } 318 319 320 # check the linear order of timestamps. It could be done better, for 321 # example checking the next version and calculate the middle time stamp 322 # but regardless of what we do here, the result is erroneous, since it 323 # will mess up the labeling. 324 $timestamp = $version->{Date}; 325 if ($timestamp < $last_timestamp) { 326 $timestamp = $last_timestamp + 1; 327 &ThrowWarning ("'$physname': wrong timestamp at version " 328 . "'$version->{VersionNumber}'; setting timestamp to " 329 . "'$timestamp'"); 330 } 331 $last_timestamp = $timestamp; 332 319 333 $itemtype = $info->{type}; 320 334 $actiontype = $info->{action}; … … 346 360 if (defined $action->{Label} && !ref($action->{Label})) { 347 361 $label = $action->{Label}; 348 362 349 363 # append the label comment to a possible version comment 350 364 if ($action->{LabelComment} && !ref($action->{LabelComment})) { … … 437 451 $sortkey, $parentdata, $label, $comment); 438 452 453 # Handle version comments as a secondary action for the same 454 # if (defined $version->{Label} && !ref($version->{Label})) { 455 # my ($labelComment); 456 # 457 # if ($version->{LabelComment} && !ref($version->{LabelComment})) { 458 # $labelComment = $version->{LabelComment}; 459 # } 460 # $cache->add($tphysname, $vernum, $parentphys, 'LABEL', $itemname, 461 # $itemtype, $timestamp, $user, $is_binary, $info, 5, 462 # $sortkey, $parentdata, $version->{Label}, $labelComment); 463 # } 464 439 465 } 440 466
