threads / patch / 38329

patchgit-svn: show progress in working_head_info()

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

## tl;dr

3 messages between Jan 10, 2015 and Jan 14, 2015. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Ramkumar Ramachandra· Jan 10, 2015, 13:21 UTC · lore

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(+)
Show changes to git-svn.perl +3 −0
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· Jan 10, 2015, 22:21 UTC · re: Ramkumar Ramachandra · lore

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

Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 8 quoted lines
> 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?
Show 17 quoted lines
>  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;

← back to recent threads