{"thread":{"id":"28484","subject":"Fwd: git svn with non-standard svn layout","startedAt":"2011-09-24T18:37:27Z","lastAt":"2011-09-25T03:45:50Z","messageCount":2,"participants":["Chris Harris","Phil Hord"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"176133","messageId":"CANPpUWxnp3-ySO3oBEsWTQA=oWXEzKS1bddP9LjAsR1EyPxbVQ@mail.gmail.com","threadId":"28484","inReplyTo":"CANPpUWyX+n7kMKZpCV=Oy=UmJb=9H=uZseYzU2-h1FLh2nzg8w@mail.gmail.com","subject":"Fwd: git svn with non-standard svn layout","fromName":"Chris Harris","fromEmail":"chris.harris123@gmail.com","sentAt":"2011-09-24T18:37:27Z","receivedAt":"2011-09-24T18:37:27Z","isPatch":false,"sender":{"key":"chris.harris123@gmail.com","avatar":null},"body":"I am using  git version 1.7.6.4 built from the latest stable source on\ngithub.   Running Ubuntu with kernel 2.6.38-11-generic\n\nI can't seem to git git svn to see my branches correctly.\nUnfortunately my svn repository is not open source, so I can not post\nit here, but I will try to explain my issue.\nWe use a non standard svn layout like the following\nbranches\n        V4.1\n                V4.1.0\n                V4.1.1\ndev\n\n\ndev is our trunk, and our branches have 2 levels.\nI first use git init, then setup my config as follows\n[svn-remote \"svn\"]\nurl = file:///home/chris/svnrepo\nfetch = dev:refs/remotes/trunk\nbranches = branches/V4.1/{V4.1.1}:refs/remotes/branches/*\nFor this example I am just trying to make a single branch work.\nAfter a fetch all revisions are ok. master correctly points to\nremotes/trunk,but gitk shows the following:\n\no remotes/branches/V4.1.1\n|\no some commit\n|\n|\n|    o master - remotes/trunk\n|    |\n|    o another commit\n|    /\n|\netc\n( sorry for the bad ascii art. )\nMy issue is that trunk ( master ) appears to be a  branch from V4.1.1\ninstead of  V4.1.1 being a branch from trunk ( master )\ngit log --graph shows the same structure.\nAny suggestions on how to configure this so git svn maps my\nnon-standard layout correctly?\nThank you\nChris\n"},{"id":"176152","messageId":"CABURp0qcS4qNuKDjC=g2tak+1eQWyzgVj_8ac9u1mdm4uX0yMg@mail.gmail.com","threadId":"28484","inReplyTo":"CANPpUWxnp3-ySO3oBEsWTQA=oWXEzKS1bddP9LjAsR1EyPxbVQ@mail.gmail.com","subject":"Re: git svn with non-standard svn layout","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2011-09-25T03:45:50Z","receivedAt":"2011-09-25T03:45:50Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sat, Sep 24, 2011 at 2:37 PM, Chris Harris <chris.harris123@gmail.com> wrote:\n> I am using  git version 1.7.6.4 built from the latest stable source on\n> github.   Running Ubuntu with kernel 2.6.38-11-generic\n>\n> I can't seem to git git svn to see my branches correctly.\n> Unfortunately my svn repository is not open source, so I can not post\n> it here, but I will try to explain my issue.\n> We use a non standard svn layout like the following\n> branches\n>         V4.1\n>                 V4.1.0\n>                 V4.1.1\n> dev\n>\n>\n> dev is our trunk, and our branches have 2 levels.\n> I first use git init, then setup my config as follows\n> [svn-remote \"svn\"]\n> url = file:///home/chris/svnrepo\n> fetch = dev:refs/remotes/trunk\n> branches = branches/V4.1/{V4.1.1}:refs/remotes/branches/*\n> For this example I am just trying to make a single branch work.\n> After a fetch all revisions are ok. master correctly points to\n> remotes/trunk,but gitk shows the following:\n>\n> o remotes/branches/V4.1.1\n> |\n> o some commit\n> |\n> |\n> |    o master - remotes/trunk\n> |    |\n> |    o another commit\n> |    /\n> |\n> etc\n> ( sorry for the bad ascii art. )\n> My issue is that trunk ( master ) appears to be a  branch from V4.1.1\n> instead of  V4.1.1 being a branch from trunk ( master )\n\nIn git's estimation,  there is no difference between these two cases.\nVisually you may think there is a difference, but graphically (in the\n\"network graph\" sense of the word) they are exactly the same thing.\n\nConsider this history:\no---o---A---B---C <== trunk\n         \\\n          D---E---F  <== V4.1.1\n\nCompare it to this \"other\" history:\n          B---C <== trunk\n         /\no---o---A---D---E---F  <== V4.1.1\n\nYou might say the first one looks \"right\" and the second one looks\n\"wrong\".  But in fact, they are the same graph.  They both say that\nB's parent is A and D's parent is A.  B and D share a common ancestor\nat A.\n\nHere's another view:\n          B---C <== trunk\n         /\no---o---A\n         \\\n          D---E---F  <== V4.1.1\n\nYou may want to read this nice description of the DAG:\nhttp://eagain.net/articles/git-for-computer-scientists/\n\n> git log --graph shows the same structure.\n> Any suggestions on how to configure this so git svn maps my\n> non-standard layout correctly?\n\nTry git log --graph --date-order to see a slightly different take on things.\n\nPhil\n"}]}