package VCP::Source::vss ; =head1 NAME VCP::Source::vss - A VSS repository source =head1 SYNOPSIS vcp vss:project/... -V 5 # Versions 1-5 vcp vss:project/... -VL Label # Versions from Label on up ## Note: unlike ss.exe, vcp requires a space between the option ## letter and the value, so "-V5" won't work. =head1 DESCRIPTION Source driver enabling L<C<vcp>|vcp> to extract versions form a vss repository. This doesn't deal with branches yet (at least not intentionally). That will require a bit of Deep Thought. The source specification for VSS looks like: vss:vssroot/filespec [<options>] where the C<vssroot> is passed to C<vss> with the C<-d> option if provided (C<vssroot> is optional if the environment variable C<VSSROOT> is set) and the filespec and E<lt>optionsE<gt> determine what revisions to extract. C<filespec> may contain trailing wildcards, like C</a/b/...> to extract an entire directory tree. =head1 OPTIONS =over =item -b, --bootstrap -b ... --bootstrap=... -b file1[,file2[, etc.]] --bootstrap=file1[,file2[, etc. ]] (the C<...> there is three periods, a L<Regexp::Shellish|Regexp::Shellish> wildcard borrowed from C<p4> path syntax). Forces bootstrap mode for an entire export (C<-b ...>) or for certain files. Filenames may contain wildcards, see L<Regexp::Shellish> for details on what wildcards are accepted. Controls how the first revision of a file is exported. A bootstrap export contains the entire contents of the first revision in the revision range. This should only be necessary when exporting for the first time. An incremental export contains a digest of the revision preceding the first revision in the revision range, followed by a delta record between that revision and the first revision in the range. This allows the destination import function to make sure that the incremental export begins where the last export left off. The default is decided on a per-file basis: if the first revision in the range is revision #.1, the full contents are exported. Otherwise an incremental export is done for that file. This option is necessary when exporting only more recent revisions from a repository. =item --cd Used to set the VSS working directory. VCP::Source::vss will cd to this directory before calling vss, and won't initialize a VSS workspace of it's own (normally, VCP::Source::vss does a "vss checkout" in a temporary directory). This is an advanced option that allows you to use a VSS workspace you establish instead of letting vcp create one in a temporary directory somewhere. This is useful if you want to read from a VSS branch or if you want to delete some files or subdirectories in the workspace. If this option is a relative directory, then it is treated as relative to the current directory. =item --rev-root B<Experimental>. Falsifies the root of the source tree being extracted; files will appear to have been extracted from some place else in the hierarchy. This can be useful when exporting RevML, the RevML file can be made to insert the files in to a different place in the eventual destination repository than they existed in the source repository. The default C<rev-root> is the file spec up to the first path segment (directory name) containing a wildcard, so vss:/a/b/c... would have a rev-root of C</a/b>. In direct repository-to-repository transfers, this option should not be necessary, the destination filespec overrides it. =item -V -V 5 -V 5~3 Passed to C<ss History>. =back =head2 Files that aren't tagged VSS has one peculiarity that this driver works around. If a file does not contain the tag(s) used to select the source files, C<vss log> outputs the entire life history of that file. We don't want to capture the entire history of such files, so L<VCP::Source::vss> goes ignores any revisions before and after the oldest and newest tagged file in the range. =head1 LIMITATIONS "What we have here is a failure to communicate!" - The warden in Cool Hand Luke VSS does not try to protect itself from people checking in things that look like snippets of VSS log file: they come out exactly like they went in, confusing the log file parser. So, if a repository contains messages in the log file that look like the output from some other "vss log" command, things will likely go awry. At least one vss repository out there has multiple revisions of a single file with the same rev number. The second and later revisions with the same rev number are ignored with a warning like "Can't add same revision twice:...". =cut $VERSION = 1.2 ; # Removed docs for -f, since I now think it's overcomplicating things... #Without a -f This will normally only replicate files which are tagged. This #means that files that have been added since, or which are missing the tag for #some reason, are ignored. # #Use the L</-f> option to force files that don't contain the tag to be #=item -f # #This option causes vcp to attempt to export files that don't contain a #particular tag but which occur in the date range spanned by the revisions #specified with -r. The typical use is to get all files from a certain #tag to now. # #It does this by exporting all revisions of files between the oldest and #newest files that the -r specified. Without C<-f>, these would #be ignored. # #It is an error to specify C<-f> without C<-r>. # #exported. use strict ; use Carp ; use Getopt::Long ; use File::Basename; use Regexp::Shellish qw( :all ) ; use VCP::Rev ; use VCP::Debug ':debug' ; use VCP::Source ; use VCP::Utils::vss ; use base qw( VCP::Source VCP::Utils::vss ) ; use fields ( 'VSS_CUR', ## The current change number being processed 'VSS_BOOTSTRAP', ## Forces bootstrap mode 'VSS_IS_INCREMENTAL', ## Hash of filenames, 0->bootstrap, 1->incremental 'VSS_INFO', ## Results of the 'vss --version' command and VSSROOT 'VSS_LABEL_CACHE', ## ->{$name}->{$rev} is a list of labels for that rev 'VSS_LABELS', ## Array of labels from 'p4 labels' 'VSS_MAX', ## The last change number needed 'VSS_MIN', ## The first change number needed 'VSS_VER_SPEC', ## The revision spec to pass to `vss log` 'VSS_DATE_SPEC', ## The date spec to pass to `vss log` 'VSS_NAME_REP_NAME', ## A mapping of names to repository names 'VSS_K_OPTION', ## Which of the VSS/RCS "-k" options to use, if any 'VSS_LOG_CARRYOVER', ## The unparsed bit of the log file 'VSS_LOG_STATE', ## Parser state machine state 'VSS_LOG_REV', ## The revision being parsed (a hash) 'VSS_NEEDS_BASE_REV', ## What base revisions are needed. Base revs are ## needed for incremental (ie non-bootstrap) updates, ## which is decided on a per-file basis by looking ## at VCP::Source::is_bootstrap_mode( $file ) and ## the file's rev number (ie does it end in .1). 'VSS_HIGHEST_VERSION', ## A HASH keyed on filename that contains the ## last rev_id seen for a file. This allows ## file deletions (which aren't tracked by ## VSS in a file's history) to be given a ## pretend revision number. 'VSS_REV_ID_OFFSET', ## After a busy day processing a deleted file, ## it's time to relax and process the not-deleted ## file of the same name. In order to keep ## from reusing the same version numbers for ## the not-deleted file, this variable contains ## an offset to add to the revisions. It's the ## value of VSS_HIGHEST_VERSION reached while ## reading the deleted file. 'VSS_FILES', ## Managed by VSS::Utils::vss ) ; sub new { my $class = shift ; $class = ref $class || $class ; my VCP::Source::vss $self = $class->SUPER::new( @_ ) ; ## Parse the options my ( $spec, $options ) = @_ ; ## Make it look like a Unix path. $spec =~ s{^\$//}{}; $spec =~ s{\$}{}g; $spec =~ s{\\}{/}g; $self->parse_repo_spec( $spec ) ; my $work_dir ; my $rev_root ; my $ver_spec ; GetOptions( "b|bootstrap:s" => sub { my ( $name, $val ) = @_ ; $self->{VSS_BOOTSTRAP} = $val eq "" ? [ compile_shellish( "..." ) ] : [ map compile_shellish( $_ ), split /,+/, $val ] ; }, "cd=s" => \$work_dir, "rev-root=s" => \$rev_root, "V=s" => \$ver_spec, "Vd=s" => sub { $ver_spec = "d" . $_[1] }, "VL=s" => sub { $ver_spec = "L" . $_[1] }, "k=s" => sub { warn $self->{VSS_K_OPTION} = $_[1] } , "kb" => sub { warn $self->{VSS_K_OPTION} = "b" } , ) or $self->usage_and_exit ; my $files = $self->repo_filespec ; unless ( defined $rev_root ) { $self->deduce_rev_root( $files ) ; } # else { # $files = "$rev_root/$files" ; # } # ### TODO: Figure out whether we should make rev_root merely set the rev_root ### in the header. I think we probably should do it that way, as it's more ### flexible and less confusing. ## Don't normalize the filespec. $self->repo_filespec( $files ) ; unless ( defined $work_dir ) { $self->create_vss_workspace ; } else { $self->work_root( File::Spec->rel2abs( $work_dir ) ) ; $self->command_chdir( $self->work_path ) ; } ## May need to run again with -D to list deleted files ## This generates the list of all files we want to scan $self->get_vss_file_list( $self->repo_filespec, defined $ver_spec ? "-V$ver_spec" : (), ); { my ( $out, $err ); ## Dirty trick: send a known bad parm *just* to get ss.exe to ## print it's banner without popping open a help screen. $self->ss( [ "help", "/illegal arg" ], ">", \$out, "2>", \$err ); $self->{VSS_INFO} = $out; } return $self ; } sub is_incremental { my VCP::Source::vss $self= shift ; my ( $file, $first_rev ) = @_ ; my $bootstrap_mode = $first_rev eq "1" || ( $self->{VSS_BOOTSTRAP} && grep $file =~ $_, @{$self->{VSS_BOOTSTRAP}} ) ; return $bootstrap_mode ? 0 : "incremental" ; } sub denormalize_name { my VCP::Source::vss $self = shift ; return '/' . $self->SUPER::denormalize_name( @_ ) ; } sub handle_header { my VCP::Source::vss $self = shift ; my ( $header ) = @_ ; $header->{rep_type} = 'vss' ; $header->{rep_desc} = $self->{VSS_INFO} ; $header->{rev_root} = $self->rev_root ; $self->dest->handle_header( $header ) ; return ; } sub get_rev { my VCP::Source::vss $self = shift ; my VCP::Rev $r ; ( $r ) = @_ ; my $wp = $self->work_path( "revs", $r->name, $r->rev_id ) ; $r->work_path( $wp ) ; $self->mkpdir( $wp ) ; my ( $fn, $dir ) = fileparse( $wp ); my $ignored_stdout; confess "Shouldn't be get_rev()ing a rev with no rev_id" unless defined $r->rev_id; if ( $self->vss_file_is_deleted( $r->source_name ) ) { my $rev_id = $r->rev_id; $rev_id -= $self->{VSS_REV_ID_OFFSET}->{$r->source_name} if $rev_id > $self->{VSS_REV_ID_OFFSET}->{$r->source_name}; $self->_swap_in_deleted_file_and( $r->source_name, "ss", [ "Get", "\$/" . $r->source_name, "-V" . $rev_id, "-GL" . $dir, "-GN", ## Newlines only, please ], ">", \$ignored_stdout ) ; } else { $self->ss( [ "Get", "\$/" . $r->source_name, "-V" . $r->rev_id, "-GL" . $dir, "-GN", ## Newlines only, please ], ">", \$ignored_stdout ); } my $temp_fn = fileparse( $r->source_name ); rename "$dir/$temp_fn", "$dir/$fn" or die "$! renaming $temp_fn to $fn\n"; } ## History report Parser states use constant SKIP_TO_NEXT => "skip to next"; use constant ENTRY_START => "entry start"; use constant READ_ACTION => "read action"; use constant READ_COMMENT_AND_COMMIT => "read comment and commit"; use constant READ_REST_OF_COMMENT_AND_COMMIT => "read rest of comment and commit"; sub _get_file_metadata { my VCP::Source::vss $self = shift ; my ( $filename ) = @_; my $ss_fn = "\$/$filename"; $self->{VSS_LOG_STATE} = SKIP_TO_NEXT; $self->{VSS_LOG_CARRYOVER} = '' ; $self->{VSS_LOG_REV} = {} ; my $filetype; $self->ss( [ "FileType", $ss_fn ], ">", \$filetype ); $filetype =~ s/\A.*\s(\S+)\r?\n.*/$1/ms or die "Can't parse filetype from '$filetype'"; $filetype = lc $filetype; $self->ss( [ "History", "\$/$filename", ], '>', sub { $self->parse_log_file( $filename, $filetype, @_ ) }, ) ; $self->add_rev_from_log_parser if 0 <= index $self->{VSS_LOG_STATE}, "commit"; } sub _swap_in_deleted_file_and { my VCP::Source::vss $self = shift ; my ( $filename, $method, @args ) = @_; my $ss_fn = "\$/$filename"; my $ignored_stdout; my $renamed_active; if ( $self->vss_file_is_active( $filename ) ) { my $i = ""; while (1) { $renamed_active = "$ss_fn.vcp_bak$i"; last unless $self->vss_file( $renamed_active ); $i ||= 0; ++$i; } $self->ss( [ "Rename", $ss_fn, $renamed_active ] ); } my $ok = eval { ##TODO: not ignore this output! $self->ss( [ "Recover", $ss_fn ], ">", \$ignored_stdout ) ; my $ok = eval { $self->$method( @args ); 1 }; my $x = $@; $self->{VSS_REV_ID_OFFSET}->{$filename} = $self->{VSS_HIGHEST_VERSION}->{$filename} || 0; $ok = eval { ##TODO: not ignore this output! $self->ss( [ "Delete", $ss_fn ], ">", \$ignored_stdout ) ; 1; } && $ok; $x = "" unless defined $x; die $x.$@ unless $ok; }; my $x = $@; if ( defined $renamed_active ) { my $myok = eval { $self->ss( [ "Rename", $renamed_active, $ss_fn ] ); 1; }; if ( ! $myok ) { $x .= $@; $ok = 0; }; } die $x unless $ok; } sub copy_revs { my VCP::Source::vss $self = shift ; ## Get a list of all files we need to worry about $self->get_vss_file_list( $self->repo_filespec ); $self->revs( VCP::Revs->new ) ; for my $filename ( $self->vss_files ) { $self->{VSS_REV_ID_OFFSET}->{$filename} = 0; if ( $self->vss_file_is_deleted( $filename ) ) { $self->_swap_in_deleted_file_and( $filename, "_get_file_metadata", $filename ); my VCP::Rev $r = VCP::Rev->new( source_name => $filename, name => $self->normalize_name( $filename ), action => "delete", ## Make up a fictional rev number that will allow the ## receiver's sort algorithm to put this delete in the ## right place and that will be documented in the ## receiving repository as a label. rev_id => "$self->{VSS_REV_ID_OFFSET}->{$filename}.1", ## Deletes are not logged, no user data, time, etc. ) ; $self->revs->add( $r ); } $self->_get_file_metadata( $filename ) if $self->vss_file_is_active( $filename ); if ( keys %{$self->{VSS_LOG_REV}} ) { require Data::Dumper; die "Data left over in VSS_LOG_REV, state $self->{VSS_LOG_STATE}:\n", Data::Dumper::Dumper( $self->{VSS_LOG_REV} ); } } my $revs = $self->revs ; # my %oldest_revs ; $revs = $self->revs ; ## Add in base revs # for my $fn ( keys %oldest_revs ) { # my $r = $oldest_revs{$fn} ; # my $rev_id = $r->rev_id ; # if ( $self->is_incremental( $fn, $rev_id ) ) { # $rev_id =~ s{(\d+)$}{$1-1}e ; # $revs->add( # VCP::Rev->new( # source_name => $r->source_name, # name => $r->name, # rev_id => $rev_id, # type => $r->type, # ) # ) # } # } $self->dest->sort_revs( $self->revs ) ; my VCP::Rev $r ; while ( $r = $self->revs->shift ) { $self->get_rev( $r ) if $r->action ne "delete"; $self->dest->handle_rev( $r ) ; } } # Here's a typical history # ############################################################################### ##D:\src\vcp>ss history #History of $/90vss.t ... # #***************** Version 9 ***************** #User: Admin Date: 3/05/02 Time: 9:32 #readd recovered # #***** a_big_file ***** #Version 3 #User: Admin Date: 3/05/02 Time: 9:32 #Checked in $/90vss.t #Comment: comment 3 # # #***** binary ***** #Version 3 #User: Admin Date: 3/05/02 Time: 9:32 #Checked in $/90vss.t #Comment: comment 3 # # #***************** Version 8 ***************** #User: Admin Date: 3/05/02 Time: 9:32 #readd deleted # #***** binary ***** #Version 2 #User: Admin Date: 3/05/02 Time: 9:32 #Checked in $/90vss.t #Comment: comment 2 # # #***************** Version 7 ***************** #User: Admin Date: 3/05/02 Time: 9:32 #readd added # #***** a_big_file ***** #Version 2 #User: Admin Date: 3/05/02 Time: 9:32 #Checked in $/90vss.t #Comment: comment 2 # # #***************** Version 6 ***************** #User: Admin Date: 3/05/02 Time: 9:32 #$del added # #***************** Version 5 ***************** #User: Admin Date: 3/05/02 Time: 9:32 #binary added # #***************** Version 4 ***************** #User: Admin Date: 3/05/02 Time: 9:31 #$add added # #***************** Version 3 ***************** #User: Admin Date: 3/05/02 Time: 9:31 #a_big_file added # #***************** Version 2 ***************** #User: Admin Date: 3/05/02 Time: 9:31 #$a added # #***************** Version 1 ***************** #User: Admin Date: 3/05/02 Time: 9:31 #Created # # #D:\src\vcp>ss dir /r #$/90vss.t: #$a #$add #$del #a_big_file #binary #readd # #$/90vss.t/a: #$deeply # #$/90vss.t/a/deeply: #$buried # #$/90vss.t/a/deeply/buried: #file # #$/90vss.t/add: #f1 #f2 #f3 # #$/90vss.t/del: #f4 # #13 item(s) # #D:\src\vcp> # ############################################################################### sub parse_log_file { my ( $self, $filename, $filetype, $input ) = @_ ; if ( defined $input ) { $self->{VSS_LOG_CARRYOVER} .= $input ; } else { ## Last call... ## There can only be leftovers if they don't end in a "\n". I've never ## seen that happen, but given large comments, I could be surprised... $self->{VSS_LOG_CARRYOVER} .= "\n" if length $self->{VSS_LOG_CARRYOVER} ; } my $p = $self->{VSS_LOG_REV}; local $_ ; ## DOS, Unix, Mac lineends spoken here. while ( $self->{VSS_LOG_CARRYOVER} =~ s/^(.*(?:\r\n|\n\r|\n))// ) { $_ = $1 ; { my $foo = $1; chomp $foo; warn "$foo< $self->{VSS_LOG_STATE}\n"; } ## This is crude, but effective: it sets the values every time $p->{Name} = $filename; $p->{Type} = $filetype; if ( /^\*{17} Version (\d+) +\*{17}/ ) { $self->add_rev_from_log_parser if 0 <= index $self->{VSS_LOG_STATE}, "commit"; $self->{VSS_LOG_STATE} = ENTRY_START; ## This will overwrite the newer/higher version number ## with the lower/older one until we reach the check-in ## we want $p->{Version} = $1; next; } if ( /^\*{5}\s+(.*?)\s+\*{5}$/ ) { $self->add_rev_from_log_parser if 0 <= index $self->{VSS_LOG_STATE}, "commit"; $self->{VSS_LOG_STATE} = ENTRY_START; $p->{_banner_name} = $1; next; } next if $self->{VSS_LOG_STATE} eq SKIP_TO_NEXT; if ( $self->{VSS_LOG_STATE} eq ENTRY_START ) { if ( /^Label:\s*"([^"]+)"/ ) { ## Unshift because we're reading from newest to oldest yet ## we want oldest first so vss->vss is relatively consistent unshift @{$p->{Labels}}, $1; next; } if ( /^User:\s+(.*?)\s+Date:\s+(.*?)\s+Time:\s+(\S+)/ ) { $p->{User} = $1; $p->{Date} = $2; $p->{Time} = $3; $self->{VSS_LOG_STATE} = READ_ACTION; next; } } if ( $self->{VSS_LOG_STATE} eq READ_ACTION ) { if ( /Labeled/ ) { ## It's a label-add, ignore for now $self->{VSS_LOG_STATE} = SKIP_TO_NEXT; next; } if ( /^(Checked in .*|Created|.* recovered)$/ ) { $self->{VSS_LOG_STATE} = READ_COMMENT_AND_COMMIT; $p->{Action} = "edit"; next; } } if ( $self->{VSS_LOG_STATE} eq READ_COMMENT_AND_COMMIT ) { if ( s/Comment: // ) { $p->{Comment} = $_; $self->{VSS_LOG_STATE} = READ_REST_OF_COMMENT_AND_COMMIT; next; } } if ( $self->{VSS_LOG_STATE} eq READ_REST_OF_COMMENT_AND_COMMIT ) { $p->{Comment} .= $_; next; } require Data::Dumper; local $Data::Dumper::Indent = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Terse = 1; die "unhandled VSS log line '$_' in state $self->{VSS_LOG_STATE} for:\n", Data::Dumper::Dumper( $self->{VSS_LOG_REV} ); } $self->add_rev_from_log_parser if ! defined $input && 0 <= index $self->{VSS_LOG_STATE}, "commit"; } # Here's a (probably out-of-date by the time you read this) dump of the args # for _add_rev: # ############################################################################### #$file = { # 'WORKING' => 'src/Eesh/eg/synopsis', # 'SELECTED' => '2', # 'LOCKS' => 'strict', # 'TOTAL' => '2', # 'ACCESS' => '', # 'RCS' => '/var/vss/vssroot/src/Eesh/eg/synopsis,v', # 'KEYWORD' => 'kv', # 'RTAGS' => { # '1.1' => [ # 'Eesh_003_000', # 'Eesh_002_000' # ] # }, # 'HEAD' => '1.2', # 'TAGS' => { # 'Eesh_002_000' => '1.1', # 'Eesh_003_000' => '1.1' # }, # 'BRANCH' => '' #}; #$rev = { # 'DATE' => '2000/04/21 17:32:16', # 'MESSAGE' => 'Moved a bunch of code from eesh, then deleted most of it. #', # 'STATE' => 'Exp', # 'AUTHOR' => 'barries', # 'REV' => '1.1' #}; ############################################################################### sub _add_rev { my VCP::Source::vss $self = shift ; my ( $rev_data, $is_base_rev ) = @_ ; use Data::Dumper; warn "ADDING: ", Dumper( $rev_data ); my $action = $rev_data->{Action}; $rev_data->{Type} ||= "text"; #debug map "$_ => $rev_data->{$_}, ", sort keys %{$rev_data} ; my $filename = $rev_data->{Name}; my VCP::Rev $r = VCP::Rev->new( source_name => $filename, name => $self->normalize_name( $rev_data->{Name} ), rev_id => $rev_data->{Version} + $self->{VSS_REV_ID_OFFSET}->{$filename}, type => $rev_data->{Type}, # ! $is_base_rev # ? ( action => $action, time => $self->parse_time( $rev_data->{Date} . " " . $rev_data->{Time} ), user_id => $rev_data->{User}, comment => $rev_data->{Comment}, state => $rev_data->{STATE}, labels => $rev_data->{Labels}, # ) # : (), ) ; $self->{VSS_NAME_REP_NAME}->{$rev_data->{Name}} = $rev_data->{RCS} ; eval { $self->revs->add( $r ) ; } ; if ( $@ ) { if ( $@ =~ /Can't add same revision twice/ ) { warn $@ ; } else { die $@ ; } } } sub add_rev_from_log_parser { my ( $self ) = @_; my $rev_data = $self->{VSS_LOG_REV}; $rev_data->{Comment} = '' unless defined $rev_data->{Comment}; $rev_data->{Comment} =~ s/\r\n|\n\r/\n/g ; chomp $rev_data->{Comment}; chomp $rev_data->{Comment}; $self->_add_rev( $rev_data ); $self->{VSS_HIGHEST_VERSION}->{$rev_data->{Name}} = $rev_data->{Version} if ! defined $self->{VSS_HIGHEST_VERSION}->{$rev_data->{Name}} || $rev_data->{Version} > $self->{VSS_HIGHEST_VERSION}->{$rev_data->{Name}}; %$rev_data = () ; } ; =head1 VSS NOTES We lose comments attached to labels, for now, in favor of not bumping the rev_id for each label. We assume a file has always been text or binary, don't think this is stored per-version in VSS. Looks for deleted files: recovers them if found just long enough to cope with them, then deletes them again. VSS does not track renames by version, so a previous name for a file is lost. VSS lets you add a new file after deleting an old one. This module renames the current file, restores the old one, issues its revisions, then deletes the old on and renames the current file back. In this case, the C<rev_id>s from the current file start at the highest C<rev_id> for the deleted file and continue up. NOTE: when recovering a deleted file and using it, the current version takes a "least opportunity to screw up the source repository" approach: it renames the not-deleted version (if any), restores the deleted one, does the History or Get, and then deletes it and renames the not-deleted version back. This is so that if something (the OS, the hardware, AC mains, or even VCP code) crashes, the source repository is left as close to the original state as is possible. This does mean that this module can issue many more commands than minimally necessary; perhaps there should be a --speed-over-safety option. =head1 SEE ALSO L<VCP::Dest::vss>, L<vcp>, L<VCP::Process>. =head1 AUTHOR Barrie Slaymaker <barries@slaysys.com> =head1 COPYRIGHT Copyright (c) 2000, 2001, 2002 Perforce Software, Inc. All rights reserved. See L<VCP::License|VCP::License> (C<vcp help license>) for the terms of use. =cut 1
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#58 | 4509 | Barrie Slaymaker |
- VCP::Source::vss sends "digest" revisions - 95vss2p4.t handles RevML <action> tag |
||
#57 | 4507 | Barrie Slaymaker |
- RevML: - added <action>, removed <delete>, <placeholder> and <move> - added <from_id> for clones (and eventually merge actions) - Simplified DTD (can't branch DTD based on which action any more) - VCP::Source::cvs, VCP::Filter::changesets and VCP::Dest::p4 support from_id in <action>clone</action> records - VCP::Dest::perl_data added - VCP::Rev::action() "branch" added, no more undefined action strings - "placeholder" action removed |
||
#56 | 4487 | Barrie Slaymaker | - dead code removal (thanks to clkao's coverage report) | ||
#55 | 4066 | Barrie Slaymaker | - unknown_VSS_user no longer set, it's up to the destination now | ||
#54 | 4039 | Barrie Slaymaker |
- VCP::Source::scan_metadata() API now in place, - VCP::Source::copy_revs() is fully deprecated. |
||
#53 | 4032 | Barrie Slaymaker | - VCP::Dest::p4 now estimates missing metadata | ||
#52 | 4021 | Barrie Slaymaker |
- Remove all phashes and all base & fields pragmas - Work around SWASHGET error |
||
#51 | 4012 | Barrie Slaymaker | - Remove dependance on pseudohashes (deprecated Perl feature) | ||
#50 | 3991 | Barrie Slaymaker | - VCP::Source::vss uses less RAM on repos with large file counts | ||
#49 | 3970 | Barrie Slaymaker |
- VCP::Source handles rev queing, uses disk to reduce RAM - Lots of other fixes |
||
#48 | 3946 | Barrie Slaymaker |
- VCP::Source::vss now parses history records that do not cause files to have new revisions, such as project labels. |
||
#47 | 3930 | Barrie Slaymaker |
- VCP::Source::cvs and VCP::Dest::p4 handle cloning deletes - "placeholder" actions and is_placeholder_rev() deprecated in favor of is_branch_rev() and is_clone_rev(). - Misc cleanups and minor bugfixes |
||
#46 | 3921 | Barrie Slaymaker |
- VCP::Source::vss uses "0." and "1." prefixes on all rev_ids to properly handle VSS's idea of deleted files. - VCP::Dest::vss now offers --dont-recover-deleted-files to allow VSS-like sources to be trasnferred more completely |
||
#45 | 3896 | Barrie Slaymaker |
- VCP::Source::vss is no longer led astray by VSS' ad hoc (foo is deleted in thes project) annotations in the Paths report |
||
#44 | 3892 | Barrie Slaymaker |
- VCP::Source::vss sets a user name of "unknown_VSS_user" for deletions. |
||
#43 | 3855 | Barrie Slaymaker |
- vcp scan, filter, transfer basically functional - Need more work in re: storage format, etc, but functional |
||
#42 | 3850 | Barrie Slaymaker | - No longer stores all revs in memory | ||
#41 | 3836 | Barrie Slaymaker | - Sources no longer cache all revs in RAM before sending | ||
#40 | 3819 | Barrie Slaymaker | - Factor send & queueing of revs up in to VCP::Source | ||
#39 | 3818 | Barrie Slaymaker | - VCP::Source::{cvs,p4,vsS} use less memory | ||
#38 | 3813 | Barrie Slaymaker | - VCP::Rev::previous() is no more | ||
#37 | 3811 | Barrie Slaymaker | - fetch_*() and get_rev() renamed get_source_file() | ||
#36 | 3742 | Barrie Slaymaker |
- VCP::Source::vss correctly links the first rev of a file to the the delete action its deleted predecessor. |
||
#35 | 3740 | Barrie Slaymaker | - VCP::Source::vss now ignores leading "$" in rev_root | ||
#34 | 3739 | Barrie Slaymaker | - VCP undo of Rename/Restore now occurs even when a BUG surfaces | ||
#33 | 3705 | Barrie Slaymaker |
- VCP::Source::vss can parse all of real_vss_1 - VCP::Source::vss --undocheckout option added |
||
#32 | 3691 | Barrie Slaymaker | - t/91vss2revml.t now passes | ||
#31 | 3682 | Barrie Slaymaker |
- VCP::Source::vss now survives more VCC oddness I don't understand - Directory names with trailing slashes no longer give SS.EXE the fits |
||
#30 | 3681 | Barrie Slaymaker | - VCP now scans much more of real_vss_1 and converts it to revml | ||
#29 | 3679 | Barrie Slaymaker | - VCP::Source::vss respects --case-sensitive in more places | ||
#28 | 3677 | Barrie Slaymaker |
- rev_root sanity check is now case insensitive on Win32 - Parens in source filespecs are now treated as regular characters, not capture groups - ** is not treated as '...' |
||
#27 | 3667 | Barrie Slaymaker |
- VCP-Source-vss.stml now has atomic questions instead of asking for a command-line-like vss: spec |
||
#26 | 3660 | Barrie Slaymaker | - VCP::Source::vss fixups | ||
#25 | 3654 | Barrie Slaymaker |
- VCP-Source-vss UI prompt is more clear - VCP::Source::vss' --cd option removed until a need is found |
||
#24 | 3532 | John Fetkovich |
changed File::Spec->rel2abs( blah, start_dir ) to start_dir_rel2abs blah everywhere. which does the same thing and is defined in VCP::Utils |
||
#23 | 3510 | Barrie Slaymaker | - VSS --continue and branching support | ||
#22 | 3496 | Barrie Slaymaker | - VSS branching | ||
#21 | 3489 | Barrie Slaymaker | - Document options emitted to .vcp files. | ||
#20 | 3477 | Barrie Slaymaker | - Make --rev-root only available in VCP::Source::p4 | ||
#19 | 3462 | Barrie Slaymaker | - Make sure bootstrap regexps get compiled | ||
#18 | 3460 | Barrie Slaymaker |
- Revamp Plugin/Source/Dest hierarchy to allow for reguritating options in to .vcp files |
||
#17 | 3453 | Barrie Slaymaker |
- VCP::Source::vss now reads deleted files, etc. - gentrevml generates more VSS-like RevML - add t/91vss2revml.t (not complete) |
||
#16 | 3433 | Barrie Slaymaker | - Merge in new VSS code. | ||
#15 | 3286 | John Fetkovich |
In 'sub new' constructors of vss source and dest with a new sub, parse_vss_repo_spec in Utils/vss.pm. This also will set the repo_id. Only call parse_vss_repo_spec if the $spec is non-empty. |
||
#14 | 3275 | John Fetkovich | split part of 'sub new' into 'sub init' | ||
#13 | 3206 | John Fetkovich | documentation changes | ||
#12 | 3199 | John Fetkovich | Improved documentation of --bootstrap switch. | ||
#11 | 3155 | Barrie Slaymaker |
Convert to logging using VCP::Logger to reduce stdout/err spew. Simplify & speed up debugging quite a bit. Provide more verbose information in logs. Print to STDERR progress reports to keep users from wondering what's going on. Breaks test; halfway through upgrading run3() to an inline function for speed and for VCP specific features. |
||
#10 | 3133 | Barrie Slaymaker |
Make destinations call back to sources to check out files to simplify the architecture (is_metadata_only() no longer needed) and make it more optimizable (checkouts can be batched). |
||
#9 | 3120 | Barrie Slaymaker | Move changeset aggregation in to its own filter. | ||
#8 | 2837 | John Fetkovich |
Use parse_options rather than using Getopt::Long directly. |
||
#7 | 2802 | John Fetkovich |
Added a source_repo_id to each revision, and repo_id to each Source and Dest. The repo_ids include repository type (cvs,p4,revml,vss,...) and the repo_server fields. Changed the $self->...->set() and $self->...->get() lines in VCP::Dest::* to pass in a conglomerated key value, by passing in the key as an ARRAY ref. Also various restructuring in VCP::DB.pm, VCP::DB_file.pm and VCP::DB_file::sdbm.pm related to this change. |
||
#6 | 2743 | John Fetkovich |
Add fields to vcp: source_name, source_filebranch_id, source_branch_id, source_rev_id, source_change_id 1. Alter revml.dtd to include the fields 2. Alter bin/gentrevml to emit legal RevML 3. Extend VCP::Rev to have the fields 4. Extend VCP::{Source,Dest}::revml to read/write the fields (VCP::Dest::revml should die() if VCP tries to emit illegal RevML) 5. Extend VCP::{Source,Dest}::{cvs,p4} to read the fields 7. Get all tests through t/91*.t to pass except those that rely on ch_4 labels |
||
#5 | 2389 | John Fetkovich |
removed calls to methods: command_stderr_filter command_ok_result_codes command_chdir and replaced with named Plugin::run_safely method parameters stderr_filter ok_result_codes in_dir respectively, where possible. |
||
#4 | 2322 | Barrie Slaymaker | Fix jack-in-the-bug options parsing exposed by .vcp files | ||
#3 | 1855 | Barrie Slaymaker |
Major VSS checkin. Works on Win32 |
||
#2 | 1822 | Barrie Slaymaker |
Get all other tests passing but VSS. Add agvcommenttime sort field. |
||
#1 | 1810 | Barrie Slaymaker | Preliminary VSS checkin |