cvsimport: skip commits that are too recent (option and documentation)
This makes the earlier "wait for 10 minutes before importing" safety overridable with "-a(ll)" flag, and adds necessary documentation. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
9a5e4075a4
commit
ded9f40059
@ -90,7 +90,8 @@ If you need to pass multiple options, separate them with a comma.
|
|||||||
Print a short usage message and exit.
|
Print a short usage message and exit.
|
||||||
|
|
||||||
-z <fuzz>::
|
-z <fuzz>::
|
||||||
Pass the timestamp fuzz factor to cvsps.
|
Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
|
||||||
|
cvsps defaults to 300s.
|
||||||
|
|
||||||
-s <subst>::
|
-s <subst>::
|
||||||
Substitute the character "/" in branch names with <subst>
|
Substitute the character "/" in branch names with <subst>
|
||||||
@ -99,6 +100,10 @@ If you need to pass multiple options, separate them with a comma.
|
|||||||
CVS by default uses the unix username when writing its
|
CVS by default uses the unix username when writing its
|
||||||
commit logs. Using this option and an author-conv-file
|
commit logs. Using this option and an author-conv-file
|
||||||
in this format
|
in this format
|
||||||
|
|
||||||
|
-a::
|
||||||
|
Import all commits, including recent ones. cvsimport by default
|
||||||
|
skips commits that have a timestamp less than 10 minutes ago.
|
||||||
+
|
+
|
||||||
---------
|
---------
|
||||||
exon=Andreas Ericsson <ae@op5.se>
|
exon=Andreas Ericsson <ae@op5.se>
|
||||||
|
@ -29,7 +29,7 @@ use IPC::Open2;
|
|||||||
$SIG{'PIPE'}="IGNORE";
|
$SIG{'PIPE'}="IGNORE";
|
||||||
$ENV{'TZ'}="UTC";
|
$ENV{'TZ'}="UTC";
|
||||||
|
|
||||||
our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L);
|
our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L, $opt_a);
|
||||||
my (%conv_author_name, %conv_author_email);
|
my (%conv_author_name, %conv_author_email);
|
||||||
|
|
||||||
sub usage() {
|
sub usage() {
|
||||||
@ -37,7 +37,7 @@ sub usage() {
|
|||||||
Usage: ${\basename $0} # fetch/update GIT from CVS
|
Usage: ${\basename $0} # fetch/update GIT from CVS
|
||||||
[-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
|
[-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
|
||||||
[-p opts-for-cvsps] [-C GIT_repository] [-z fuzz] [-i] [-k] [-u]
|
[-p opts-for-cvsps] [-C GIT_repository] [-z fuzz] [-i] [-k] [-u]
|
||||||
[-s subst] [-m] [-M regex] [-S regex] [CVS_module]
|
[-s subst] [-a] [-m] [-M regex] [-S regex] [CVS_module]
|
||||||
END
|
END
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -105,6 +105,8 @@ if ($opt_d) {
|
|||||||
}
|
}
|
||||||
$opt_o ||= "origin";
|
$opt_o ||= "origin";
|
||||||
$opt_s ||= "-";
|
$opt_s ||= "-";
|
||||||
|
$opt_a ||= 0;
|
||||||
|
|
||||||
my $git_tree = $opt_C;
|
my $git_tree = $opt_C;
|
||||||
$git_tree ||= ".";
|
$git_tree ||= ".";
|
||||||
|
|
||||||
@ -829,7 +831,7 @@ while (<CVS>) {
|
|||||||
$state = 11;
|
$state = 11;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ( $starttime - 300 - (defined $opt_z ? $opt_z : 300) <= $date) {
|
if (!$opt_a && $starttime - 300 - (defined $opt_z ? $opt_z : 300) <= $date) {
|
||||||
# skip if the commit is too recent
|
# skip if the commit is too recent
|
||||||
# that the cvsps default fuzz is 300s, we give ourselves another
|
# that the cvsps default fuzz is 300s, we give ourselves another
|
||||||
# 300s just in case -- this also prevents skipping commits
|
# 300s just in case -- this also prevents skipping commits
|
||||||
|
Loading…
Reference in New Issue
Block a user