From 89764f5d8b0ca8600e3a200e9f863c3c7a3ff5e8 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Mon, 10 Oct 2005 11:15:09 +0200 Subject: cvsimport: report merge parents Matching and reporting merge parents happens in a subprocess. Re-open stdout before redirecting stdout to the pipe, so that printing verbose messages doesn't go to the wrong place. Signed-Off-By: Matthias Urlichs --- git-cvsimport.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git-cvsimport.perl') diff --git a/git-cvsimport.perl b/git-cvsimport.perl index f35c0d045b..cc0eed2946 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -567,6 +567,7 @@ my $commit = sub { unless($pid) { $pr->writer(); $pw->reader(); + open(OUT,">&STDOUT"); dup2($pw->fileno(),0); dup2($pr->fileno(),1); $pr->close(); @@ -584,10 +585,9 @@ my $commit = sub { if ( -e "$git_dir/refs/heads/$mparent") { $mparent = get_headref($mparent, $git_dir); push @par, '-p', $mparent; - # printing here breaks import # - # # print "Merge parent branch: $mparent\n" if $opt_v; + print OUT "Merge parent branch: $mparent\n" if $opt_v; } - } + } } exec("env", -- cgit v1.3-5-g9baa From e175768954816b00bbbba131ec1c411d2cd66582 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 18 Oct 2005 11:35:16 -0700 Subject: Fix cvsimport warning when called without --no-cvs-direct Perl was warning that $opt_p was undefined in that case. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-cvsimport.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-cvsimport.perl') diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 0621dc3e2f..bbb83fb71c 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -487,7 +487,7 @@ unless($pid) { my @opt; @opt = split(/,/,$opt_p) if defined $opt_p; unshift @opt, '-z', $opt_z if defined $opt_z; - unless ($opt_p =~ m/--no-cvs-direct/) { + unless (defined($opt_p) && $opt_p =~ m/--no-cvs-direct/) { push @opt, '--cvs-direct'; } exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree); -- cgit v1.3-5-g9baa