{"thread":{"id":"16197","subject":"Re: cvs2git","startedAt":"2008-11-06T12:42:00Z","lastAt":"2008-11-06T12:42:00Z","messageCount":1,"participants":["Michael Haggerty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"95048","messageId":"4912E618.1060801@alum.mit.edu","threadId":"16197","inReplyTo":"200811052319.04879.fg@one2team.net","subject":"Re: cvs2git","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2008-11-06T12:42:00Z","receivedAt":"2008-11-06T12:42:00Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Francis Galiegue wrote:\n> I don't like to reinvent the wheel and you have gone a lot further than I did\n> wrt cvs2git, with the added advantage that you work on a physical CVS tree\n> and you know a LOT more about CVS than I do. And I do, indeed, have physical\n> access to \"my\" CVS tree.\n\nEven for the few people who don't have physical access to their CVS\ntree, there is a solution [1].  I don't think this is a significant\nissue, and indeed we've had very few complaints about this over the years.\n\n> I wish that cvs2svn[2git] gets things as right as possible, and am willing to\n> help in any way possible.\n\nThe first step is to send in bug reports (including sample repositories)\nfor anything you think can be improved.  It is very easy to produce a\ntest case from even a proprietary repository [2].\n\n> Have you ever had a look at git-cvsimport already? Not my code, it relies on\n> cvsps, which is flawed, that's a given fact. But it builds a state-of-the-art\n> git repository.\n\nHow do you define \"state-of-the-art\"?  Granted, the resulting git\nrepository is simpler than the one created by cvs2git, but that is\nbecause *it is typically wrong*.  The tool produces simple output\nbecause it assumes away so much of the true complexity that can be\nrecorded in a CVS history.\n\nI am not interested in a known-to-be-incorrect conversion, no matter how\npretty it looks in gitk.\n\ngit-cvsimport is *broken*, and the only way to fix it is to give it (and\nits output) all of the complexity of cvs2svn/cvs2git.  I know that for a\nfact because cvs2svn used to be based on simpler algorithms (though even\nthen not as naive as those used by cvsps!) and we were constantly trying\nto patch up this or that edge case in a futile struggle against a system\nthat was fundamentally broken.  The switch to the current\ntopological-based changeset creation fixed all such bugs at once.\n\nIf you try to build a robust and correct tool on cvsps, you are doomed\nto failure because (1) cvsps can crash complex CVS repositories and (2)\ncvsps doesn't even *try* to supply all information correctly, e.g.\nregarding the true contents of tags and branches [3].\n\n> By now, I have achieved the first part of my project (correctly parsing the\n> cvsps cache file), next step I'll \"lighten\" the git-cvsimport source (bug for\n> bug compatibility to start with).\n\nPlease believe me, because I have years of suffering behind me:\n\n1. cvsps is broken and not useful for this purpose\n\n2. \"parsing the cvsps cache file\" is an absolutely minuscule part of\nwriting a CVS -> anything converter.  You think you're making good\nprogress, but you have no idea of what you are getting into.  Read [4]\nand really think about whether you want to reimplement a comparable set\nof features from scratch.  And remember that many of these features are\nnot optional bells and whistles; they are *needed for correctness*.\n\n> One thing is that this program uses bare git commands, not the fast-import\n> way.\n\nThis will absolutely kill performance for a large repository.  There is\na discussion of this issue in our mailing list archives and probably\nalso on the git mailing list.\n\n> Hence my first question: if I lighten git-cvsimport code, will that help\n> you for cvs2git?\n\nIf I polish up my roller skates, will that help you fix your car? ;-)\n\nMichael\n\n[1] http://cvs2svn.tigris.org/faq.html#repoaccess\n[2] http://cvs2svn.tigris.org/faq.html#testcase\n[3] http://selenic.com/pipermail/mercurial-devel/2008-February/004975.html\n[4] http://cvs2svn.tigris.org/features.html\n"}]}