{"thread":{"id":"15804","subject":"files missing after converting a cvs repository to git","startedAt":"2008-10-06T22:02:44Z","lastAt":"2008-10-08T06:16:56Z","messageCount":7,"participants":["Adam Mercer","Andreas Ericsson","Jakub Narebski","Michael Haggerty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92457","messageId":"799406d60810061502y417ec53o1a1f5cef800dfe45@mail.gmail.com","threadId":"15804","inReplyTo":null,"subject":"files missing after converting a cvs repository to git","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2008-10-06T22:02:44Z","receivedAt":"2008-10-06T22:02:44Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"Hi\n\nOne of the prrojects I am involved with is currently looking into\nmigrating from cvs to git, therefore we have been investigating this\nby setting up a git repository that tracks cvs, however there are some\nvery strange things going on and I was hoping someone could offer some\ninsight into what is going on.\n\nI use the following git cvsimport command to import the repository:\n\n$ git cvsimport -v -a -i -k\n-d:pserver:user@server:port/path/to/cvs/repo -C /path/to/new/git/repo\nmodule\n\nthis ran successfully with no warnings or errors. However, when I\ncheckout the new git repository that are several files missing from\nthe git checkout that are present in the cvs checkout.\n\nDoes anyone know why this would happen, or how to find out? This is a\nmajor problem because we will be unable to migrate to cvs until this\ncan be solved.\n\nCheers\n\nAdam\n"},{"id":"92490","messageId":"48EAFCEF.8030907@op5.se","threadId":"15804","inReplyTo":"799406d60810061502y417ec53o1a1f5cef800dfe45@mail.gmail.com","subject":"Re: files missing after converting a cvs repository to git","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-10-07T06:08:47Z","receivedAt":"2008-10-07T06:08:47Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Adam Mercer wrote:\n> Hi\n> \n> One of the prrojects I am involved with is currently looking into\n> migrating from cvs to git, therefore we have been investigating this\n> by setting up a git repository that tracks cvs, however there are some\n> very strange things going on and I was hoping someone could offer some\n> insight into what is going on.\n> \n> I use the following git cvsimport command to import the repository:\n> \n> $ git cvsimport -v -a -i -k\n> -d:pserver:user@server:port/path/to/cvs/repo -C /path/to/new/git/repo\n> module\n> \n> this ran successfully with no warnings or errors. However, when I\n> checkout the new git repository that are several files missing from\n> the git checkout that are present in the cvs checkout.\n> \n> Does anyone know why this would happen, or how to find out?\n\nHas the CVS repo been tampered with in the past? If so, it's entirely\npossible that checking out and working with CVS works just fine, but\ngetting history into coherent changesets is impossible.\n\nCan you checkout the offending (old) revisions using CVS? If so, there\nis indeed a bug in the cvs-importer. Otherwise, your CVS repo is hosed\nand you're reduced to running whatever conversion tool does the best\njob if you want to maintain history.\n\ncvs2svn is apparently quite good at getting even the weirdest history\nright. Perhaps you can try that and then running \"git svn\" on the\nresulting svn repo?\n\nGood luck. You'll probably need it :-/\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"92507","messageId":"gcfcrg$ubc$1@ger.gmane.org","threadId":"15804","inReplyTo":"48EAFCEF.8030907@op5.se","subject":"Re: files missing after converting a cvs repository to git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-10-07T10:15:12Z","receivedAt":"2008-10-07T10:15:12Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Andreas Ericsson wrote:\n\n> cvs2svn is apparently quite good at getting even the weirdest history\n> right. Perhaps you can try that and then running \"git svn\" on the\n> resulting svn repo?\n\ncvs2svn has git output now (I think it is actually fast-import output)\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"92508","messageId":"48EB3E06.70100@alum.mit.edu","threadId":"15804","inReplyTo":"gcfcrg$ubc$1@ger.gmane.org","subject":"Re: files missing after converting a cvs repository to git","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2008-10-07T10:46:30Z","receivedAt":"2008-10-07T10:46:30Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Jakub Narebski wrote:\n> Andreas Ericsson wrote:\n> \n>> cvs2svn is apparently quite good at getting even the weirdest history\n>> right. Perhaps you can try that and then running \"git svn\" on the\n>> resulting svn repo?\n> \n> cvs2svn has git output now (I think it is actually fast-import output)\n\nCorrect.  See http://cvs2svn.tigris.org/cvs2git.html for more info.  I\nsuggest using the trunk version of cvs2svn for conversions to git.\n\nPlease note, however, that cvs2svn can only handle one-time conversions\n(i.e., not tracking a live CVS repository incrementally).\n\nMichael\n"},{"id":"92540","messageId":"799406d60810070855y53cf5191m111ce8f5380f96c6@mail.gmail.com","threadId":"15804","inReplyTo":"48EAFCEF.8030907@op5.se","subject":"Re: files missing after converting a cvs repository to git","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2008-10-07T15:55:38Z","receivedAt":"2008-10-07T15:55:38Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"On Tue, Oct 7, 2008 at 01:08, Andreas Ericsson <ae@op5.se> wrote:\n\n> Has the CVS repo been tampered with in the past? If so, it's entirely\n> possible that checking out and working with CVS works just fine, but\n> getting history into coherent changesets is impossible.\n\nUnfortunately yes. Thats what I thought, and was afraid, was going on.\nI've managed to get things working by restoring some of the missing\nfiles ,v files from a backup and regenerating the tracking\nrepositories. Then I had to remove the files in question from cvs and\nreadd them, git cvsimport then saw these files.\n\n> cvs2svn is apparently quite good at getting even the weirdest history\n> right. Perhaps you can try that and then running \"git svn\" on the\n> resulting svn repo?\n\nThanks, I'll give cvs2svn a go.\n\n> Good luck. You'll probably need it :-/\n\nCheers\n\nAdam\n"},{"id":"92542","messageId":"799406d60810070858peb97434p9c9fb0c1128dc8e9@mail.gmail.com","threadId":"15804","inReplyTo":"48EB3E06.70100@alum.mit.edu","subject":"Re: files missing after converting a cvs repository to git","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2008-10-07T15:58:22Z","receivedAt":"2008-10-07T15:58:22Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"On Tue, Oct 7, 2008 at 05:46, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n> Jakub Narebski wrote:\n\n>>> cvs2svn is apparently quite good at getting even the weirdest history\n>>> right. Perhaps you can try that and then running \"git svn\" on the\n>>> resulting svn repo?\n>>\n>> cvs2svn has git output now (I think it is actually fast-import output)\n>\n> Correct.  See http://cvs2svn.tigris.org/cvs2git.html for more info.  I\n> suggest using the trunk version of cvs2svn for conversions to git.\n>\n> Please note, however, that cvs2svn can only handle one-time conversions\n> (i.e., not tracking a live CVS repository incrementally).\n\nThanks, I'll look into this for creating the final git repos.\n\nCheers\n\nAdam\n"},{"id":"92582","messageId":"48EC5058.5020509@op5.se","threadId":"15804","inReplyTo":"799406d60810070855y53cf5191m111ce8f5380f96c6@mail.gmail.com","subject":"Re: files missing after converting a cvs repository to git","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-10-08T06:16:56Z","receivedAt":"2008-10-08T06:16:56Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Adam Mercer wrote:\n> On Tue, Oct 7, 2008 at 01:08, Andreas Ericsson <ae@op5.se> wrote:\n> \n>> Has the CVS repo been tampered with in the past? If so, it's entirely\n>> possible that checking out and working with CVS works just fine, but\n>> getting history into coherent changesets is impossible.\n> \n> Unfortunately yes. Thats what I thought, and was afraid, was going on.\n> I've managed to get things working by restoring some of the missing\n> files ,v files from a backup and regenerating the tracking\n> repositories. Then I had to remove the files in question from cvs and\n> readd them, git cvsimport then saw these files.\n> \n\nOuch. In that case, all bets are off when it comes to correctly cloning\nthe history, I'm afraid. On the up-side, if you get a oneshot conversion\ndone properly you can easily convert it to something else later in case\ngit doesn't meet your needs, and it might even be easier to add commit\nsupport to \"git cvsserver\" than it is to fix your broken repository\n(it might be in there already; I don't use it so I don't know), in\nwhich case you can use CVS with a git object store.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}