#!/usr/bin/perl -w # # PVCS to Perforce converter, phase II: improve metadata # # Copyright 1997 Perforce Software. All rights reserved. # Written by James Strickland, July 1997 # # This script sorts the metadata output (first step in phase II). # Note that the sort only requires timestamps and indices to be in memory, # rather than having to shuffle all the information associated with each # change (e.g. change description). require 5.0; use strict; use integer; use lib '.'; use convert; use Change; open(CHANGES, "<$convert::metadata_dir/changes.ns") or die "can't open for read: $!"; open(NEWCHANGES, ">$convert::metadata_dir/changes") or die "can't open for write: $!"; my ($index,$c,@timestamp_and_index); # read 'em in for($index=0;$c=get Change(\*CHANGES);$index=tell(CHANGES)) { push(@timestamp_and_index, [ $c->timestamp, $index ]); } # sort them by timestamp @timestamp_and_index = sort { $$a[0] <=> $$b[0] } @timestamp_and_index; # write 'em out my $ti; foreach $ti (@timestamp_and_index) { seek(CHANGES,$$ti[1],0); $c=get Change(\*CHANGES); $c->put(\*NEWCHANGES); } close(CHANGES); close(NEWCHANGES); unlink("$convert::metadata_dir/changes.ns"); # delete the "not sorted" version
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 7115 | Robert Cowham |
Incorporate Sven's changes: Uses the officially support version P4Perl 2008.2 mkdepot.pl now only uses one connection to the Perforce server in tagged mode. Branching enabled. This was never properly implemented and partly disabled. Branching should work now as expected. |
||
#1 | 4664 | Robert Cowham | Branch into permanent location. | ||
//guest/robert_cowham/perforce/utils/pvcstop4/main/sortmeta.pl | |||||
#1 | 4647 | Robert Cowham |
Rename //guest/robert_cowham/perforce/utils/pvcstop4/... To //guest/robert_cowham/perforce/utils/pvcstop4/main/... |
||
//guest/robert_cowham/perforce/utils/pvcstop4/sortmeta.pl | |||||
#1 | 2289 | Robert Cowham | Initial version from Perforce web page |