diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index c5bf2d19cda6104f4fa9ade7c1407bb6ab8b5d1e..26867751d76f0a86bf406274bd916191d3a5bdbd 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
push (@mergerx, qr/$opt_M/);
}
+# Remember UTC of our starting time
+# we'll want to avoid importing commits
+# that are too recent
+our $starttime = time();
+
select(STDERR); $|=1; select(STDOUT);
$state = 11;
next;
}
+ if ( $starttime - 300 - (defined $opt_z ? $opt_z : 300) <= $date) {
+ # skip if the commit is too recent
+ # that the cvsps default fuzz is 300s, we give ourselves another
+ # 300s just in case -- this also prevents skipping commits
+ # due to server clock drift
+ print "skip patchset $patchset: $date too recent\n" if $opt_v;
+ $state = 11;
+ next;
+ }
if (exists $ignorebranch{$branch}) {
print STDERR "Skipping $branch\n";
$state = 11;