Check-in Number:
|
4548 | |
Date: |
2004-Apr-24 20:25:19 (local)
2004-Apr-24 18:25:19 (UTC) |
User: | rse |
Branch: | |
Comment: |
fix RCS::lookup() function and start filling the missing content of the main program |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/cvsfusion/RCS.pm 1.8 -> 1.9
--- RCS.pm 2004/04/23 21:38:48 1.8
+++ RCS.pm 2004/04/24 18:25:19 1.9
@@ -234,6 +234,7 @@
require Exporter;
use Carp;
use IO::File;
+no warnings;
our @ISA = qw(Exporter RCS::Object);
our @EXPORT_OK = qw(new destroy DESTROY dump load save parse format insert remove lookup set get);
@@ -693,7 +694,9 @@
my ($self, $id) = @_;
if (not defined($id)) {
- return values(%{$self->{-revision}});
+ return map { $self->{-revision}->{$_} }
+ grep { $_ !~ m|^-| }
+ keys %{$self->{-revision}};
}
else {
if ($id =~ m|^\d+(\.\d+)*$|) {
|
|
ossp-pkg/cvsfusion/cvsfusion.pl 1.3 -> 1.4
--- cvsfusion.pl 2004/04/24 18:11:57 1.3
+++ cvsfusion.pl 2004/04/24 18:25:19 1.4
@@ -212,6 +212,9 @@
find(\&find_cb, @{$opt->{'cvs-module'}});
chdir($cwd);
+# determine branch tag and revision
+my ($branch_tag, $branch_rev) = ($opt->{'cvs-branch'} =~ m/^(.+):(.+)$/);
+
# iterate over all RCS files in source CVS repository
foreach my $source (sort @{$cvs->{'source'}}) {
print " $source\n";
@@ -219,8 +222,24 @@
# load source file
my $rcs = new RCS;
$rcs->load($opt->{'cvsroot-source'} . "/". $source);
- my @rev = $rcs->lookup();
- printf(" (%d revisions)\n", scalar(@rev));
+ my @revs = $rcs->lookup();
+ printf(" (%d revisions)\n", scalar(@revs));
+
+ # move all source revisions onto target branch
+ foreach my $rev (@revs) {
+ my $num = $rev->revision();
+ $rev->revision($branch_rev.".".$num);
+ }
+
+ # transform source trunk into regular branch
+ # FIXME
+
+ # merge all source revisions into target
+ # FIXME
+
+ # attach merged revisions onto source revision 1.1
+ # (and create a dead revision 1.1 if none exists)
+ # FIXME
# save target file
my $dirname = dirname($opt->{'cvsroot-target'} . "/". $source);
|
|