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

Re: Regression and failure to clone/fetch with new code Re: git-svn performance

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 30, 2014, 08:46 UTC
Message-ID
<20141030084619.GA12697@dcvr.yhbt.net>
In-Reply-To
<1414636504.45506.YahooMailBasic@web172304.mail.ir2.yahoo.com>
Hin-Tak Leung <htl10@users.sourceforge.net> wrote:
Show 8 quoted lines
> Here is the data dumper info . I tried the dumper code on the R repo
> as well, and saw that against the virtual box repo, there is one 
> curious difference - $self->{last_rev} is a string rather than a number.
> I tried hacking around doing "$x += 0;" to coerce last_rev
> to a number at various places but didn't get very far. There seems to be some caching
> code in RA->get_dir so presumably that's why the same code run
> on one repo gives it as string while on another gives it a number. Hope
> you can figure where the coersion to string happened.

Thanks, I'm not able to reproduce the issue, but can you try the following?

diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index 75cdac9..82d6108 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -153,6 +153,7 @@ sub url {
 sub check_path {
 	my ($self, $path, $r) = @_;
 	my $cache = $self->{cache}->{check_path};
+	$r = int($r);
 	if ($r == $cache->{r} && exists $cache->{data}->{$path}) {
 		return $cache->{data}->{$path};
 	}
@@ -169,6 +170,7 @@ sub check_path {
 sub get_dir {
 	my ($self, $dir, $r) = @_;
 	my $cache = $self->{cache}->{get_dir};
+	$r = int($r);
 	if ($r == $cache->{r}) {
 		if (my $x = $cache->{data}->{$dir}) {
 			return wantarray ? @$x : $x->[0];
---
The above should apply to my current master which has some
minor cleanups (which I hope to send to Junio tomorrow).

The following changes since commit fbecd99861ea5795aeba46faf2ac7a8c1b70d485:

  Update draft release notes to 2.2 (2014-10-24 15:02:17 -0700)

are available in the git repository at:

  git://bogomips.org/git-svn.git master

for you to fetch changes up to da0bc948ac2e01652a150fd4a57cebad6143242c:

  git-svn: add space after "W:" prefix in warning (2014-10-30 08:31:28 +0000)

----------------------------------------------------------------
Eric Wong (11):
      git-svn: reduce check_cherry_pick cache overhead
      git-svn: cache only mergeinfo revisions
      git-svn: remove mergeinfo rev caching
      git-svn: reload RA every log-window-size
      git-svn: remove unnecessary DESTROY override
      git-svn: save a little memory as fetch progresses
      git-svn: disable _rev_list memoization
      Git.pm: add specified name to tempfile template
      git-svn: prepare SVN::Ra config pieces once
      git-svn: (cleanup) remove editor param passing
      git-svn: add space after "W:" prefix in warning

Jakob Stoklund Olesen (2):
      git-svn: only look at the new parts of svn:mergeinfo
      git-svn: only look at the root path for svn:mergeinfo

Sveinung Kvilhaugsvik (1):
      git-svn.txt: advertise pushurl with dcommit

 Documentation/git-svn.txt |   4 ++
 perl/Git.pm               |   5 +-
 perl/Git/SVN.pm           | 125 ++++++++++++++++++++++++++++------------------
 perl/Git/SVN/Ra.pm        |  90 ++++++++++++++++++---------------
 4 files changed, 134 insertions(+), 90 deletions(-)
Previous: Hin-Tak LeungNext: Eric Wong
Message 13 of 14 in “Re: Anomaly with the new code - Re: git-svn performance”
  1. Hin-Tak LeungOct 27, 2014
  2. differences between old clone and new Re: git-svn performanceHin-Tak Leung, Oct 28, 2014
  3. Eric WongOct 28, 2014
  4. Hin-Tak LeungOct 28, 2014
  5. Eric WongOct 30, 2014
  6. Hin-Tak LeungOct 30, 2014
  7. Eric WongOct 30, 2014
  8. Regression and failure to clone/fetch with new code Re: git-svn performanceHin-Tak Leung, Oct 28, 2014
  9. Eric WongOct 29, 2014
  10. Hin-Tak LeungOct 30, 2014
  11. Eric WongOct 30, 2014
  12. Hin-Tak LeungOct 30, 2014
  13. Eric WongOct 30, 2014
  14. Eric WongOct 28, 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.