{"thread":{"id":"16844","subject":"git-cvsimport fuzzy commit log matching?","startedAt":"2008-12-23T11:03:02Z","lastAt":"2008-12-23T15:16:43Z","messageCount":4,"participants":["Christoph Hellwig","Pierre Habouzit","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98597","messageId":"20081223110302.GA9376@lst.de","threadId":"16844","inReplyTo":null,"subject":"git-cvsimport fuzzy commit log matching?","fromName":"Christoph Hellwig","fromEmail":"hch@lst.de","sentAt":"2008-12-23T11:03:02Z","receivedAt":"2008-12-23T11:03:02Z","isPatch":false,"sender":{"key":"hch@lst.de","avatar":null},"body":"I'm currently trying to get clean git imports of the XFS userspace\nrepositories.  These are funky in the way they were initially kept in\nptools, and SGI-internal SCM that was built ontop of RCS which changeset\nadded ontop.  So we know that commits actually were done in atomic\nchangesets.  But ptools has the \"nice\" feature of allowing both per-file\nand per-changeset commits.   Due to the per-file commits git-cvsimport\noften misdetects a single changeset as multiple individual changes, ala:\n\n\ncommit 0d47d43b5878c6e7d7b516a793a82f0076d22089\nAuthor: Barry Naujok <bnaujok@sgi.com>\nDate:   Mon Jul 16 15:52:53 2007 +0000\n\n    Perform parallel processing based on AG stride/concat unit\n    Merge of master-melb:xfs-cmds:29143a by kenmcd.\n\n      Queue up AGs per thread based on ag stride\n\ncommit 1fa4685db126fd3071e008a6d18f9d51209ab305\nAuthor: Barry Naujok <bnaujok@sgi.com>\nDate:   Mon Jul 16 15:52:53 2007 +0000\n\n    Perform parallel processing based on AG stride/concat unit\n    Merge of master-melb:xfs-cmds:29143a by kenmcd.\n\n      Handle ag stride command line option and setup threads as required\n\ncommit a73288784e77c2411687f6778adb4c0b0f9dcdff\nAuthor: Barry Naujok <bnaujok@sgi.com>\nDate:   Mon Jul 16 15:52:53 2007 +0000\n\n    Perform parallel processing based on AG stride/concat unit\n    Merge of master-melb:xfs-cmds:29143a by kenmcd.\n\n      Execute bits changed from x-- to ---\n      Queue up AGs per thread based on ag stride\n\nand so on.\n\nAny idea how to tell git-cvsimport that if we have exactly the same\ntimestamp, and maybe the same author it really is the same changeset and\nwe want to merge the commit message?\n"},{"id":"98598","messageId":"20081223110641.GA29481@artemis.corp","threadId":"16844","inReplyTo":"20081223110302.GA9376@lst.de","subject":"Re: git-cvsimport fuzzy commit log matching?","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-12-23T11:06:41Z","receivedAt":"2008-12-23T11:06:41Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Tue, Dec 23, 2008 at 11:03:02AM +0000, Christoph Hellwig wrote:\n> I'm currently trying to get clean git imports of the XFS userspace\n> repositories.  These are funky in the way they were initially kept in\n> ptools, and SGI-internal SCM that was built ontop of RCS which changeset\n> added ontop.  So we know that commits actually were done in atomic\n> changesets.  But ptools has the \"nice\" feature of allowing both per-file\n> and per-changeset commits.   Due to the per-file commits git-cvsimport\n> often misdetects a single changeset as multiple individual changes, ala:\n> \n> \n> commit 0d47d43b5878c6e7d7b516a793a82f0076d22089\n> Author: Barry Naujok <bnaujok@sgi.com>\n> Date:   Mon Jul 16 15:52:53 2007 +0000\n> \n>     Perform parallel processing based on AG stride/concat unit\n>     Merge of master-melb:xfs-cmds:29143a by kenmcd.\n> \n>       Queue up AGs per thread based on ag stride\n> \n> commit 1fa4685db126fd3071e008a6d18f9d51209ab305\n> Author: Barry Naujok <bnaujok@sgi.com>\n> Date:   Mon Jul 16 15:52:53 2007 +0000\n> \n>     Perform parallel processing based on AG stride/concat unit\n>     Merge of master-melb:xfs-cmds:29143a by kenmcd.\n> \n>       Handle ag stride command line option and setup threads as required\n> \n> commit a73288784e77c2411687f6778adb4c0b0f9dcdff\n> Author: Barry Naujok <bnaujok@sgi.com>\n> Date:   Mon Jul 16 15:52:53 2007 +0000\n> \n>     Perform parallel processing based on AG stride/concat unit\n>     Merge of master-melb:xfs-cmds:29143a by kenmcd.\n> \n>       Execute bits changed from x-- to ---\n>       Queue up AGs per thread based on ag stride\n> \n> and so on.\n> \n> Any idea how to tell git-cvsimport that if we have exactly the same\n> timestamp, and maybe the same author it really is the same changeset and\n> we want to merge the commit message?\n\nWhy not using a fancy git-filterbranch script to squash them together\ninstead ? It's probably less work than to try to modify your cvs\nimporter to work the exact way you want.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"98605","messageId":"46a038f90812230453m4122e018l2cc22be3f40ab630@mail.gmail.com","threadId":"16844","inReplyTo":"20081223110302.GA9376@lst.de","subject":"Re: git-cvsimport fuzzy commit log matching?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-12-23T12:53:42Z","receivedAt":"2008-12-23T12:53:42Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Tue, Dec 23, 2008 at 9:03 AM, Christoph Hellwig <hch@lst.de> wrote:\n> Any idea how to tell git-cvsimport that if we have exactly the same\n> timestamp, and maybe the same author it really is the same changeset and\n> we want to merge the commit message?\n\nRight now, cvsimport relies on cvsps for this. cvsps compares author,\ntimestamp (with a fuzz factor 'cause cvs commits over slow networks or\nhosts can span minutes - you could dial down to 0, it's the -z flag)\n*and* commit msg.\n\nWhat you could do is\n\n 1 - run cvsps with export to a file (I've posted in this list how to\nrun it exactly as cvsimport does)\n 2 - post-process cvsps ouput with perl (there's a parser already in\ncvsimport ;-) )\n 3 - run cvsimport with the post-processed file\n\nOr postprocess the imported git tree as others have suggested.\n\nhth,\n\n\n\nmartin\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"98617","messageId":"20081223151643.GA18657@lst.de","threadId":"16844","inReplyTo":"46a038f90812230453m4122e018l2cc22be3f40ab630@mail.gmail.com","subject":"Re: git-cvsimport fuzzy commit log matching?","fromName":"Christoph Hellwig","fromEmail":"hch@lst.de","sentAt":"2008-12-23T15:16:43Z","receivedAt":"2008-12-23T15:16:43Z","isPatch":false,"sender":{"key":"hch@lst.de","avatar":null},"body":"On Tue, Dec 23, 2008 at 10:53:42AM -0200, Martin Langhoff wrote:\n> What you could do is\n> \n>  1 - run cvsps with export to a file (I've posted in this list how to\n> run it exactly as cvsimport does)\n>  2 - post-process cvsps ouput with perl (there's a parser already in\n> cvsimport ;-) )\n>  3 - run cvsimport with the post-processed file\n> \n> Or postprocess the imported git tree as others have suggested.\n\nInstead of post-processing I hacked cvsps.  It already has a different\nway to detect changesets when running in --bkcvs mode, and re-using that\none for ptools works great.\n"}]}