{"thread":{"id":"21169","subject":"[PATCH] git-svn: hide find_parent_branch output in double quiet mode","startedAt":"2009-10-09T12:21:13Z","lastAt":"2009-10-10T07:02:32Z","messageCount":3,"participants":["Simon Arlott","Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"124482","messageId":"b01cac406b93d5c67e3ae2e9a7aaa498a52dd9fc@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid","threadId":"21169","inReplyTo":null,"subject":"[PATCH] git-svn: hide find_parent_branch output in double quiet mode","fromName":"Simon Arlott","fromEmail":"simon@fire.lp0.eu","sentAt":"2009-10-09T12:21:13Z","receivedAt":"2009-10-09T12:21:13Z","isPatch":true,"sender":{"key":"simon@fire.lp0.eu","avatar":"https://avatars.githubusercontent.com/u/70171?v=4"},"body":"Hide find_parent_branch logging when -qq is specified.\nThis eliminates more unnecessary output when run from cron, e.g.:\n\nFound possible branch point:\nhttp://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk =>\nhttp://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz,\n1919\nFound branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557\nFollowing parent with do_switch\nSuccessfully followed parent\n\nSigned-off-by: Simon Arlott <simon@fire.lp0.eu>\n---\n git-svn.perl |   19 ++++++++++++-------\n 1 files changed, 12 insertions(+), 7 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex e0ec258..fd36270 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2626,7 +2626,8 @@ sub find_parent_branch {\n \tmy $url = $self->ra->{url};\n \tmy $new_url = $url . $branch_from;\n \tprint STDERR  \"Found possible branch point: \",\n-\t              \"$new_url => \", $self->full_url, \", $r\\n\";\n+\t              \"$new_url => \", $self->full_url, \", $r\\n\"\n+\t              unless $::_q > 1;\n \t$branch_from =~ s#^/##;\n \tmy $gs = $self->other_gs($new_url, $url,\n \t\t                 $branch_from, $r, $self->{ref_id});\n@@ -2647,11 +2648,13 @@ sub find_parent_branch {\n \t\t($r0, $parent) = $gs->find_rev_before($r, 1);\n \t}\n \tif (defined $r0 && defined $parent) {\n-\t\tprint STDERR \"Found branch parent: ($self->{ref_id}) $parent\\n\";\n+\t\tprint STDERR \"Found branch parent: ($self->{ref_id}) $parent\\n\"\n+\t\t             unless $::_q > 1;\n \t\tmy $ed;\n \t\tif ($self->ra->can_do_switch) {\n \t\t\t$self->assert_index_clean($parent);\n-\t\t\tprint STDERR \"Following parent with do_switch\\n\";\n+\t\t\tprint STDERR \"Following parent with do_switch\\n\"\n+\t\t\t             unless $::_q > 1;\n \t\t\t# do_switch works with svn/trunk >= r22312, but that\n \t\t\t# is not included with SVN 1.4.3 (the latest version\n \t\t\t# at the moment), so we can't rely on it\n@@ -2666,18 +2669,20 @@ sub find_parent_branch {\n \t\t\tprint STDERR \"Trees match:\\n\",\n \t\t\t             \"  $new_url\\@$r0\\n\",\n \t\t\t             \"  ${\\$self->full_url}\\@$rev\\n\",\n-\t\t\t\t     \"Following parent with no changes\\n\";\n+\t\t\t             \"Following parent with no changes\\n\"\n+\t\t\t             unless $::_q > 1;\n \t\t\t$self->tmp_index_do(sub {\n \t\t\t    command_noisy('read-tree', $parent);\n \t\t\t});\n \t\t\t$self->{last_commit} = $parent;\n \t\t} else {\n-\t\t\tprint STDERR \"Following parent with do_update\\n\";\n+\t\t\tprint STDERR \"Following parent with do_update\\n\"\n+\t\t\t             unless $::_q > 1;\n \t\t\t$ed = SVN::Git::Fetcher->new($self);\n \t\t\t$self->ra->gs_do_update($rev, $rev, $self, $ed)\n \t\t\t  or die \"SVN connection failed somewhere...\\n\";\n \t\t}\n-\t\tprint STDERR \"Successfully followed parent\\n\";\n+\t\tprint STDERR \"Successfully followed parent\\n\" unless $::_q > 1;\n \t\treturn $self->make_log_entry($rev, [$parent], $ed);\n \t}\n \treturn undef;\n@@ -2822,7 +2827,7 @@ sub other_gs {\n \t\t$ref_id .= \"\\@$r\";\n \t\t# just grow a tail if we're not unique enough :x\n \t\t$ref_id .= '-' while find_ref($ref_id);\n-\t\tprint STDERR \"Initializing parent: $ref_id\\n\";\n+\t\tprint STDERR \"Initializing parent: $ref_id\\n\" unless $::_q > 1;\n \t\tmy ($u, $p, $repo_id) = ($new_url, '', $ref_id);\n \t\tif ($u =~ s#^\\Q$url\\E(/|$)##) {\n \t\t\t$p = $u;\n-- \n1.6.3.3\n\n-- \nSimon Arlott\n"},{"id":"124555","messageId":"20091010010843.GA30258@dcvr.yhbt.net","threadId":"21169","inReplyTo":"b01cac406b93d5c67e3ae2e9a7aaa498a52dd9fc@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid","subject":"Re: [PATCH] git-svn: hide find_parent_branch output in double quiet mode","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-10-10T01:08:43Z","receivedAt":"2009-10-10T01:08:43Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Simon Arlott <simon@fire.lp0.eu> wrote:\n> Hide find_parent_branch logging when -qq is specified.\n> This eliminates more unnecessary output when run from cron, e.g.:\n> \n> Found possible branch point:\n> http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk =>\n> http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz,\n> 1919\n> Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557\n> Following parent with do_switch\n> Successfully followed parent\n> \n> Signed-off-by: Simon Arlott <simon@fire.lp0.eu>\n\nThanks Simon,\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\nand pushed out to git://git.bogomips.org/git-svn\n\n-- \nEric Wong\n"},{"id":"124557","messageId":"7vy6njafzr.fsf@alter.siamese.dyndns.org","threadId":"21169","inReplyTo":"20091010010843.GA30258@dcvr.yhbt.net","subject":"Re: [PATCH] git-svn: hide find_parent_branch output in double quiet mode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-10T07:02:32Z","receivedAt":"2009-10-10T07:02:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Thanks Simon,\n>\n> Acked-by: Eric Wong <normalperson@yhbt.net>\n>\n> and pushed out to git://git.bogomips.org/git-svn\n\nThanks; you seem to have rebased the history in this repository, and\nmerging from you will duplicate Alexander's \"Avoid spurious errors\", which\nI already pulled, so I'll cherry pick this one from your tree.\n"}]}