git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] git-svn: use SVN::Ra::get_dir2 when possible

From
HLHin-Tak Leung <htl10@users.sourceforge.net>
Date
Oct 31, 2014, 21:53 UTC
Message-ID
<1414792434.54806.YahooMailBasic@web172304.mail.ir2.yahoo.com>

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

Show 13 quoted lines
>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?

Show 33 quoted lines
>---
> 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
>
Next: Eric Wong
Message 1 of 5 in “Re: [PATCH v2] git-svn: use SVN::Ra::get_dir2 when possible”
  1. Hin-Tak LeungOct 31, 2014
  2. Eric WongOct 31, 2014
  3. Hin-Tak LeungNov 1, 2014
  4. Eric WongNov 1, 2014
  5. Hin-Tak LeungNov 1, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.