{"thread":{"id":"46626","subject":"git svn show-externals output format","startedAt":"2017-08-19T08:25:25Z","lastAt":"2017-08-19T13:00:20Z","messageCount":3,"participants":["Alexander Groß","Andreas Heiduk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"326764","messageId":"CACcHa=NYgir8HDeR1ES9mKsqTQYk=90Z38csTgK-vfD=fQmHLg@mail.gmail.com","threadId":"46626","inReplyTo":null,"subject":"git svn show-externals output format","fromName":"Alexander Groß","fromEmail":"agross@therightstuff.de","sentAt":"2017-08-19T08:24:57Z","receivedAt":"2017-08-19T08:25:25Z","isPatch":false,"sender":{"key":"agross@therightstuff.de","avatar":null},"body":"Hi all,\n\nI am playing with svn-to-git conversion and wanted to have a look at\nthe svn:externals of a test SVN repository.\n\n$ git svn clone svn://svn.code.sf.net/p/svn-to-git/code/ svn-to-git-code\n\nThe SVN repo in HEAD revision contains three externals:\n\n$ cd svn-to-git-code\n$ git svn show-externals\n\n# /trunk/\n/trunk/https://svn.code.sf.net/p/gc-webdav/svn webdav\n/trunk/https://svn.code.sf.net/p/gc-webdav/svn@1 webdav-at-revision\n\n# /trunk/sub directory/\n/trunk/sub directory/https://svn.code.sf.net/p/gc-webdav/svn 'webdav in subdir'\n\nAn earlier version contains just one external:\n\n$ git svn show-externals --revision 8\n\n# /trunk/\n/trunk/webdav https://svn.code.sf.net/p/gc-webdav/svn/\n\nIt seems like the output is inconsistent. In SVN revision 8 the output\nlooks like it's formatted like\n<path> <URL>\n\nIn the HEAD revision it looks mangled\n<path prefix><URL> <path suffix>\n\nThis makes consuming the output of git svn show-externals in HEAD\ndifficult because the parts are not clearly separated by space and\nsometimes the path is the first element, sometimes it's a combination\nof first and last elements.\n\nI am able to checkout both revisions including externals using native svn.\n\nAm I doing something wrong?\n\nThanks!\n\n\nAlex\n-- \nAlexander Groß\nhttp://therightstuff.de/\n"},{"id":"326765","messageId":"165f5000-df53-0b62-6b06-d628a09d3076@gmail.com","threadId":"46626","inReplyTo":"CACcHa=NYgir8HDeR1ES9mKsqTQYk=90Z38csTgK-vfD=fQmHLg@mail.gmail.com","subject":"Re: git svn show-externals output format","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-08-19T10:14:37Z","receivedAt":"2017-08-19T10:14:46Z","isPatch":false,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 19.08.2017 um 10:24 schrieb Alexander Groß:\n\n> $ git svn show-externals\n> \n> # /trunk/\n> /trunk/https://svn.code.sf.net/p/gc-webdav/svn webdav\n> /trunk/https://svn.code.sf.net/p/gc-webdav/svn@1 webdav-at-revision\n\nThis is the (bugged) output of `git svn show-externals` for \"new\nstyle\" svn:externals.\n\n> \n> # /trunk/sub directory/\n> /trunk/sub directory/https://svn.code.sf.net/p/gc-webdav/svn 'webdav in subdir'\n> \n> An earlier version contains just one external:\n> \n> $ git svn show-externals --revision 8\n> \n> # /trunk/\n> /trunk/webdav https://svn.code.sf.net/p/gc-webdav/svn/\n\nAnd that the proper output for \"old style\" svn:externals.\n\n> It seems like the output is inconsistent. [...]\n\nSVN changed/extended the svn:externals format in version 1.5.\n(See [1] for details). One thing is - they switched the\norder of the arguments. `git svn` dit not pick up these changes\nand hence interprets the new format incorrectly. See [2] for \na similar discussion - it is from 2012!\n\n> This makes consuming the output of git svn show-externals in HEAD\n> difficult because the parts are not clearly separated by space and\n> sometimes the path is the first element, sometimes it's a combination\n> of first and last elements.\n\nMy practical solution was to skip the man in the middle and ask the SVN\nserver directly for the property values with something like that:\n\n    svn propget svn:externals -r 42 http://my-repo-url/path/to/ext/dir\n\nI used the output to hardcode the values during the conversion.\n\n\n\n[1] http://svnbook.red-bean.com/en/1.8/svn.advanced.externals.html\n[2] https://public-inbox.org/git/E59CCE45-6F92-4748-9B6E-2A562647904B@nikolaus-demmel.de/\n"},{"id":"326770","messageId":"CACcHa=M_9xaP83=gha3Z4KNd12MfC+C1hE3hOMv-qjQBtMt0Ww@mail.gmail.com","threadId":"46626","inReplyTo":"165f5000-df53-0b62-6b06-d628a09d3076@gmail.com","subject":"Re: git svn show-externals output format","fromName":"Alexander Groß","fromEmail":"agross@therightstuff.de","sentAt":"2017-08-19T12:59:53Z","receivedAt":"2017-08-19T13:00:20Z","isPatch":false,"sender":{"key":"agross@therightstuff.de","avatar":null},"body":"> My practical solution was to skip the man in the middle and ask the SVN\n> server directly for the property values\n\nThanks, that helped a lot!\n\nAlex\nBeste Grüße,\n\nAlex\n-- \nAlexander Groß\nhttp://therightstuff.de/\n\n\nOn Sat, Aug 19, 2017 at 12:14 PM, Andreas Heiduk <asheiduk@gmail.com> wrote:\n> Am 19.08.2017 um 10:24 schrieb Alexander Groß:\n>\n>> $ git svn show-externals\n>>\n>> # /trunk/\n>> /trunk/https://svn.code.sf.net/p/gc-webdav/svn webdav\n>> /trunk/https://svn.code.sf.net/p/gc-webdav/svn@1 webdav-at-revision\n>\n> This is the (bugged) output of `git svn show-externals` for \"new\n> style\" svn:externals.\n>\n>>\n>> # /trunk/sub directory/\n>> /trunk/sub directory/https://svn.code.sf.net/p/gc-webdav/svn 'webdav in subdir'\n>>\n>> An earlier version contains just one external:\n>>\n>> $ git svn show-externals --revision 8\n>>\n>> # /trunk/\n>> /trunk/webdav https://svn.code.sf.net/p/gc-webdav/svn/\n>\n> And that the proper output for \"old style\" svn:externals.\n>\n>> It seems like the output is inconsistent. [...]\n>\n> SVN changed/extended the svn:externals format in version 1.5.\n> (See [1] for details). One thing is - they switched the\n> order of the arguments. `git svn` dit not pick up these changes\n> and hence interprets the new format incorrectly. See [2] for\n> a similar discussion - it is from 2012!\n>\n>> This makes consuming the output of git svn show-externals in HEAD\n>> difficult because the parts are not clearly separated by space and\n>> sometimes the path is the first element, sometimes it's a combination\n>> of first and last elements.\n>\n> My practical solution was to skip the man in the middle and ask the SVN\n> server directly for the property values with something like that:\n>\n>     svn propget svn:externals -r 42 http://my-repo-url/path/to/ext/dir\n>\n> I used the output to hardcode the values during the conversion.\n>\n>\n>\n> [1] http://svnbook.red-bean.com/en/1.8/svn.advanced.externals.html\n> [2] https://public-inbox.org/git/E59CCE45-6F92-4748-9B6E-2A562647904B@nikolaus-demmel.de/\n"}]}