{"thread":{"id":"37852","subject":"Re: Regression and failure to clone/fetch with new code Re: git-svn performance","startedAt":"2014-10-31T01:40:31Z","lastAt":"2014-10-31T01:40:31Z","messageCount":1,"participants":["Hin-Tak Leung"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"251258","messageId":"1414719631.37308.BPMail_high_carrier@web172302.mail.ir2.yahoo.com","threadId":"37852","inReplyTo":null,"subject":"Re: Regression and failure to clone/fetch with new code Re: git-svn performance","fromName":"Hin-Tak Leung","fromEmail":"hintak_leung@yahoo.co.uk","sentAt":"2014-10-31T01:40:31Z","receivedAt":"2014-10-31T01:40:31Z","isPatch":false,"sender":{"key":"hintak_leung@yahoo.co.uk","avatar":null},"body":"\n\n\n\n\n------------------------------\nOn Thu, Oct 30, 2014 08:46 GMT Eric Wong wrote:\n\n>Hin-Tak Leung <htl10@users.sourceforge.net> wrote:\n>> Here is the data dumper info . I tried the dumper code on the R repo\n>> as well, and saw that against the virtual box repo, there is one \n>> curious difference - $self->{last_rev} is a string rather than a number.\n>> I tried hacking around doing \"$x += 0;\" to coerce last_rev\n>> to a number at various places but didn't get very far. There seems to be some caching\n>> code in RA->get_dir so presumably that's why the same code run\n>> on one repo gives it as string while on another gives it a number. Hope\n>> you can figure where the coersion to string happened.\n>\n>Thanks, I'm not able to reproduce the issue, but can you try the\n>following?\n>\n>diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm\n>index 75cdac9..82d6108 100644\n>--- a/perl/Git/SVN/Ra.pm\n>+++ b/perl/Git/SVN/Ra.pm\n>@@ -153,6 +153,7 @@ sub url {\n> sub check_path {\n> \tmy ($self, $path, $r) = @_;\n> \tmy $cache = $self->{cache}->{check_path};\n>+\t$r = int($r);\n> \tif ($r == $cache->{r} && exists $cache->{data}->{$path}) {\n> \t\treturn $cache->{data}->{$path};\n> \t}\n>@@ -169,6 +170,7 @@ sub check_path {\n> sub get_dir {\n> \tmy ($self, $dir, $r) = @_;\n> \tmy $cache = $self->{cache}->{get_dir};\n>+\t$r = int($r);\n> \tif ($r == $cache->{r}) {\n> \t\tif (my $x = $cache->{data}->{$dir}) {\n> \t\t\treturn wantarray ? @$x : $x->[0];\n>---\n>The above should apply to my current master which has some\n>minor cleanups (which I hope to send to Junio tomorrow).\n>\n>The following changes since commit fbecd99861ea5795aeba46faf2ac7a8c1b70d485:\n>\n>  Update draft release notes to 2.2 (2014-10-24 15:02:17 -0700)\n>\n>are available in the git repository at:\n>\n>  git://bogomips.org/git-svn.git master\n>\n>for you to fetch changes up to da0bc948ac2e01652a150fd4a57cebad6143242c:\n>\n>  git-svn: add space after \"W:\" prefix in warning (2014-10-30 08:31:28 +0000)\n>\n>----------------------------------------------------------------\n>Eric Wong (11):\n>      git-svn: reduce check_cherry_pick cache overhead\n>      git-svn: cache only mergeinfo revisions\n>      git-svn: remove mergeinfo rev caching\n>      git-svn: reload RA every log-window-size\n>      git-svn: remove unnecessary DESTROY override\n>      git-svn: save a little memory as fetch progresses\n>      git-svn: disable _rev_list memoization\n>      Git.pm: add specified name to tempfile template\n>      git-svn: prepare SVN::Ra config pieces once\n>      git-svn: (cleanup) remove editor param passing\n>      git-svn: add space after \"W:\" prefix in warning\n>\n>Jakob Stoklund Olesen (2):\n>      git-svn: only look at the new parts of svn:mergeinfo\n>      git-svn: only look at the root path for svn:mergeinfo\n>\n>Sveinung Kvilhaugsvik (1):\n>      git-svn.txt: advertise pushurl with dcommit\n>\n> Documentation/git-svn.txt |   4 ++\n> perl/Git.pm               |   5 +-\n> perl/Git/SVN.pm           | 125 ++++++++++++++++++++++++++++------------------\n> perl/Git/SVN/Ra.pm        |  90 ++++++++++++++++++---------------\n> 4 files changed, 134 insertions(+), 90 deletions(-)\n"}]}