Git development
 help / color / mirror / Atom feed
From: Hin-Tak Leung <htl10@users.sourceforge.net>
To: normalperson@yhbt.net
Cc: stoklund@2pi.dk, fabian.schmied@gmail.com, git@vger.kernel.org,
	sam@vilain.net, stevenrwalter@gmail.com, waste.manager@gmx.de,
	amyrick@apple.com
Subject: Re: [PATCH v2] git-svn: use SVN::Ra::get_dir2 when possible
Date: Fri, 31 Oct 2014 21:53:54 +0000	[thread overview]
Message-ID: <1414792434.54806.YahooMailBasic@web172304.mail.ir2.yahoo.com> (raw)

-------------------------
On Fri, Oct 31, 2014 10:34 GMT Eric Wong wrote:

>This avoids the following failure with normal "get_dir" on newer
>versions of SVN (tested with SVN 1.8.8-1ubuntu3.1):
>
>  Incorrect parameters given: Could not convert '%ld' into a number
>
>get_dir2 also has the potential to be more efficient by requesting
>less data.
>
>ref: <1414636504.45506.YahooMailBasic@web172304.mail.ir2.yahoo.com>
>ref: <1414722617.89476.YahooMailBasic@web172305.mail.ir2.yahoo.com>
>
>Signed-off-by: Eric Wong <normalperson@yhbt.net>
>Cc: Hin-Tak Leung <htl10@users.sourceforge.net>

Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>

Okay, this one on top of my "git 2.1.0 + 10 recent git svn improvement patches"
allow me to fetch further.

I suspect the problem must be elsewhere though, and this just band-aided
over it.

For me, reverting the additional patches and just use git 2.1.0 also allow
me to fetch further, so the problem appear to me to be associated with
the additional patches. But you are saying that git-svn on debian as shipped
exhibit this problem? 

>---
> Sorry, waaay past my bed time.  This version doesn't infinite loop
> on autoload or older SVN(*) (at least I hope it doesn't)
>
> perl/Git/SVN/Ra.pm | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
>diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
>index 82d6108..496f430 100644
>--- a/perl/Git/SVN/Ra.pm
>+++ b/perl/Git/SVN/Ra.pm
>@@ -177,7 +177,17 @@ sub get_dir {
>         }
>     }
>     my $pool = SVN::Pool->new;
>-    my ($d, undef, $props) = $self->SUPER::get_dir($dir, $r, $pool);
>+    my ($d, undef, $props);
>+
>+    if (::compare_svn_version('1.4.0') >= 0) {
>+        # n.b. in addition to being potentially more efficient,
>+        # this works around what appears to be a bug in some
>+        # SVN 1.8 versions
>+        my $kind = 1; # SVN_DIRENT_KIND
>+        ($d, undef, $props) = $self->get_dir2($dir, $r, $kind, $pool);
>+    } else {
>+        ($d, undef, $props) = $self->SUPER::get_dir($dir, $r, $pool);
>+    }
>     my %dirents = map { $_ => { kind => $d->{$_}->kind } } keys %$d;
>     $pool->clear;
>     if ($r != $cache->{r}) {
>-- 
>EW
>

             reply	other threads:[~2014-10-31 21:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 21:53 Hin-Tak Leung [this message]
2014-10-31 23:22 ` [PATCH v2] git-svn: use SVN::Ra::get_dir2 when possible Eric Wong
2014-11-01  2:19   ` Hin-Tak Leung
2014-11-01  3:13     ` Eric Wong
2014-11-01  6:13       ` Hin-Tak Leung
  -- strict thread matches above, loose matches on Subject: below --
2014-10-31 21:09 Hin-Tak Leung
2014-10-31 21:42 ` Eric Wong
2014-10-31 10:15 [PATCH] " Eric Wong
2014-10-31 10:34 ` [PATCH v2] " Eric Wong
2014-10-31 19:08   ` Eric Wong

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=1414792434.54806.YahooMailBasic@web172304.mail.ir2.yahoo.com \
    --to=htl10@users.sourceforge.net \
    --cc=amyrick@apple.com \
    --cc=fabian.schmied@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --cc=sam@vilain.net \
    --cc=stevenrwalter@gmail.com \
    --cc=stoklund@2pi.dk \
    --cc=waste.manager@gmx.de \
    /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