git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Dmitry Ivankov <divanorama@gmail.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	David Barr <davidbarr@google.com>
Subject: Re: [PATCH 8/8] vcs-svn: allow to disable 'progress' lines
Date: Wed, 6 Jul 2011 17:10:07 +0530	[thread overview]
Message-ID: <CALkWK0mVcEvaXiODtvNT0S88b4uuc_h1AZx-CLi6KN6KO2=ESw@mail.gmail.com> (raw)
In-Reply-To: <CA+gfSn-LEW36+bbxs1ydnhd3iQu-+wvrsSTuTszTYKm+jmuhOw@mail.gmail.com>

Hi again,

Dmitry Ivankov writes:
>>> -       if (svndump_init(NULL, url, ref, backflow_fd))
>>> +       if (svndump_init(NULL, url, ref, backflow_fd, progress))
>>
>> You're modifying the svndump_init API for every new option that's
>> added.  This'll clearly break down when you have many options -- how
>> about wrapping it up in an options structure and then passing that?
> Well, there has to be a function to init that structure then. And the
> structure will become a part of API.
> So don't know if it's worthy.

Well, you'll be wrapping up url, ref, backflow_fd, progress, and all
other future command-line parameters in one variable.  Think about it.
 You can use the parse-options API to fill in default arguments
anyway.

>>> diff --git a/contrib/svn-fe/svn-fe.txt b/contrib/svn-fe/svn-fe.txt
>>> index a7ad368..f1a459e 100644
>>> --- a/contrib/svn-fe/svn-fe.txt
>>> +++ b/contrib/svn-fe/svn-fe.txt
>>> @@ -39,6 +39,9 @@ OPTIONS
>>>        Integer number of file descriptor from which
>>>        responses to 'ls' and 'cat-blob' requests will come.
>>>        Default is fd=3.
>>> +--[no-]progress::
>>> +       Write 'progress' lines to fast-import stream. These
>>> +       can be displayed by fast-import.
>>
>> Hm, this will make it a little too silent for the end-user.  What do
>> you feel about printing something minimalistic like a '.' for each
>> imported revision? Atleast it won't look like it's hung.
> For a medium 8k commit repo it is 100 lines - still too much.
> A single line for the first revision seem harmless and will indicate
> that the remote connection succeeded
> (helps to see that it's not a connection timeout, probably caused by
> dns lookup or a firewall).

Ah, right. I agree with you.

>>  Also, how does this interact with the 'progress' option of fast-import protocol?
> git fast-import --quiet prints any progress line produced by a helper.
> transport-helper.c tries to set the option
> but doesn't fail if it is not accepted or if helper doesn't support
> options at all.
> For now the helper doesn't use this protocol option.
>
> A better solution could be to use progress.o api to display progress.
> Or an ad-hoc hack with adaptive progress step, say report a progress
> on each "power of two"-th revision.
> As a starting point for tests let there bust a simple switch-off.

Yeah, that makes sense -- would love to see that in future.

>>> -void fast_export_init(int fd, const char *dst_ref)
>>> +void fast_export_init(int fd, const char *dst_ref, int progress)
>>>  {
>>>        first_commit_done = 0;
>>> +       print_progress = progress;
>>
>> The only reason you're modifying the API of fast_export_init is so
>> that it can set a global static variable?
> Looked once more at how these new variables are used. We can move
> progress lines generation to svndump.c. And also move ref_name from
> _init and being global static to a parameter in fast_export_begin_commit(),
> and to be more sane s/revision/target_mark/ s/revision - 1/from_mark/ and
> add a from_mark parameter, move first_commit_done logic to svndump.o.
> This way fast_export.o can operate on single commits and maybe it'll be
> easier to use it to apply svn branches layout in svn-fe in one run, though I'm
> not sure I'll use svn-fe to manage svn branches.

Makes sense.
Thanks.

-- Ram

  reply	other threads:[~2011-07-06 11:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 17:57 [PATCH 0/8] vcs-svn, svn-fe: add a couple of options Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 1/8] vcs-svn: move url parameter from _read to _init Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 2/8] svn-fe: add man target to Makefile Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 3/8] svn-fe: add EXTLIBS needed for parse-options Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 4/8] svn-fe: add usage and unpositional arguments versions Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 5/8] test-svn-fe: use parse-options Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 6/8] vcs-svn: allow to specify dump destination ref Dmitry Ivankov
2011-07-03 17:57 ` [PATCH 7/8] vcs-svn: convert REPORT_FILENO to an option Dmitry Ivankov
2011-07-06 10:09   ` Ramkumar Ramachandra
2011-07-03 17:57 ` [PATCH 8/8] vcs-svn: allow to disable 'progress' lines Dmitry Ivankov
2011-07-06  8:25   ` Ramkumar Ramachandra
2011-07-06 10:14     ` Dmitry Ivankov
2011-07-06 11:40       ` Ramkumar Ramachandra [this message]
2011-07-04 11:06 ` [PATCH 0/8] vcs-svn, svn-fe: add a couple of options Sverre Rabbelier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALkWK0mVcEvaXiODtvNT0S88b4uuc_h1AZx-CLi6KN6KO2=ESw@mail.gmail.com' \
    --to=artagnon@gmail.com \
    --cc=davidbarr@google.com \
    --cc=divanorama@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).