{"thread":{"id":"40638","subject":"git svn clone clone php/pear/Net_LDAP2 misses tags and branches","startedAt":"2015-10-25T14:43:25Z","lastAt":"2015-10-25T19:25:58Z","messageCount":5,"participants":["Christian Weiske","Edmundo Carmona Antoranz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"272199","messageId":"20151025154325.36eddb4c@bogo","threadId":"40638","inReplyTo":null,"subject":"git svn clone clone php/pear/Net_LDAP2 misses tags and branches","fromName":"Christian Weiske","fromEmail":"cweiske@cweiske.de","sentAt":"2015-10-25T14:43:25Z","receivedAt":"2015-10-25T14:43:25Z","isPatch":false,"sender":{"key":"cweiske@cweiske.de","avatar":"https://gravatar.com/avatar/baa4e986ac6bb3f3715de5b08727be61d33afb4b03e792eb6db2f184a61626d6?d=mp&s=160"},"body":"Hi,\n\n\nUsing git 2.6.2 to clone an SVN repository misses out branches and tags.\n\nThe clone command:\n\n$ git svn clone --trunk=trunk --tags=tags --branches=branches\n  --prefix=origin/\n  https://svn.php.net/repository/pear/packages/Net_LDAP2 -r 255346\n\nThe final repository's tag and branch list is empty.\n\nThere are tags and branches, though - see the web interface at\nhttp://svn.php.net/viewvc/pear/packages/Net_LDAP2/\n\nWhat am I doing wrong here?\n\n-- \nRegards/Mit freundlichen Grüßen\nChristian Weiske\n\n-=≡ Geeking around in the name of science since 1982 ≡=-\n"},{"id":"272201","messageId":"CAOc6etYvzv+MFyTXk0zU673b1GypyUbTOuiVyS35PS4ROFHztg@mail.gmail.com","threadId":"40638","inReplyTo":"20151025154325.36eddb4c@bogo","subject":"Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-10-25T15:32:48Z","receivedAt":"2015-10-25T15:32:48Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"Using -r single-revision-number (against tha same repo), I was not\nable to pull much (on that revision only the standard layout was set\nup so nothing would come out for git)\n\nDid you try with -r revision-number:HEAD?\n\n\n.\n.\n.\nr255572 = 73d7692d844ee6baae8b4b2e5fc0f07a4118d09e (refs/remotes/svn/trunk)\n       M       package2.xml\nr255574 = d1f380277cb6a4d096d71e3a83942bb17dabf041 (refs/remotes/svn/trunk)\nFound possible branch point:\nhttps://svn.php.net/repository/pear/packages/Net_LDAP2/trunk =>\nhttps://svn.php.net/repository/pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2\n, 255574\nFound branch parent: (refs/remotes/svn/tags/RELEASE_2_0_0RC2)\nd1f380277cb6a4d096d71e3a83942bb17dabf041\nFollowing parent with do_switch\n       D       LICENSE\n       D       tests/ldif_data/unsorted_w50_WIN.ldif\nSuccessfully followed parent\nW: -empty_dir: LICENSE\nW: -empty_dir: tests/ldif_data/unsorted_w50_WIN.ldif\nr255575 = d37158da793aee8692a6dca23870b9d2e3baaf18\n(refs/remotes/svn/tags/RELEASE_2_0_0RC2)\n       M       package2.xml\nr255576 = 05d71ac6543430b119232714334b3d836d20bfc8 (refs/remotes/svn/trunk)\n       M       package2.xml\n       M       LDAP2/Entry.php\n.\n.\n.\n\n\nOn Sun, Oct 25, 2015 at 8:43 AM, Christian Weiske <cweiske@cweiske.de> wrote:\n> Hi,\n>\n>\n> Using git 2.6.2 to clone an SVN repository misses out branches and tags.\n>\n> The clone command:\n>\n> $ git svn clone --trunk=trunk --tags=tags --branches=branches\n>   --prefix=origin/\n>   https://svn.php.net/repository/pear/packages/Net_LDAP2 -r 255346\n>\n> The final repository's tag and branch list is empty.\n>\n> There are tags and branches, though - see the web interface at\n> http://svn.php.net/viewvc/pear/packages/Net_LDAP2/\n>\n> What am I doing wrong here?\n>\n> --\n> Regards/Mit freundlichen Grüßen\n> Christian Weiske\n>\n> -=≡ Geeking around in the name of science since 1982 ≡=-\n"},{"id":"272203","messageId":"20151025173033.28346d49@bogo","threadId":"40638","inReplyTo":"CAOc6etYvzv+MFyTXk0zU673b1GypyUbTOuiVyS35PS4ROFHztg@mail.gmail.com","subject":"Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches","fromName":"Christian Weiske","fromEmail":"cweiske@cweiske.de","sentAt":"2015-10-25T16:30:33Z","receivedAt":"2015-10-25T16:30:33Z","isPatch":false,"sender":{"key":"cweiske@cweiske.de","avatar":"https://gravatar.com/avatar/baa4e986ac6bb3f3715de5b08727be61d33afb4b03e792eb6db2f184a61626d6?d=mp&s=160"},"body":"Hello Edmundo,\n\n\n> Using -r single-revision-number (against tha same repo), I was not\n> able to pull much (on that revision only the standard layout was set\n> up so nothing would come out for git)\n\nIt's actually the standard layout here; I only used the single\nparameters to rule out problems with --stdlayout.\n\n\n> Did you try with -r revision-number:HEAD?\n\nGood idea. I tried it, and now I have the tags and branches:\n\n$ git svn clone --stdlayout\n  https://svn.php.net/repository/pear/packages/Net_LDAP2\n  -r 255346:HEAD\n...\n\n$ cd Net_LDAP2\n$ git br -a\n* master\n  remotes/origin/implementingPagedSearches_PHP5.4\n  remotes/origin/tags/Net_LDAP2-2.0.10\n  remotes/origin/tags/Net_LDAP2-2.0.12\n...\n  remotes/origin/trunk\n\nThanks!\n\n\nIs there a way to convert the tags branches into real tags\nautomatically?\n\n\n-- \nRegards/Mit freundlichen Grüßen\nChristian Weiske\n\n-=≡ Geeking around in the name of science since 1982 ≡=-\n"},{"id":"272208","messageId":"20151025194851.793f8c64@bogo","threadId":"40638","inReplyTo":"20151025173033.28346d49@bogo","subject":"Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches","fromName":"Christian Weiske","fromEmail":"cweiske@cweiske.de","sentAt":"2015-10-25T18:48:51Z","receivedAt":"2015-10-25T18:48:51Z","isPatch":false,"sender":{"key":"cweiske@cweiske.de","avatar":"https://gravatar.com/avatar/baa4e986ac6bb3f3715de5b08727be61d33afb4b03e792eb6db2f184a61626d6?d=mp&s=160"},"body":"Hello Christian,\n\n\n> > Did you try with -r revision-number:HEAD?\n> \n> Good idea. I tried it, and now I have the tags and branches:\n\nUnfortunately, the tag branches only have a single commit and have no\nrelation to the trunk branch:\n\n$ git log --oneline origin/tags/Net_LDAP2-2.0.12\n0bc9db1 Tagging the 2.0.12 release\n$\n\nWhat can I do against that?\n\n-- \nRegards/Mit freundlichen Grüßen\nChristian Weiske\n\n-=≡ Geeking around in the name of science since 1982 ≡=-\n"},{"id":"272210","messageId":"CAOc6etbD24Fxupb8uwp8daZP6BfViR_sN_E91mtnkL_gUgU-Mw@mail.gmail.com","threadId":"40638","inReplyTo":"20151025194851.793f8c64@bogo","subject":"Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-10-25T19:25:58Z","receivedAt":"2015-10-25T19:25:58Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"I think there's something \"odd\" in the way that branch was created. If\nI take a look at another branch:\n\n$ svn log -v --stop-on-copy\nhttps://svn.php.net/repository/pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2\n------------------------------------------------------------------------\nr255575 | cvs2svn | 2008-03-20 03:37:53 -0600 (Thu, 20 Mar 2008) | 1 line\nChanged paths:\n  A /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2 (from\n/pear/packages/Net_LDAP2/trunk:255574)\n  D /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2/LICENSE\n  D /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2/tests/ldif_data/unsorted_w50_WIN.ldif\n\nThis commit was manufactured by cvs2svn to create tag 'RELEASE_2_0_0RC2'.\n------------------------------------------------------------------------\n\nWe can see that it looks as if there was a single 'cp' operation for\nthe whole root of the branch from trunk.\n\nAnd the log for that branch (on git) does show the history coming from trunk.\n\n\nOn the branch you are talking about:\n\n$ svn log -v --stop-on-copy\nhttps://svn.php.net/repository/pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12\n------------------------------------------------------------------------\nr318475 | beni | 2011-10-27 07:49:00 -0600 (Thu, 27 Oct 2011) | 1 line\nChanged paths:\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/Entry.php\n(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/Entry.php:318466)\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/Filter.php\n(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/Filter.php:318470)\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/LDIF.php\n(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/LDIF.php:318466)\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/RootDSE.php\n(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/RootDSE.php:318466)\n.\n.\n.\n   A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/tests/ldif_data/unsorted_w50.ldif\n(from /pear/packages/Net_LDAP2/trunk/tests/ldif_data/unsorted_w50.ldif:318466)\n  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/tests/ldif_data/unsorted_w50_WIN.ldif\n(from /pear/packages/Net_LDAP2/trunk/tests/ldif_data/unsorted_w50_WIN.ldif:3184\n66)\n\nTagging the 2.0.12 release\n------------------------------------------------------------------------\n\n\nAnd this tells me that the way the branch was created is not the same\nas in the other branch (files picked from different revisions?). I\nguess that's what is making git-svn get \"confused\".\n\nI guess you could just create a real git tag on a new revision coming\nfrom trunk revision 318466, replace the files with the right revisions\n(the ones that were pulled from another revision) and live with it.\n\nOn Sun, Oct 25, 2015 at 12:48 PM, Christian Weiske <cweiske@cweiske.de> wrote:\n> Hello Christian,\n>\n>\n>> > Did you try with -r revision-number:HEAD?\n>>\n>> Good idea. I tried it, and now I have the tags and branches:\n>\n> Unfortunately, the tag branches only have a single commit and have no\n> relation to the trunk branch:\n>\n> $ git log --oneline origin/tags/Net_LDAP2-2.0.12\n> 0bc9db1 Tagging the 2.0.12 release\n> $\n>\n> What can I do against that?\n>\n> --\n> Regards/Mit freundlichen Grüßen\n> Christian Weiske\n>\n> -=≡ Geeking around in the name of science since 1982 ≡=-\n"}]}