{"thread":{"id":"29445","subject":"Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches","startedAt":"2012-01-25T18:04:26Z","lastAt":"2012-01-27T04:34:14Z","messageCount":4,"participants":["Christine Bauers","Carlos Martín Nieto","David Barr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183085","messageId":"4F20442A.1080005@gmx.de","threadId":"29445","inReplyTo":null,"subject":"Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches","fromName":"Christine Bauers","fromEmail":"c.bauers@gmx.de","sentAt":"2012-01-25T18:04:26Z","receivedAt":"2012-01-25T18:04:26Z","isPatch":false,"sender":{"key":"c.bauers@gmx.de","avatar":null},"body":"Hi there,\n\nI´m trying to migrate a repository from svn to git which branches and \ntags with the following migration script:\n\ngit svn clone --no-metadata --stdlayout --A ../users.txt \nsvn://host/svn/project/subproject subproject\n\ncd subproject\ngit config svn.authorsfile ../../users.txt\ngit svn fetch\n\ngit checkout -b branch1 remotes/branch1\ngit checkout -b branch2 remotes/branch2\ngit checkout -b branch3 remotes/branch3\n\ngit checkout -b src_v1 remotes/tags/src\ngit checkout master\ngit tag src src_v1\ngit branch -D src_v1\n\ngit checkout -b WebContent_v1 remotes/tags/WebContent\ngit checkout master\ngit tag WebContent WebContent_v1\ngit branch -D WebContent_v1\n\nand get the follwoing errors:\n\nW: Ignoring error from SVN, path probably does not exist: (160013): \nFilesystem has no item: Datei nicht gefunden: Revision 8966, Pfad \nÂ»subproject«\nW: Do not be alarmed at the above message git-svn is just searching \naggressively for old history.\nThis may take a while on large repositories\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'remotes/branch1' which can not be resolved \nas commit?\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'remotes/branch2 which can not be resolved as \ncommit?\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'remotes/branch3' which can not be resolved \nas commit?\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'remotes/tags/src' which can not be resolved \nas commit?\nerror: pathspec 'master' did not match any file(s) known to git.\nfatal: Failed to resolve 'src_v1' as a valid ref.\nerror: branch 'src_v1' not found.\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'remotes/tags/WebContent' which can not be \nresolved as commit?\nerror: pathspec 'master' did not match any file(s) known to git.\nfatal: Failed to resolve 'WebContent_v1' as a valid ref.\nerror: branch 'WebContent_v1' not found.\n\nHow do I solve this problem?\n\nGreetings\nChristine\n"},{"id":"183089","messageId":"1327518563.31804.82.camel@centaur.lab.cmartin.tk","threadId":"29445","inReplyTo":"4F20442A.1080005@gmx.de","subject":"Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches","fromName":"Carlos Martín Nieto","fromEmail":"cmn@elego.de","sentAt":"2012-01-25T19:09:23Z","receivedAt":"2012-01-25T19:09:23Z","isPatch":false,"sender":{"key":"cmn@elego.de","avatar":"https://avatars.githubusercontent.com/u/335443?v=4"},"body":"On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:\n> Hi there,\n> \n> I´m trying to migrate a repository from svn to git which branches and \n> tags with the following migration script:\n> \n> git svn clone --no-metadata --stdlayout --A ../users.txt \n> svn://host/svn/project/subproject subproject\n> \n> cd subproject\n> git config svn.authorsfile ../../users.txt\n> git svn fetch\n> \n> git checkout -b branch1 remotes/branch1\n> git checkout -b branch2 remotes/branch2\n> git checkout -b branch3 remotes/branch3\n> \n> git checkout -b src_v1 remotes/tags/src\n> git checkout master\n> git tag src src_v1\n> git branch -D src_v1\n> \n> git checkout -b WebContent_v1 remotes/tags/WebContent\n> git checkout master\n> git tag WebContent WebContent_v1\n> git branch -D WebContent_v1\n> \n> and get the follwoing errors:\n> \n> W: Ignoring error from SVN, path probably does not exist: (160013): \n> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad \n> Â»subproject«\n> W: Do not be alarmed at the above message git-svn is just searching \n> aggressively for old history.\n> This may take a while on large repositories\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'remotes/branch1' which can not be resolved \n> as commit?\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'remotes/branch2 which can not be resolved as \n> commit?\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'remotes/branch3' which can not be resolved \n> as commit?\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'remotes/tags/src' which can not be resolved \n> as commit?\n> error: pathspec 'master' did not match any file(s) known to git.\n> fatal: Failed to resolve 'src_v1' as a valid ref.\n> error: branch 'src_v1' not found.\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'remotes/tags/WebContent' which can not be \n> resolved as commit?\n> error: pathspec 'master' did not match any file(s) known to git.\n> fatal: Failed to resolve 'WebContent_v1' as a valid ref.\n> error: branch 'WebContent_v1' not found.\n> \n> How do I solve this problem?\n\nFirst try to figure out where the problem happens. It could be that\ngit-svn isn't recognising the branches properly, or that the layout\nisn't what it expects or any number of things.\n\nWhat layout does the repo have? Does it correspond to what git-svn is\nexpecting? All those error messages come from the fact that you're\ntelling git some starting points that it can't find. Make sure those\nexist and they have the name you're giving. What does `git branch -a`\nsay? You're presumably not giving us the real names, so we can't tell if\nthere are problems there.\n\nIf you're looking to migrate completely, something like\nsvn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export\n) might get you there better.\n\n   cmn\n\n\n"},{"id":"183114","messageId":"4F2113DB.5030401@gmx.de","threadId":"29445","inReplyTo":"1327518563.31804.82.camel@centaur.lab.cmartin.tk","subject":"Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches","fromName":"Christine Bauers","fromEmail":"c.bauers@gmx.de","sentAt":"2012-01-26T08:50:35Z","receivedAt":"2012-01-26T08:50:35Z","isPatch":false,"sender":{"key":"c.bauers@gmx.de","avatar":null},"body":"Am 25.01.2012 20:09, schrieb Carlos Martín Nieto:\n> On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:\n>> Hi there,\n>>\n>> I´m trying to migrate a repository from svn to git which branches and\n>> tags with the following migration script:\n>>\n>> git svn clone --no-metadata --stdlayout --A ../users.txt\n>> svn://host/svn/project/subproject subproject\n>>\n>> cd subproject\n>> git config svn.authorsfile ../../users.txt\n>> git svn fetch\n>>\n>> git checkout -b branch1 remotes/branch1\n>> git checkout -b branch2 remotes/branch2\n>> git checkout -b branch3 remotes/branch3\n>>\n>> git checkout -b src_v1 remotes/tags/src\n>> git checkout master\n>> git tag src src_v1\n>> git branch -D src_v1\n>>\n>> git checkout -b WebContent_v1 remotes/tags/WebContent\n>> git checkout master\n>> git tag WebContent WebContent_v1\n>> git branch -D WebContent_v1\n>>\n>> and get the follwoing errors:\n>>\n>> W: Ignoring error from SVN, path probably does not exist: (160013):\n>> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad\n>> Â»subproject«\n>> W: Do not be alarmed at the above message git-svn is just searching\n>> aggressively for old history.\n>> This may take a while on large repositories\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch1' which can not be resolved\n>> as commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch2 which can not be resolved as\n>> commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch3' which can not be resolved\n>> as commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/tags/src' which can not be resolved\n>> as commit?\n>> error: pathspec 'master' did not match any file(s) known to git.\n>> fatal: Failed to resolve 'src_v1' as a valid ref.\n>> error: branch 'src_v1' not found.\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/tags/WebContent' which can not be\n>> resolved as commit?\n>> error: pathspec 'master' did not match any file(s) known to git.\n>> fatal: Failed to resolve 'WebContent_v1' as a valid ref.\n>> error: branch 'WebContent_v1' not found.\n>>\n>> How do I solve this problem?\n> First try to figure out where the problem happens. It could be that\n> git-svn isn't recognising the branches properly, or that the layout\n> isn't what it expects or any number of things.\n>\n> What layout does the repo have? Does it correspond to what git-svn is\n> expecting? All those error messages come from the fact that you're\n> telling git some starting points that it can't find. Make sure those\n> exist and they have the name you're giving. What does `git branch -a`\n> say? You're presumably not giving us the real names, so we can't tell if\n> there are problems there.\n>\n> If you're looking to migrate completely, something like\n> svn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export\n> ) might get you there better.\n>\n>     cmn\n\n\nThanks for your answer. I would say the problem happens while cloning the project, because git branch -a and git branch -r says nothing. The question is why aren´t there any branches? Here is the structure of the project:\n\n\nmarketplace\n\n     braches\n\n         lyth_dev\n\n         meinbestand_suche\n\n         umkreis_suche\n\n     tags\n\n         src\n\n         WebContent\n\n     trunk\n\n         src\n\n         WebContent\n\n     trunk_112233\n\n         src\n\n         WebContent\n\nAnd here again the script:\n\n\ngit svn clone --no-metadata --stdlayout --A ../users.txt svn://host/svn/projects/marketplace marketplace\n\ncd marketplace\n\ngit config svn.authorsfile ../../users.txt\n\ngit svn fetch\n\n#Checkout Branches\n\ngit checkout -b lyth_dev remotes/lyth_dev\n\ngit checkout -b meinbestand_suche remotes/meinbestand_suche\n\ngit checkout -b umkreis_suche remotes/umkreis_suche\n\n\n#Checkout der tags\n\ngit checkout -b src_v1 remotes/tags/src\n\ngit checkout master\n\ngit tag src src_v1\n\ngit branch -D src_v1\n\ngit checkout -b WebContent_v1 remotes/tags/WebContent\n\ngit checkout master\n\ngit tag WebContent WebContent_v1\n\ngit branch -D WebContent_v1\n\nIs there something wrong with this script? Or does the errors maybe occurs because there is a trunk_112233. The log file says the following:\n\nInitialized empty Git repository in c:/project/marketplace/.git/\nChecked through r8445\nChecked through r8545\nChecked through r8645\nChecked through r8745\nChecked through r8845\nChecked through r8945\nChecked through r8968\nChecked through r8968\n\nAnd that´s all. It says nothing about references.\n\nDo you have any ideas?\n\nThanks\n"},{"id":"183156","messageId":"CAFfmPPPCuGmgomqjPj_5NogPpiq+tfGSe8mjtqwc_nkWq6Ea0Q@mail.gmail.com","threadId":"29445","inReplyTo":"1327518563.31804.82.camel@centaur.lab.cmartin.tk","subject":"Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches","fromName":"David Barr","fromEmail":"davidbarr@google.com","sentAt":"2012-01-27T04:34:14Z","receivedAt":"2012-01-27T04:34:14Z","isPatch":false,"sender":{"key":"davidbarr@google.com","avatar":"https://avatars.githubusercontent.com/u/220594?v=4"},"body":"Hi,\n\nA lot of work has occurred on the version of svn-fe within the git tree.\nJonathan Nieder is the nominal maintainer of that effort.\nHe has just requested that the most stable set of changes be merged.\n\n--\nDavid Barr\n\nFrom Jonathan's pull request:\n\nJunio, please pull\n\n git://repo.or.cz/git/jrn.git svn-fe\n\nto get the following changes since commit\nec014eac0e9e6f30cbbca616090fa2ecf74797e7:\n\n Git 1.7.5 (2011-04-23 23:36:32 -0700)\n\nup to c5bcbcdcfa1e2a1977497cb3a342c0365c8d78d6:\n\n vcs-svn: reset first_commit_done in fast_export_init (2011-06-23\n10:04:36 -0500)\n\nOn Thu, Jan 26, 2012 at 6:09 AM, Carlos Martín Nieto <cmn@elego.de> wrote:\n> On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:\n>> Hi there,\n>>\n>> I´m trying to migrate a repository from svn to git which branches and\n>> tags with the following migration script:\n>>\n>> git svn clone --no-metadata --stdlayout --A ../users.txt\n>> svn://host/svn/project/subproject subproject\n>>\n>> cd subproject\n>> git config svn.authorsfile ../../users.txt\n>> git svn fetch\n>>\n>> git checkout -b branch1 remotes/branch1\n>> git checkout -b branch2 remotes/branch2\n>> git checkout -b branch3 remotes/branch3\n>>\n>> git checkout -b src_v1 remotes/tags/src\n>> git checkout master\n>> git tag src src_v1\n>> git branch -D src_v1\n>>\n>> git checkout -b WebContent_v1 remotes/tags/WebContent\n>> git checkout master\n>> git tag WebContent WebContent_v1\n>> git branch -D WebContent_v1\n>>\n>> and get the follwoing errors:\n>>\n>> W: Ignoring error from SVN, path probably does not exist: (160013):\n>> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad\n>> Â»subproject«\n>> W: Do not be alarmed at the above message git-svn is just searching\n>> aggressively for old history.\n>> This may take a while on large repositories\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch1' which can not be resolved\n>> as commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch2 which can not be resolved as\n>> commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/branch3' which can not be resolved\n>> as commit?\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/tags/src' which can not be resolved\n>> as commit?\n>> error: pathspec 'master' did not match any file(s) known to git.\n>> fatal: Failed to resolve 'src_v1' as a valid ref.\n>> error: branch 'src_v1' not found.\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'remotes/tags/WebContent' which can not be\n>> resolved as commit?\n>> error: pathspec 'master' did not match any file(s) known to git.\n>> fatal: Failed to resolve 'WebContent_v1' as a valid ref.\n>> error: branch 'WebContent_v1' not found.\n>>\n>> How do I solve this problem?\n>\n> First try to figure out where the problem happens. It could be that\n> git-svn isn't recognising the branches properly, or that the layout\n> isn't what it expects or any number of things.\n>\n> What layout does the repo have? Does it correspond to what git-svn is\n> expecting? All those error messages come from the fact that you're\n> telling git some starting points that it can't find. Make sure those\n> exist and they have the name you're giving. What does `git branch -a`\n> say? You're presumably not giving us the real names, so we can't tell if\n> there are problems there.\n>\n> If you're looking to migrate completely, something like\n> svn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export\n> ) might get you there better.\n>\n>   cmn\n"}]}