Skip to content

Commit

Permalink
Teach cvsexportcommit to add new files
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Yann Dirson authored and Junio C Hamano committed Jan 6, 2006
1 parent c1fe2fe commit 576cfc8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions git-cvsexportcommit.perl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,16 @@

# 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$/) {
Expand Down

0 comments on commit 576cfc8

Please sign in to comment.