* [PATCH] git-svn: hide find_parent_branch output in double quiet mode
@ 2009-10-09 12:21 Simon Arlott
2009-10-10 1:08 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Simon Arlott @ 2009-10-09 12:21 UTC (permalink / raw)
To: gitster; +Cc: git
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
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
---
git-svn.perl | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index e0ec258..fd36270 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2626,7 +2626,8 @@ sub find_parent_branch {
my $url = $self->ra->{url};
my $new_url = $url . $branch_from;
print STDERR "Found possible branch point: ",
- "$new_url => ", $self->full_url, ", $r\n";
+ "$new_url => ", $self->full_url, ", $r\n"
+ unless $::_q > 1;
$branch_from =~ s#^/##;
my $gs = $self->other_gs($new_url, $url,
$branch_from, $r, $self->{ref_id});
@@ -2647,11 +2648,13 @@ sub find_parent_branch {
($r0, $parent) = $gs->find_rev_before($r, 1);
}
if (defined $r0 && defined $parent) {
- print STDERR "Found branch parent: ($self->{ref_id}) $parent\n";
+ print STDERR "Found branch parent: ($self->{ref_id}) $parent\n"
+ unless $::_q > 1;
my $ed;
if ($self->ra->can_do_switch) {
$self->assert_index_clean($parent);
- print STDERR "Following parent with do_switch\n";
+ print STDERR "Following parent with do_switch\n"
+ unless $::_q > 1;
# do_switch works with svn/trunk >= r22312, but that
# is not included with SVN 1.4.3 (the latest version
# at the moment), so we can't rely on it
@@ -2666,18 +2669,20 @@ sub find_parent_branch {
print STDERR "Trees match:\n",
" $new_url\@$r0\n",
" ${\$self->full_url}\@$rev\n",
- "Following parent with no changes\n";
+ "Following parent with no changes\n"
+ unless $::_q > 1;
$self->tmp_index_do(sub {
command_noisy('read-tree', $parent);
});
$self->{last_commit} = $parent;
} else {
- print STDERR "Following parent with do_update\n";
+ print STDERR "Following parent with do_update\n"
+ unless $::_q > 1;
$ed = SVN::Git::Fetcher->new($self);
$self->ra->gs_do_update($rev, $rev, $self, $ed)
or die "SVN connection failed somewhere...\n";
}
- print STDERR "Successfully followed parent\n";
+ print STDERR "Successfully followed parent\n" unless $::_q > 1;
return $self->make_log_entry($rev, [$parent], $ed);
}
return undef;
@@ -2822,7 +2827,7 @@ sub other_gs {
$ref_id .= "\@$r";
# just grow a tail if we're not unique enough :x
$ref_id .= '-' while find_ref($ref_id);
- print STDERR "Initializing parent: $ref_id\n";
+ print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1;
my ($u, $p, $repo_id) = ($new_url, '', $ref_id);
if ($u =~ s#^\Q$url\E(/|$)##) {
$p = $u;
--
1.6.3.3
--
Simon Arlott
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] git-svn: hide find_parent_branch output in double quiet mode
2009-10-09 12:21 [PATCH] git-svn: hide find_parent_branch output in double quiet mode Simon Arlott
@ 2009-10-10 1:08 ` Eric Wong
2009-10-10 7:02 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2009-10-10 1:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Simon Arlott
Simon Arlott <simon@fire.lp0.eu> wrote:
> 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
>
> Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Thanks Simon,
Acked-by: Eric Wong <normalperson@yhbt.net>
and pushed out to git://git.bogomips.org/git-svn
--
Eric Wong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] git-svn: hide find_parent_branch output in double quiet mode
2009-10-10 1:08 ` Eric Wong
@ 2009-10-10 7:02 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2009-10-10 7:02 UTC (permalink / raw)
To: Eric Wong; +Cc: git, Simon Arlott
Eric Wong <normalperson@yhbt.net> writes:
> Thanks Simon,
>
> Acked-by: Eric Wong <normalperson@yhbt.net>
>
> and pushed out to git://git.bogomips.org/git-svn
Thanks; you seem to have rebased the history in this repository, and
merging from you will duplicate Alexander's "Avoid spurious errors", which
I already pulled, so I'll cherry pick this one from your tree.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-10 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 12:21 [PATCH] git-svn: hide find_parent_branch output in double quiet mode Simon Arlott
2009-10-10 1:08 ` Eric Wong
2009-10-10 7:02 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox