# [PATCH] git-svn: show progress in working_head_info()

3 messages from 2015-01-10 to 2015-01-14. Participants: Ramkumar Ramachandra, Eric Wong.
Thread: https://gitlist.dev/t/38329

## Ramkumar Ramachandra, 2015-01-10 13:21

Subject: [PATCH] git-svn: show progress in working_head_info()
Message-ID: <1420896096-15254-1-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1420896096-15254-1-git-send-email-artagnon%40gmail.com

```
The working_head_info routine takes a very long time to execute on large
repositories. The least we can do is to comfort users that some progress
is being made.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 I was worried because of the long wait, so I wrote this to convince
 myself that git-svn wasn't stuck.

 git-svn.perl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/git-svn.perl b/git-svn.perl
index 60f8814..6aa156c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2022,6 +2022,9 @@ sub working_head_info {
 			next;
 		}
 		next unless s{^\s*(git-svn-id:)}{$1};
+		my $chomped = $_;
+		chomp $chomped;
+		print "[Importing] $chomped\n";
 		my ($url, $rev, $uuid) = extract_metadata($_);
 		if (defined $url && defined $rev) {
 			next if $max{$url} and $max{$url} < $rev;
-- 
2.2.1

```

## Eric Wong, 2015-01-10 22:21

Subject: Re: [PATCH] git-svn: show progress in working_head_info()
Message-ID: <20150110222135.GB32253@dcvr.yhbt.net>
URL: https://gitlist.dev/e/20150110222135.GB32253%40dcvr.yhbt.net
In-Reply-To: <1420896096-15254-1-git-send-email-artagnon@gmail.com>

```
Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> The working_head_info routine takes a very long time to execute on large
> repositories. The least we can do is to comfort users that some progress
> is being made.
> 
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  I was worried because of the long wait, so I wrote this to convince
>  myself that git-svn wasn't stuck.

Unfortunately, this breaks show-ignore and t9101-git-svn-props.sh

show-ignore.expect show-ignore.got differ: char 1, line 1
not ok 23 - test show-ignore

Perhaps output should go to STDERR and also respect $_q?

>  git-svn.perl | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 60f8814..6aa156c 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -2022,6 +2022,9 @@ sub working_head_info {
>  			next;
>  		}
>  		next unless s{^\s*(git-svn-id:)}{$1};
> +		my $chomped = $_;
> +		chomp $chomped;
> +		print "[Importing] $chomped\n";
>  		my ($url, $rev, $uuid) = extract_metadata($_);
>  		if (defined $url && defined $rev) {
>  			next if $max{$url} and $max{$url} < $rev;

```

## Ramkumar Ramachandra, 2015-01-14 22:40

Subject: Re: [PATCH] git-svn: show progress in working_head_info()
Message-ID: <CALkWK0nJdkk0D3R62upGWm24s4vqF5tehkb5fU=nWMnCJ-OGWw@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0nJdkk0D3R62upGWm24s4vqF5tehkb5fU%3DnWMnCJ-OGWw%40mail.gmail.com
In-Reply-To: <20150110222135.GB32253@dcvr.yhbt.net>

```
Eric,

I'm sorry, but this change isn't important enough for me to follow up.
Please merge the other two patches, if you think they're good.

Thanks.

```
