summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1fe2fe)
raw | patch | inline | side by side (parent: c1fe2fe)
author | Yann Dirson <ydirson@altern.org> | |
Fri, 6 Jan 2006 20:54:41 +0000 (21:54 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 6 Jan 2006 22:27:47 +0000 (14:27 -0800) |
"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>
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>
git-cvsexportcommit.perl | patch | blob | history |
index 5a8c011802c46356c9c842282baca8f6fb54f01b..d5fbee7ba03b5c7064074539e8fd2c6518363b85 100755 (executable)
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
# 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$/) {