Teach cvsexportcommit to add new files

"cvs add" support was already there, but the "unknown" status
returned when querying a file not yet known to cvs caused the
script to abort prematurely.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Yann Dirson 2006-01-06 21:54:41 +01:00 committed by Junio C Hamano
parent c1fe2fe4fe
commit 576cfc86fc

View File

@ -103,8 +103,16 @@ undef @files; # don't need it anymore
# check that the files are clean and up to date according to cvs
my $dirty;
foreach my $f (@afiles, @mfiles, @dfiles) {
# TODO:we need to handle removed in cvs and/or new (from git)
foreach my $f (@afiles) {
my $status = `cvs -q status "$f" | grep '^File: '`;
unless ($status =~ m/Status: Unknown$/) {
$dirty = 1;
warn "File $f is already known in your CVS checkout!\n";
}
}
foreach my $f (@mfiles, @dfiles) {
# TODO:we need to handle removed in cvs
my $status = `cvs -q status "$f" | grep '^File: '`;
unless ($status =~ m/Status: Up-to-date$/) {