print STDERR "Huh? Status reported for unexpected file '$1'\n";
} else {
$cvsstat{$fullname{$1}} = $2;
}
}
chomp $l;
next unless
my ($file, $status) = $l =~ /^File:\s+(.*\S)\s+Status: (.*)$/;
my $fullname = $fullname{$file};
print STDERR "Huh? Status '$status' reported for unexpected file '$file'\n"
unless defined $fullname;
# This response means the file does not exist except in
# CVS's attic, so set the status accordingly
$status = "In-attic"
if $file =~ /^no file /
&& $status eq 'Up-to-date';
$cvsstat{$fullname{$file}} = $status;
}
}
}
# ... validate new files,
# ... Validate that new files have the correct status
foreach my $f (@afiles) {
if (defined ($cvsstat{$f}) and $cvsstat{$f} ne "Unknown") {
$dirty = 1;
next unless defined(my $stat = $cvsstat{$f});
# This means the file has never been seen before
next if $stat eq 'Unknown';
# This means the file has been seen before but was removed
next if $stat eq 'In-attic';
$dirty = 1;
warn "File $f is already known in your CVS checkout -- perhaps it has been added by another user. Or this may indicate that it exists on a different branch. If this is the case, use -f to force the merge.\n";
@ -317,4 +317,22 @@ test_expect_success 'use the same checkout for Git and CVS' '
@@ -317,4 +317,22 @@ test_expect_success 'use the same checkout for Git and CVS' '
'
test_expect_success 're-commit a removed filename which remains in CVS attic' '