{"thread":{"id":"11995","subject":"All I wanted was git-fast-export","startedAt":"2008-02-09T17:27:17Z","lastAt":"2008-02-17T17:00:08Z","messageCount":9,"participants":["Paul Gardiner","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"68103","messageId":"47ADE275.3060109@glidos.net","threadId":"11995","inReplyTo":null,"subject":"All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-09T17:27:17Z","receivedAt":"2008-02-09T17:27:17Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"With your kind help, I've been able to convert a cvs repository\nto git, but the last several years commits start with a line\nsaying \"Summary;\" :-(  I thought it might not be hard to put\na filter between git-fast-export and git-fast-import to sort\nit out. Turns out though SuSE 10.3 has an old version of git\nwith git-fast-export missing.\n\nI thought I'd try building git-1.5.4-1.src.rpm. Resolved most\nof the dependencies, but I'm stuck with expat-devel and\nperl(Error).\n\nI installed Error-0.17012, but that seems to be the wrong\nperl(Error). Anybody know where I can find the correct one?\n\nSuSE 10.3 seems to have expat, but not expat-devel. I've\nfound expat-devel-2.0.1-4.i386.rpm, but that needs\nexpat-2.0.1-4, and SuSE 10.3 has expat-2.0.1-24. I can't\nfind expat-devel-2.0.1.24 anywhere.\n\nI could, I guess, replace my current expat-2.0.1-24 with\nexpat-2.0.1-4, but I don't know how to check my systems\ndependencies up front to see if that would be safe.\n\nAny ideas, anyone?\n\nP.\n"},{"id":"68108","messageId":"alpine.LSU.1.00.0802091803580.11591@racer.site","threadId":"11995","inReplyTo":"47ADE275.3060109@glidos.net","subject":"Re: All I wanted was git-fast-export","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-09T18:04:16Z","receivedAt":"2008-02-09T18:04:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 9 Feb 2008, Paul Gardiner wrote:\n\n> With your kind help, I've been able to convert a cvs repository\n> to git, but the last several years commits start with a line\n> saying \"Summary;\" :-(  I thought it might not be hard to put\n> a filter between git-fast-export and git-fast-import to sort\n> it out.\n\nThe better tool for this should be filter-branch.\n\nHth,\nDscho\n"},{"id":"68129","messageId":"47AE2CDF.4090208@glidos.net","threadId":"11995","inReplyTo":"alpine.LSU.1.00.0802091803580.11591@racer.site","subject":"Re: All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-09T22:44:47Z","receivedAt":"2008-02-09T22:44:47Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Sat, 9 Feb 2008, Paul Gardiner wrote:\n> \n>> With your kind help, I've been able to convert a cvs repository\n>> to git, but the last several years commits start with a line\n>> saying \"Summary;\" :-(  I thought it might not be hard to put\n>> a filter between git-fast-export and git-fast-import to sort\n>> it out.\n> \n> The better tool for this should be filter-branch.\n\nfilter-branch does look to be brilliant for this sort of thing,\nbut I don't think I can use it in my case. The git repository\nin question is a mirror of a live cvs repository, which I need\nto keep synced up. What I was thinking was to repeatedly do:\n\n   cvs rep  =>  git rep   => tidied git rep\n\n\nusing fromcvs/togit for the first step, and\ngit-fast-export/git-fast-import for the second. It doesn't\nlook to be the case that filter-branch can be used with\nthe source and target repositories being different, and\nif I tried having one git repository that I applied\ntidying to, then I don't think the syncing process would\nwork afterwards... or would it? Do you thing that changing\ncommit messages would mess up subsequent syncing? I\nguess I could try it and see.\n\nI think I need git 1.5.4 either way, and I still\nhaven't found a way to get that installed under SuSE 10.3\n\nP.\n"},{"id":"68136","messageId":"alpine.LSU.1.00.0802100054490.11591@racer.site","threadId":"11995","inReplyTo":"47AE2CDF.4090208@glidos.net","subject":"Re: All I wanted was git-fast-export","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-10T00:58:07Z","receivedAt":"2008-02-10T00:58:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 9 Feb 2008, Paul Gardiner wrote:\n\n> Johannes Schindelin wrote:\n> \n> > On Sat, 9 Feb 2008, Paul Gardiner wrote:\n> > \n> > > With your kind help, I've been able to convert a cvs repository to \n> > > git, but the last several years commits start with a line saying \n> > > \"Summary;\" :-( I thought it might not be hard to put a filter \n> > > between git-fast-export and git-fast-import to sort it out.\n> > \n> > The better tool for this should be filter-branch.\n> \n> filter-branch does look to be brilliant for this sort of thing,\n> but I don't think I can use it in my case.\n\nI beg to differ.  filter-branch does exactly the same as the fast-export | \nfilter | fast-import you prosed does: it rewrites history.\n\nThe thing is, filter-branch was _written for this purpose_.  So if you \nknow what commit you rewrote last, you can make the process faster/safer \nby issuing\n\n\t$ git filter-branch --msg-filter=\"<blabla>\" <old-commit>..master\n\nThere's also a further upside to filter-branch: at least until recently, \nit did not use any special features of newer git, but could be extracted \n(e.g. via gitweb) and used with older git (any git >= 1.5.3 should do, \nmaybe even older ones).\n\nHth,\nDscho\n\nP.S.: but you seem to be dead-set to upgrade.  No problem for me: just go \nahead and do what you must.\n"},{"id":"68185","messageId":"47AECCDC.3050500@glidos.net","threadId":"11995","inReplyTo":"alpine.LSU.1.00.0802100054490.11591@racer.site","subject":"Re: All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-10T10:07:24Z","receivedAt":"2008-02-10T10:07:24Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Sat, 9 Feb 2008, Paul Gardiner wrote:\n> \n>> Johannes Schindelin wrote:\n>>\n>>> On Sat, 9 Feb 2008, Paul Gardiner wrote:\n>>>\n>>>> With your kind help, I've been able to convert a cvs repository to \n>>>> git, but the last several years commits start with a line saying \n>>>> \"Summary;\" :-( I thought it might not be hard to put a filter \n>>>> between git-fast-export and git-fast-import to sort it out.\n>>> The better tool for this should be filter-branch.\n>> filter-branch does look to be brilliant for this sort of thing,\n>> but I don't think I can use it in my case.\n> \n> I beg to differ.  filter-branch does exactly the same as the fast-export | \n> filter | fast-import you prosed does: it rewrites history.\n> \n> The thing is, filter-branch was _written for this purpose_.  So if you \n> know what commit you rewrote last, you can make the process faster/safer \n> by issuing\n> \n> \t$ git filter-branch --msg-filter=\"<blabla>\" <old-commit>..master\n\nThat does look just what I need, but did you see the reason I thought I\ncouldn't use it? I need to repeatedly sync the git repository from a\nlive cvs repository, and repeatedly filter the new commit messages.\nI'd imagined that filtering the commit messages will mess up subsequent\nsyncing. That's why I thought I'd need a chaing of repositories\n\ncvs => git => tiedied git\n\nWhat do you think?\n\n> There's also a further upside to filter-branch: at least until recently, \n> it did not use any special features of newer git, but could be extracted \n> (e.g. via gitweb) and used with older git (any git >= 1.5.3 should do, \n> maybe even older ones).\n> \n> Hth,\n> Dscho\n> \n> P.S.: but you seem to be dead-set to upgrade.  No problem for me: just go \n> ahead and do what you must.\n\nGod no, not if I can help it. I've been performing surgery on my\npackages over the last couple of days, and I'm sure the whole\nsystem is going to fall over any minute. I'd love to be able to\nuse the version I have. It's 1.5.2.4 Is filter-branch likely to work\nwith that?\n\nP.\n"},{"id":"68206","messageId":"alpine.LSU.1.00.0802101248260.11591@racer.site","threadId":"11995","inReplyTo":"47AECCDC.3050500@glidos.net","subject":"Re: All I wanted was git-fast-export","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-10T12:51:59Z","receivedAt":"2008-02-10T12:51:59Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[please do not look the other way when you respond to me, i.e. do not cull \nme from the Cc: list.  Thankyouverymuch]\n\nOn Sun, 10 Feb 2008, Paul Gardiner wrote:\n\n> Johannes Schindelin wrote:\n> \n> > The thing is, filter-branch was _written for this purpose_.  So if you \n> > know what commit you rewrote last, you can make the process \n> > faster/safer by issuing\n> > \n> > \t$ git filter-branch --msg-filter=\"<blabla>\" <old-commit>..master\n> \n> That does look just what I need, but did you see the reason I thought I \n> couldn't use it? I need to repeatedly sync the git repository from a \n> live cvs repository, and repeatedly filter the new commit messages.\n\nOh, I thought you saw why I put in that \"<old-commit>...\".  You do not \nreally need it, as filter-branch will come up with the _same_ commit \nhashes, unless _something_ was changed.\n\nIOW if you have only commits without that \"Summary: \" prefix, the \nfilter-branch call will be a (not so cheap) no-op.\n\nBut of course, I meant to suggest (admittedly, in a very short short-hand) \nthat you use \"git filter-branch ... origin@{1}..origin\" after cvsimport.\n\nHth,\nDscho\n"},{"id":"68218","messageId":"47AF1ACB.1030609@glidos.net","threadId":"11995","inReplyTo":"alpine.LSU.1.00.0802101248260.11591@racer.site","subject":"Re: All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-10T15:39:55Z","receivedAt":"2008-02-10T15:39:55Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"Johannes Schindelin wrote:\n> But of course, I meant to suggest (admittedly, in a very short short-hand) \n> that you use \"git filter-branch ... origin@{1}..origin\" after cvsimport.\n\nSorry to be a bit thick, but I'm very new to git. Can you spell it out\nfor me? Where's that going to get the branch from? Where will the\nrewritten one end up? And where's the backup old versions of what is\nrewritten going to end up?\n\nIt looks very clever, like it might be a way of accessing filtering\none repository into another, but I haven't quite twigged how this\nall works yet.\n\nP.\n"},{"id":"68617","messageId":"47B2B3FA.4060809@glidos.net","threadId":"11995","inReplyTo":"alpine.LSU.1.00.0802101248260.11591@racer.site","subject":"Re: All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-13T09:10:18Z","receivedAt":"2008-02-13T09:10:18Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> [please do not look the other way when you respond to me, i.e. do not cull \n> me from the Cc: list.  Thankyouverymuch]\n> \n> On Sun, 10 Feb 2008, Paul Gardiner wrote:\n> \n>> Johannes Schindelin wrote:\n>>\n>>> The thing is, filter-branch was _written for this purpose_.  So if you \n>>> know what commit you rewrote last, you can make the process \n>>> faster/safer by issuing\n>>>\n>>> \t$ git filter-branch --msg-filter=\"<blabla>\" <old-commit>..master\n>> That does look just what I need, but did you see the reason I thought I \n>> couldn't use it? I need to repeatedly sync the git repository from a \n>> live cvs repository, and repeatedly filter the new commit messages.\n> \n> Oh, I thought you saw why I put in that \"<old-commit>...\".  You do not \n> really need it, as filter-branch will come up with the _same_ commit \n> hashes, unless _something_ was changed.\n\nThanks, that indeed works. Using filter-branch, using just --msg-filter\ndoes the job without altering hashes, and fromcvs/togit syncs up\nignoring the alteration. My message filter is idempotent, so I can\nrerun it after every sync (or I might try your suggestion above\nto make it more efficient).\n\nP.\n"},{"id":"68996","messageId":"47B86818.7010706@glidos.net","threadId":"11995","inReplyTo":"alpine.LSU.1.00.0802101248260.11591@racer.site","subject":"Re: All I wanted was git-fast-export","fromName":"Paul Gardiner","fromEmail":"osronline@glidos.net","sentAt":"2008-02-17T17:00:08Z","receivedAt":"2008-02-17T17:00:08Z","isPatch":false,"sender":{"key":"osronline@glidos.net","avatar":null},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> [please do not look the other way when you respond to me, i.e. do not cull \n> me from the Cc: list.  Thankyouverymuch]\n> \n> On Sun, 10 Feb 2008, Paul Gardiner wrote:\n> \n>> Johannes Schindelin wrote:\n>>\n>>> The thing is, filter-branch was _written for this purpose_.  So if you \n>>> know what commit you rewrote last, you can make the process \n>>> faster/safer by issuing\n>>>\n>>> \t$ git filter-branch --msg-filter=\"<blabla>\" <old-commit>..master\n>> That does look just what I need, but did you see the reason I thought I \n>> couldn't use it? I need to repeatedly sync the git repository from a \n>> live cvs repository, and repeatedly filter the new commit messages.\n> \n> Oh, I thought you saw why I put in that \"<old-commit>...\".  You do not \n> really need it, as filter-branch will come up with the _same_ commit \n> hashes, unless _something_ was changed.\n> \n> IOW if you have only commits without that \"Summary: \" prefix, the \n> filter-branch call will be a (not so cheap) no-op.\n> \n> But of course, I meant to suggest (admittedly, in a very short short-hand) \n> that you use \"git filter-branch ... origin@{1}..origin\" after cvsimport.\n\nI'm still struggling a bit to understand ref specs. I'm using --all at\nthe moment, but that's very slow. What I need is to filter the new\ncommits of all branches. Will origin@{1}..origin do that, or does\nit just affect master?\n\nP.\n"}]}