{"thread":{"id":"11277","subject":"[PATCH] git-svn: unlink internal index files after operations","startedAt":"2007-12-13T16:27:34Z","lastAt":"2007-12-14T08:29:45Z","messageCount":3,"participants":["Eric Wong","Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63031","messageId":"20071213162734.GA18433@soma","threadId":"11277","inReplyTo":null,"subject":"[PATCH] git-svn: unlink internal index files after operations","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-12-13T16:27:34Z","receivedAt":"2007-12-13T16:27:34Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Being git, we can generate these very quickly on the fly as\nneeded, so there's no point in wasting space for these things\nfor large projects.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 54d7844..fde39e2 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -396,6 +396,7 @@ sub cmd_set_tree {\n \t}\n \t$gs->set_tree($_) foreach @revs;\n \tprint \"Done committing \",scalar @revs,\" revisions to SVN\\n\";\n+\tunlink $gs->{index};\n }\n \n sub cmd_dcommit {\n@@ -514,6 +515,7 @@ sub cmd_dcommit {\n \t\t\t$last_rev = $cmt_rev;\n \t\t}\n \t}\n+\tunlink $gs->{index};\n }\n \n sub cmd_find_rev {\n@@ -1374,6 +1376,7 @@ sub fetch_all {\n \n \t($base, $head) = parse_revision_argument($base, $head);\n \t$ra->gs_fetch_loop_common($base, $head, \\@gs, \\@globs);\n+\tunlink $_->{index} foreach @gs;\n }\n \n sub read_all_remotes {\n-- \nEric Wong\n"},{"id":"63049","messageId":"20071213202757.GA2387@diana.vm.bytemark.co.uk","threadId":"11277","inReplyTo":"20071213162734.GA18433@soma","subject":"Re: [PATCH] git-svn: unlink internal index files after operations","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-12-13T20:27:57Z","receivedAt":"2007-12-13T20:27:57Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-12-13 08:27:34 -0800, Eric Wong wrote:\n\n> Being git, we can generate these very quickly on the fly as needed,\n> so there's no point in wasting space for these things for large\n> projects.\n\nExcellent!\n\nFor existing repos, I assume the correct thing to do is to just blast\nall the existing index files manually?\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"63124","messageId":"20071214082945.GA19559@soma","threadId":"11277","inReplyTo":"20071213202757.GA2387@diana.vm.bytemark.co.uk","subject":"Re: [PATCH] git-svn: unlink internal index files after operations","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-12-14T08:29:45Z","receivedAt":"2007-12-14T08:29:45Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Karl Hasselström <kha@treskal.com> wrote:\n> On 2007-12-13 08:27:34 -0800, Eric Wong wrote:\n> \n> > Being git, we can generate these very quickly on the fly as needed,\n> > so there's no point in wasting space for these things for large\n> > projects.\n> \n> Excellent!\n> \n> For existing repos, I assume the correct thing to do is to just blast\n> all the existing index files manually?\n\nYes.  index files inside $GIT_DIR/svn have always been safely deletable\n(except while a git-svn is actually running :).\n\nI'll probably work on an automated full migration strategy at some\npoint (handling rev_db => rev_map, mainly) when I have time.\n\n-- \nEric Wong\n"}]}