{"thread":{"id":"36041","subject":"Rewriting git history during git-svn conversion","startedAt":"2014-03-03T18:38:52Z","lastAt":"2014-03-06T19:09:00Z","messageCount":3,"participants":["Robert Dailey","Thomas Ferris Nicolaisen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"235899","messageId":"CAHd499DqoUEKeu4uM5w7Y6Tm-tE-oJMUdz4RxP9s6CpN=LS9Bg@mail.gmail.com","threadId":"36041","inReplyTo":null,"subject":"Rewriting git history during git-svn conversion","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-03-03T18:38:52Z","receivedAt":"2014-03-03T18:38:52Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"Hi,\n\nI am converting my team's SVN server to GIT but they aren't ready to\ntransition yet. People are still working out of SVN, so I need to keep\nthe git-svn clone around to do 'git svn fetch' to continue to keep it\nsynchronized with SVN.\n\nOnce everyone is ready to switch, and after converting all of the\ntag-branches to real GIT tags, I plan to push all branches & tags to\nthe new central git repository.\n\nHowever, before pushing to the central GIT repo, I want to remove some\ngiant directories from the repository history. Specifically some third\nparty library directories. I have found a way to do this here:\nhttp://stackoverflow.com/questions/10067848/remove-folder-and-its-contents-from-git-githubs-history\n\nIs it safe to do this while still using git svn fetch? Will it\nproperly continue to convert SVN commits on top of my rewritten\nhistory? If not, what changes can I make after I run the commands\nlinked by the URL above so that git svn continues to work normally?\n\nNote that I plan to delete the third party libraries from SVN side and\nthen pull down the changes to git through git-svn, then at that point\nclean it up (hopefully the git filter-branch command ignores the\ncommit that deleted the files and only hunts down the commits where\nthey were added or modified).\n\nAny guidance on this would be much appreciated.\n"},{"id":"235988","messageId":"CAEcj5uVOWzcCjrUO9NBuRvbPUaqigJyaOmG_8wCumznB+yTH4Q@mail.gmail.com","threadId":"36041","inReplyTo":"CAHd499DqoUEKeu4uM5w7Y6Tm-tE-oJMUdz4RxP9s6CpN=LS9Bg@mail.gmail.com","subject":"Re: Rewriting git history during git-svn conversion","fromName":"Thomas Ferris Nicolaisen","fromEmail":"tfnico@gmail.com","sentAt":"2014-03-04T10:56:42Z","receivedAt":"2014-03-04T10:56:42Z","isPatch":false,"sender":{"key":"tfnico@gmail.com","avatar":"https://gravatar.com/avatar/628cf28a25ca4c596c7284562100f70f0ef908bcbfadd4da1eb3d48c23658d01?d=mp&s=160"},"body":"On Mon, Mar 3, 2014 at 7:38 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>\n> Is it safe to do this while still using git svn fetch? Will it\n> properly continue to convert SVN commits on top of my rewritten\n> history? If not, what changes can I make after I run the commands\n> linked by the URL above so that git svn continues to work normally?\n>\n\nI think it's OK. git-svn doesn't continuously verify the integrity of\nhistory already converted, I believe.\n\nJust try it out, it worked fine in a little demo setup I made\n(although I used rebase -i instead of filter-branch):\n\ngit svn clone .. #maybe clone a little test repository to speed up the testing\ngit filter-branch ... #remove unwanted files\ngit svn fetch #this should work\n\nOn a related note, maybe you'll enjoy my git-svn demos & ideas here:\nhttp://www.tfnico.com/presentations/git-and-subversion\n"},{"id":"236181","messageId":"CAHd499D-o37K_XXOj=gWyC4hXYxqBJ4JtAhy-naNP_eU4oWnyA@mail.gmail.com","threadId":"36041","inReplyTo":"CAEcj5uVOWzcCjrUO9NBuRvbPUaqigJyaOmG_8wCumznB+yTH4Q@mail.gmail.com","subject":"Re: Rewriting git history during git-svn conversion","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-03-06T19:09:00Z","receivedAt":"2014-03-06T19:09:00Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Tue, Mar 4, 2014 at 4:56 AM, Thomas Ferris Nicolaisen\n<tfnico@gmail.com> wrote:\n> On Mon, Mar 3, 2014 at 7:38 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>>\n>> Is it safe to do this while still using git svn fetch? Will it\n>> properly continue to convert SVN commits on top of my rewritten\n>> history? If not, what changes can I make after I run the commands\n>> linked by the URL above so that git svn continues to work normally?\n>>\n>\n> I think it's OK. git-svn doesn't continuously verify the integrity of\n> history already converted, I believe.\n>\n> Just try it out, it worked fine in a little demo setup I made\n> (although I used rebase -i instead of filter-branch):\n>\n> git svn clone .. #maybe clone a little test repository to speed up the testing\n> git filter-branch ... #remove unwanted files\n> git svn fetch #this should work\n>\n> On a related note, maybe you'll enjoy my git-svn demos & ideas here:\n> http://www.tfnico.com/presentations/git-and-subversion\n\n\nSo I did try this out. I did a 'fitler-branch', and afterwards I am\nunable to do a `git svn fetch`:\n\n$ git svn fetch\nfatal: Invalid revision range cf641cf687fc41b769f296af6e4345dd6a8a6d7d\nrev-list --pretty=raw --reverse\ncf641cf687fc41b769f296af6e4345dd6a8a6d7d..refs/remotes/svn/trunk --:\ncommand returned error: 128\n\nI have a TON of branches, so I need some small command or script that\nis able to go through each branch and update the metadata to tell it\nwhat the new (rewritten) HEAD commit on each branch is. I'm assuming\nthat's the problem (git svn data is referring to old SHA of each\nremote tracking branch).\n\nIf there is more to it than this please let me know. Thanks so far for\neveryone's help.\n"}]}