@matheusbsbs / matheus-bagliano / commits / 85886162f1
Fork 0

git-svn: hide find_parent_branch output in double quiet mode

Hide find_parent_branch logging when -qq is specified. This eliminates more unnecessary output when run from cron, e.g.: Found possible branch point: http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk => http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz, 1919 Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557 Following parent with do_switch Successfully followed parent Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Simon Arlott committed Oct 9, 2009 at 13:21 UTC 85886162f1149bb1db48e6a4c8e1c4a4a726173f
1 file changed +12 -7
git-svn.perl
+12 -7
@@ -2633,7 +2633,8 @@ sub find_parent_branch {
2633 my $url = $self->ra->{url};
2634 my $new_url = $url . $branch_from;
2635 print STDERR "Found possible branch point: ",
2636 - "$new_url => ", $self->full_url, ", $r\n";
2636 + "$new_url => ", $self->full_url, ", $r\n"
2637 + unless $::_q > 1;
2638 $branch_from =~ s#^/##;
2639 my $gs = $self->other_gs($new_url, $url,
2640 $branch_from, $r, $self->{ref_id});
@@ -2654,11 +2655,13 @@ sub find_parent_branch {
2655 ($r0, $parent) = $gs->find_rev_before($r, 1);
2656 }
2657 if (defined $r0 && defined $parent) {
2657 - print STDERR "Found branch parent: ($self->{ref_id}) $parent\n";
2658 + print STDERR "Found branch parent: ($self->{ref_id}) $parent\n"
2659 + unless $::_q > 1;
2660 my $ed;
2661 if ($self->ra->can_do_switch) {
2662 $self->assert_index_clean($parent);
2661 - print STDERR "Following parent with do_switch\n";
2663 + print STDERR "Following parent with do_switch\n"
2664 + unless $::_q > 1;
2665 # do_switch works with svn/trunk >= r22312, but that
2666 # is not included with SVN 1.4.3 (the latest version
2667 # at the moment), so we can't rely on it
@@ -2673,18 +2676,20 @@ sub find_parent_branch {
2676 print STDERR "Trees match:\n",
2677 " $new_url\@$r0\n",
2678 " ${\$self->full_url}\@$rev\n",
2676 - "Following parent with no changes\n";
2679 + "Following parent with no changes\n"
2680 + unless $::_q > 1;
2681 $self->tmp_index_do(sub {
2682 command_noisy('read-tree', $parent);
2683 });
2684 $self->{last_commit} = $parent;
2685 } else {
2682 - print STDERR "Following parent with do_update\n";
2686 + print STDERR "Following parent with do_update\n"
2687 + unless $::_q > 1;
2688 $ed = SVN::Git::Fetcher->new($self);
2689 $self->ra->gs_do_update($rev, $rev, $self, $ed)
2690 or die "SVN connection failed somewhere...\n";
2691 }
2687 - print STDERR "Successfully followed parent\n";
2692 + print STDERR "Successfully followed parent\n" unless $::_q > 1;
2693 return $self->make_log_entry($rev, [$parent], $ed);
2694 }
2695 return undef;
@@ -2829,7 +2834,7 @@ sub other_gs {
2834 $ref_id .= "\@$r";
2835 # just grow a tail if we're not unique enough :x
2836 $ref_id .= '-' while find_ref($ref_id);
2832 - print STDERR "Initializing parent: $ref_id\n";
2837 + print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1;
2838 my ($u, $p, $repo_id) = ($new_url, '', $ref_id);
2839 if ($u =~ s#^\Q$url\E(/|$)##) {
2840 $p = $u;