summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-11-01 21:58:53 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2005-11-01 21:58:53 -0800
commit235d521da60e4699e5bd59ac658b5b48bd76ddca (patch)
tree25620311ca206d41659b5f3e6f60760dca584c2b /git-cvsimport.perl
parentMerge branch 'fixes' (diff)
parentAdd -P to the documentation head. (diff)
downloadtgif-235d521da60e4699e5bd59ac658b5b48bd76ddca.tar.xz
GIT 0.99.9b
This contains the changes made on the master branch since 0.99.9a. The workaround for building RPMs has not changed since 0.99.9a, mainly because I haven't heard back if it was good enough for kernel.org consumption, or otherwise what changes are needed. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl17
1 files changed, 13 insertions, 4 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index bbb83fb71c..7bd9136205 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -29,7 +29,7 @@ use IPC::Open2;
$SIG{'PIPE'}="IGNORE";
$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_s,$opt_m,$opt_M);
+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);
sub usage() {
print STDERR <<END;
@@ -41,7 +41,7 @@ END
exit(1);
}
-getopts("hivmkuo:d:p:C:z:s:M:") or usage();
+getopts("hivmkuo:d:p:C:z:s:M:P:") or usage();
usage if $opt_h;
@ARGV <= 1 or usage();
@@ -337,6 +337,10 @@ sub file {
}
close ($fh);
+ if ($res eq '') {
+ die "Looks like the server has gone away while fetching $fn $rev -- exiting!";
+ }
+
return ($name, $res);
}
@@ -487,11 +491,16 @@ unless($pid) {
my @opt;
@opt = split(/,/,$opt_p) if defined $opt_p;
unshift @opt, '-z', $opt_z if defined $opt_z;
+ unshift @opt, '-q' unless defined $opt_v;
unless (defined($opt_p) && $opt_p =~ m/--no-cvs-direct/) {
push @opt, '--cvs-direct';
}
- exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);
- die "Could not start cvsps: $!\n";
+ if ($opt_P) {
+ exec("cat", $opt_P);
+ } else {
+ exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);
+ die "Could not start cvsps: $!\n";
+ }
}