Skip to content

Commit 8588616

Browse files
nomisgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Simon Arlott <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 33405be commit 8588616

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

git-svn.perl

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,8 @@ sub find_parent_branch {
26332633
my $url = $self->ra->{url};
26342634
my $new_url = $url . $branch_from;
26352635
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;
26372638
$branch_from =~ s#^/##;
26382639
my $gs = $self->other_gs($new_url, $url,
26392640
$branch_from, $r, $self->{ref_id});
@@ -2654,11 +2655,13 @@ sub find_parent_branch {
26542655
($r0, $parent) = $gs->find_rev_before($r, 1);
26552656
}
26562657
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;
26582660
my $ed;
26592661
if ($self->ra->can_do_switch) {
26602662
$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;
26622665
# do_switch works with svn/trunk >= r22312, but that
26632666
# is not included with SVN 1.4.3 (the latest version
26642667
# at the moment), so we can't rely on it
@@ -2673,18 +2676,20 @@ sub find_parent_branch {
26732676
print STDERR "Trees match:\n",
26742677
" $new_url\@$r0\n",
26752678
" ${\$self->full_url}\@$rev\n",
2676-
"Following parent with no changes\n";
2679+
"Following parent with no changes\n"
2680+
unless $::_q > 1;
26772681
$self->tmp_index_do(sub {
26782682
command_noisy('read-tree', $parent);
26792683
});
26802684
$self->{last_commit} = $parent;
26812685
} else {
2682-
print STDERR "Following parent with do_update\n";
2686+
print STDERR "Following parent with do_update\n"
2687+
unless $::_q > 1;
26832688
$ed = SVN::Git::Fetcher->new($self);
26842689
$self->ra->gs_do_update($rev, $rev, $self, $ed)
26852690
or die "SVN connection failed somewhere...\n";
26862691
}
2687-
print STDERR "Successfully followed parent\n";
2692+
print STDERR "Successfully followed parent\n" unless $::_q > 1;
26882693
return $self->make_log_entry($rev, [$parent], $ed);
26892694
}
26902695
return undef;
@@ -2829,7 +2834,7 @@ sub other_gs {
28292834
$ref_id .= "\@$r";
28302835
# just grow a tail if we're not unique enough :x
28312836
$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;
28332838
my ($u, $p, $repo_id) = ($new_url, '', $ref_id);
28342839
if ($u =~ s#^\Q$url\E(/|$)##) {
28352840
$p = $u;

0 commit comments

Comments
 (0)