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

Re: [PATCH] git-svnimport: support for incremental import

From
SKSasha Khapyorsky <sashak@voltaire.com>
Date
Jan 7, 2007, 18:59 UTC
Message-ID
<20070107185906.GD18379@sashak.voltaire.com>
In-Reply-To
<204011cb0701071012g30cb69a5h4622d94574d10521@mail.gmail.com>
On 10:12 Sun 07 Jan     , Chris Lee wrote:
Show 11 quoted lines
> On 1/6/07, Sasha Khapyorsky <sashak@voltaire.com> wrote:
> >This adds ability to do import "in chunks" (default 1000 revisions),
> >after each chunk git repo will be repacked. The option -R is used to
> >change default value of chunk size (or how often repository will
> >repacked).
> 
> Actually, I just noticed an issue here with this - it appears to be
> double-importing the edge revisions.
> 
> So if I started with -s 349000 and tell it to repack every 1000
> revisions, it's now importing every thousandth revision twice.
Indeed. There is the fix:
diff --git a/git-svnimport.perl b/git-svnimport.perl
index afbbe63..f1f1a7d 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -943,10 +943,10 @@ if ($opt_l < $current_rev) {
 print "Processing from $current_rev to $opt_l ...\n" if $opt_v;
 
 my $from_rev;
-my $to_rev = $current_rev;
+my $to_rev = $current_rev - 1;
 
 while ($to_rev < $opt_l) {
-	$from_rev = $to_rev;
+	$from_rev = $to_rev + 1;
 	$to_rev = $from_rev + $repack_after;
 	$to_rev = $opt_l if $opt_l < $to_rev;
 	print "Fetching from $from_rev to $to_rev ...\n" if $opt_v;


Sasha
Previous: Chris LeeNext: Sasha Khapyorsky
Message 54 of 55 in “git-svnimport failed and now git-repack hates me”
  1. Chris LeeJan 3, 2007
  2. Linus TorvaldsJan 4, 2007
  3. Shawn O. PearceJan 4, 2007
  4. Shawn O. PearceJan 4, 2007
  5. Chris LeeJan 4, 2007
  6. Shawn O. PearceJan 4, 2007
  7. Chris LeeJan 4, 2007
  8. Shawn O. PearceJan 4, 2007
  9. Chris LeeJan 4, 2007
  10. Shawn O. PearceJan 4, 2007
  11. Chris LeeJan 4, 2007
  12. Chris LeeJan 4, 2007
  13. Chris LeeJan 4, 2007
  14. Linus TorvaldsJan 4, 2007
  15. Chris LeeJan 4, 2007
  16. Eric WongJan 4, 2007
  17. Randal L. SchwartzJan 4, 2007
  18. Eric WongJan 4, 2007
  19. git-svn: make --repack work consistently between fetch and multi-fetchEric Wong, Jan 5, 2007
  20. Junio C HamanoJan 4, 2007
  21. pack-check.c::verify_packfile(): don't run SHA-1 update on huge dataJunio C Hamano, Jan 4, 2007
  22. Chris LeeJan 4, 2007
  23. Junio C HamanoJan 4, 2007
  24. Chris LeeJan 5, 2007
  25. Junio C HamanoJan 5, 2007
  26. Chris LeeJan 5, 2007
  27. Shawn O. PearceJan 5, 2007
  28. Chris LeeJan 5, 2007
  29. Junio C HamanoJan 5, 2007
  30. Linus TorvaldsJan 5, 2007
  31. alanJan 5, 2007
  32. Eric WongJan 7, 2007
  33. Linus TorvaldsJan 5, 2007
  34. Junio C HamanoJan 5, 2007
  35. Linus TorvaldsJan 5, 2007
  36. Linus TorvaldsJan 5, 2007
  37. Junio C HamanoJan 5, 2007
  38. Linus TorvaldsJan 5, 2007
  39. Johannes SchindelinJan 6, 2007
  40. Chris LeeJan 5, 2007
  41. Junio C HamanoJan 5, 2007
  42. Linus TorvaldsJan 5, 2007
  43. Junio C HamanoJan 5, 2007
  44. Linus TorvaldsJan 6, 2007
  45. Linus TorvaldsJan 6, 2007
  46. Junio C HamanoJan 6, 2007
  47. Linus TorvaldsJan 6, 2007
  48. Chris LeeJan 4, 2007
  49. Linus TorvaldsJan 4, 2007
  50. Sasha KhapyorskyJan 4, 2007
  51. Chris LeeJan 4, 2007
  52. git-svnimport: support for incremental importSasha Khapyorsky, Jan 7, 2007
  53. Chris LeeJan 7, 2007
  54. Sasha KhapyorskyJan 7, 2007
  55. git-svnimport: fix edge revisions double importingSasha Khapyorsky, Jan 8, 2007

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.