cvsimport: Added option '-p': pass options to cvsps
Added option '-x' to cvsps call
This commit is contained in:
parent
4c24e089a3
commit
2be4fcc345
@ -26,18 +26,19 @@ use POSIX qw(strftime dup2);
|
|||||||
$SIG{'PIPE'}="IGNORE";
|
$SIG{'PIPE'}="IGNORE";
|
||||||
$ENV{'TZ'}="UTC";
|
$ENV{'TZ'}="UTC";
|
||||||
|
|
||||||
our($opt_h,$opt_o,$opt_v,$opt_d);
|
our($opt_h,$opt_o,$opt_v,$opt_d,$opt_p);
|
||||||
|
|
||||||
sub usage() {
|
sub usage() {
|
||||||
print STDERR <<END;
|
print STDERR <<END;
|
||||||
Usage: ${\basename $0} # fetch/update GIT from CVS
|
Usage: ${\basename $0} # fetch/update GIT from CVS
|
||||||
[ -o branch-for-HEAD ] [ -h ] [ -v ] [ -d CVSROOT ]
|
[ -o branch-for-HEAD ] [ -h ] [ -v ] [ -d CVSROOT ]
|
||||||
|
[ -p opts-for-cvsps ]
|
||||||
CVS_module [ GIT_repository ]
|
CVS_module [ GIT_repository ]
|
||||||
END
|
END
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
getopts("hqvo:d:") or usage();
|
getopts("hqvo:d:p:") or usage();
|
||||||
usage if $opt_h;
|
usage if $opt_h;
|
||||||
|
|
||||||
@ARGV == 1 or @ARGV == 2 or usage();
|
@ARGV == 1 or @ARGV == 2 or usage();
|
||||||
@ -375,7 +376,9 @@ unless(-d $git_dir) {
|
|||||||
my $pid = open(CVS,"-|");
|
my $pid = open(CVS,"-|");
|
||||||
die "Cannot fork: $!\n" unless defined $pid;
|
die "Cannot fork: $!\n" unless defined $pid;
|
||||||
unless($pid) {
|
unless($pid) {
|
||||||
exec("cvsps","-A","--cvs-direct",$cvs_tree);
|
my @opt;
|
||||||
|
@opt = split(/,/,$opt_p) if defined $opt_p;
|
||||||
|
exec("cvsps",@opt,"-x","-A","--cvs-direct",$cvs_tree);
|
||||||
die "Could not start cvsps: $!\n";
|
die "Could not start cvsps: $!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user