{"thread":{"id":"19152","subject":"Editing git-svn metadata","startedAt":"2009-05-02T01:02:56Z","lastAt":"2009-05-04T15:39:22Z","messageCount":2,"participants":["Orestis Markou","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112856","messageId":"24ACA1E2-9B33-412D-A426-FAF3CF683ADA@orestis.gr","threadId":"19152","inReplyTo":null,"subject":"Editing git-svn metadata","fromName":"Orestis Markou","fromEmail":"orestis@orestis.gr","sentAt":"2009-05-02T01:02:56Z","receivedAt":"2009-05-02T01:02:56Z","isPatch":false,"sender":{"key":"orestis@orestis.gr","avatar":"https://gravatar.com/avatar/6d9d19b6b9f9b8f26af63a025b0a73464ce93956537b70b2534e7ad54d5422d2?d=mp&s=160"},"body":"Hello,\n\nI couldn't find anything in the manpages for this, and I don't know  \nwhere else to look for it.\n\nAs mentioned here: http://article.gmane.org/gmane.comp.version-control.git/116382 \n  , an svn repository I'm working against has a weird layout on which  \ngit-svn chokes on. I'm working around that by using grafts to inform  \ngit about the history of the branches. It involves some manual work  \nbut it's fine.\n\nAnother problem I have (possibly linked) is that branches are only  \ndetected after the first commit to them - the commit that creates the  \nbranch is not recorded by git-svn at all. This forces me to do a  \n'dummy' commit from svn in order to even see the branch in git-svn.\n\nGiven that I have all the information I need (branch name, parent id),  \nis there any file I can manually edit to inform git-svn about my  \nbranches?\n\nAlternatively, and more usefully to git in general, perhaps I can have  \na look at the git-svn code and add some diagnostics to see what's  \nfailing, and provide a patch? I looked for a developer guide but  \ncouldn't find one (only how to write tests).\n\nRegards,\nOrestis\n--\norestis@orestis.gr\nhttp://orestis.gr/\n"},{"id":"112992","messageId":"49FF0C2A.6050503@drmicha.warpmail.net","threadId":"19152","inReplyTo":"24ACA1E2-9B33-412D-A426-FAF3CF683ADA@orestis.gr","subject":"Re: Editing git-svn metadata","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-05-04T15:39:22Z","receivedAt":"2009-05-04T15:39:22Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Orestis Markou venit, vidit, dixit 02.05.2009 03:02:\n> Hello,\n> \n> I couldn't find anything in the manpages for this, and I don't know  \n> where else to look for it.\n> \n> As mentioned here: http://article.gmane.org/gmane.comp.version-control.git/116382 \n>   , an svn repository I'm working against has a weird layout on which  \n> git-svn chokes on. I'm working around that by using grafts to inform  \n> git about the history of the branches. It involves some manual work  \n> but it's fine.\n> \n> Another problem I have (possibly linked) is that branches are only  \n> detected after the first commit to them - the commit that creates the  \n> branch is not recorded by git-svn at all. This forces me to do a  \n> 'dummy' commit from svn in order to even see the branch in git-svn.\n> \n> Given that I have all the information I need (branch name, parent id),  \n> is there any file I can manually edit to inform git-svn about my  \n> branches?\n> \n> Alternatively, and more usefully to git in general, perhaps I can have  \n> a look at the git-svn code and add some diagnostics to see what's  \n> failing, and provide a patch? I looked for a developer guide but  \n> couldn't find one (only how to write tests).\n\nIt may depend on how you create branches in svn. The usual way is to\ncopy from trunk (or another branch) in the way the attached script does.\nFor me, the relevant output is\n\n* master\n  remotes/mybranch\n  remotes/trunk\n\nwhich is pretty much what it should be. Do you create (empty) branches\nby doing a mkdir in an svn check out of the base dir (below trunk)?\n\nMichael\n\n--- %< ---\n#!/bin/bash\nrm -Rf svnrepo svnwc gitrepo\nsvnurl=\"file://localhost\"`pwd`/svnrepo\nsvnadmin create svnrepo\nsvn co $svnurl svnwc\n(\n cd svnwc\n mkdir trunk branches tags\n svn add trunk branches tags\n svn ci -m init\n (\n  cd trunk\n  echo a > a\n  svn add a\n  svn ci -m A\n  svn cp -m mybranch $svnurl/trunk $svnurl/branches/mybranch\n )\n)\ngit svn clone -s $svnurl gitrepo\n(\n cd gitrepo\n git branch -a\n)\n"}]}