{"thread":{"id":"9023","subject":"git-svn: trunk missing, checks out tag instead","startedAt":"2007-07-13T17:24:43Z","lastAt":"2007-07-14T19:40:32Z","messageCount":4,"participants":["Bradford Smith","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"47274","messageId":"f158199e0707131024o5eb27b72v900f0d0613bc834b@mail.gmail.com","threadId":"9023","inReplyTo":null,"subject":"git-svn: trunk missing, checks out tag instead","fromName":"Bradford Smith","fromEmail":"bradford.carl.smith@gmail.com","sentAt":"2007-07-13T17:24:43Z","receivedAt":"2007-07-13T17:24:43Z","isPatch":false,"sender":{"key":"bradford.carl.smith@gmail.com","avatar":"https://gravatar.com/avatar/699930ad8ca562e38156ee60270b2fee830cc0cb5d94c2f70c6db4a705723c54?d=mp&s=160"},"body":"I am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work\nwith an SVN repository that is layed out like this:\n\n/trunk/proj1/\n...\n/trunk/proj2/\n...\n/trunk/testing/\n...\n\n/branches/proj1/\n...\n/branches/proj2/\n...\n/branches/testing/\n/branches/testing/0000-baseline\n\n/tags/proj1/\n...\n/tags/proj2/\n...\n/tags/testing/\n/tags/testing/0000-baseline-0\n\nI want to track the testing project, so I tried to use this git-svn\ncommand line:\n\ngit-svn clone <base-url> -T/trunk/testing -t/tags/testing\n-b/branches/testing testing\n\nThis appears to work, though I do get this warning message (edited for privacy):\n\nW: Ignoring error from SVN, path probably does not exist: (175002): RA\nlayer request failed: REPORT request failed on\n'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':\nCould not read chunk size: Secure connection truncated\n(https://<myserver>)\n\nWhen I run 'git branch -a' in the new testing directory I get this:\n\n* master\n  0000-baseline\n  0000-baseline@1546\n  1.0\n  1.0@1549\n  1.0@1656\n  tags/0000-baseline\n  tags/0000-baseline-0\n  tags/0000-baseline@1663\n\nWhere is the remote branch for trunk? And, why do I have remote\nentries for the defunct 1.0 branch that I deleted from svn earlier\ntoday?  What's more, the latest changes from /trunk/testing do not\nappear in my working directory, and gitk confirms that master is\npointing at the same commit as tags/0000-baseline-0.\n\nIf I just try to track the trunk like this:\n\ngit-svn clone <base-url>/trunk/testing\n\nThen I get all of the latest changes and 'git branch -a' shows:\n\n* master\n  git-svn\n\nSo that seems OK at least.  It just doesn't work when I try to get\nbranches and tags.  For now, I'll just work this way.\n\nFWIW, I suspect this behavior may be related to recent changes I made\nto the Subversion repository.  I created\n/branches/testing/0000-baseline today by copying an _old_ revision of\n/trunk/testing.  Then I created /tags/testing/0000-baseline-0 by\ncopying /branches/testing/0000-baseline.  No commits have been done on\n/testing/trunk since then.  Perhaps the recent (probably latest)\ncommit that copied an OLD version of trunk is somehow confusing\ngit-svn?  Once I commit a change to the subversion trunk, I'll try to\nclone trunk, branches, and tags again and post an update to this\nmessage.  Maybe it will work then.\n\nThanks for your help.\n\nBradford C. Smith\n"},{"id":"47284","messageId":"f158199e0707131205w358676e5j88f8e4c63b1be1f5@mail.gmail.com","threadId":"9023","inReplyTo":"f158199e0707131024o5eb27b72v900f0d0613bc834b@mail.gmail.com","subject":"Fwd: git-svn: trunk missing, checks out tag instead","fromName":"Bradford Smith","fromEmail":"bradford.carl.smith@gmail.com","sentAt":"2007-07-13T19:05:01Z","receivedAt":"2007-07-13T19:05:01Z","isPatch":false,"sender":{"key":"bradford.carl.smith@gmail.com","avatar":"https://gravatar.com/avatar/699930ad8ca562e38156ee60270b2fee830cc0cb5d94c2f70c6db4a705723c54?d=mp&s=160"},"body":"UPDATE:\n\nI get the same behavior even after checking in a new change on the trunk.\n\nOh, well...\n\nBradford\n\n---------- Forwarded message ----------\nFrom: Bradford Smith <bradford.carl.smith@gmail.com>\nDate: Jul 13, 2007 1:24 PM\nSubject: git-svn: trunk missing, checks out tag instead\nTo: git@vger.kernel.org\n\n\nI am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work\nwith an SVN repository that is layed out like this:\n\n/trunk/proj1/\n...\n/trunk/proj2/\n...\n/trunk/testing/\n...\n\n/branches/proj1/\n...\n/branches/proj2/\n...\n/branches/testing/\n/branches/testing/0000-baseline\n\n/tags/proj1/\n...\n/tags/proj2/\n...\n/tags/testing/\n/tags/testing/0000-baseline-0\n\nI want to track the testing project, so I tried to use this git-svn\ncommand line:\n\ngit-svn clone <base-url> -T/trunk/testing -t/tags/testing\n-b/branches/testing testing\n\nThis appears to work, though I do get this warning message (edited for privacy):\n\nW: Ignoring error from SVN, path probably does not exist: (175002): RA\nlayer request failed: REPORT request failed on\n'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':\nCould not read chunk size: Secure connection truncated\n(https://<myserver>)\n\nWhen I run 'git branch -a' in the new testing directory I get this:\n\n* master\n  0000-baseline\n  0000-baseline@1546\n  1.0\n  1.0@1549\n  1.0@1656\n  tags/0000-baseline\n  tags/0000-baseline-0\n  tags/0000-baseline@1663\n\nWhere is the remote branch for trunk? And, why do I have remote\nentries for the defunct 1.0 branch that I deleted from svn earlier\ntoday?  What's more, the latest changes from /trunk/testing do not\nappear in my working directory, and gitk confirms that master is\npointing at the same commit as tags/0000-baseline-0.\n\nIf I just try to track the trunk like this:\n\ngit-svn clone <base-url>/trunk/testing\n\nThen I get all of the latest changes and 'git branch -a' shows:\n\n* master\n  git-svn\n\nSo that seems OK at least.  It just doesn't work when I try to get\nbranches and tags.  For now, I'll just work this way.\n\nFWIW, I suspect this behavior may be related to recent changes I made\nto the Subversion repository.  I created\n/branches/testing/0000-baseline today by copying an _old_ revision of\n/trunk/testing.  Then I created /tags/testing/0000-baseline-0 by\ncopying /branches/testing/0000-baseline.  No commits have been done on\n/testing/trunk since then.  Perhaps the recent (probably latest)\ncommit that copied an OLD version of trunk is somehow confusing\ngit-svn?  Once I commit a change to the subversion trunk, I'll try to\nclone trunk, branches, and tags again and post an update to this\nmessage.  Maybe it will work then.\n\nThanks for your help.\n\nBradford C. Smith\n"},{"id":"47370","messageId":"f158199e0707141204n6fd9f79dg26453c5581a97c4d@mail.gmail.com","threadId":"9023","inReplyTo":"f158199e0707131205w358676e5j88f8e4c63b1be1f5@mail.gmail.com","subject":"Fwd: git-svn: trunk missing, checks out tag instead","fromName":"Bradford Smith","fromEmail":"bradford.carl.smith@gmail.com","sentAt":"2007-07-14T19:04:36Z","receivedAt":"2007-07-14T19:04:36Z","isPatch":false,"sender":{"key":"bradford.carl.smith@gmail.com","avatar":"https://gravatar.com/avatar/699930ad8ca562e38156ee60270b2fee830cc0cb5d94c2f70c6db4a705723c54?d=mp&s=160"},"body":"TWIMC,\n(Cc: to git-svn author, Eric Wong)\n\nI tried it again today, and it worked!  Looking at the command more\nclosely and playing with it a bit I discovered I had written the\ncommand line slightly differently.\n\nThis works:\n\ngit-svn clone https://my.server.net/repos/path/ -Ttrunk/testing -ttags/testing \\\n                     -bbranches/testing testing\n\nThis doesn't:\n\ngit-svn clone https://my.server.net/repos/path -T/trunk/testing\n-t/tags/testing \\\n                     -b/branches/testing testing\n\nSo, clearly this command is extremely sensitive to where the slashes go.\n\nWith the \"good\" version of the command I get a trunk branch.  With the\n\"bad\" version I don't.  Either way, I get the defunct 1.0 branch and\nthe error message mentioned in the original email below.\n\nHTH,\n\nBradford C, Smith\n\n\n---------- Forwarded message ----------\nFrom: Bradford Smith <bradford.carl.smith@gmail.com>\nDate: Jul 13, 2007 3:05 PM\nSubject: Fwd: git-svn: trunk missing, checks out tag instead\nTo: git@vger.kernel.org\n\nUPDATE:\n\nI get the same behavior even after checking in a new change on the trunk.\n\nOh, well...\n\nBradford\n\n---------- Forwarded message ----------\nFrom: Bradford Smith <bradford.carl.smith@gmail.com>\nDate: Jul 13, 2007 1:24 PM\nSubject: git-svn: trunk missing, checks out tag instead\nTo: git@vger.kernel.org\n\n\nI am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work\nwith an SVN repository that is layed out like this:\n\n/trunk/proj1/\n...\n/trunk/proj2/\n...\n/trunk/testing/\n...\n\n/branches/proj1/\n...\n/branches/proj2/\n...\n/branches/testing/\n/branches/testing/0000-baseline\n\n/tags/proj1/\n...\n/tags/proj2/\n...\n/tags/testing/\n/tags/testing/0000-baseline-0\n\nI want to track the testing project, so I tried to use this git-svn\ncommand line:\n\ngit-svn clone <base-url> -T/trunk/testing -t/tags/testing\n-b/branches/testing testing\n\nThis appears to work, though I do get this warning message (edited for privacy):\n\nW: Ignoring error from SVN, path probably does not exist: (175002): RA\nlayer request failed: REPORT request failed on\n'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':\nCould not read chunk size: Secure connection truncated\n(https://<myserver>)\n\nWhen I run 'git branch -a' in the new testing directory I get this:\n\n* master\n  0000-baseline\n  0000-baseline@1546\n  1.0\n  1.0@1549\n  1.0@1656\n  tags/0000-baseline\n  tags/0000-baseline-0\n  tags/0000-baseline@1663\n\nWhere is the remote branch for trunk? And, why do I have remote\nentries for the defunct 1.0 branch that I deleted from svn earlier\ntoday?  What's more, the latest changes from /trunk/testing do not\nappear in my working directory, and gitk confirms that master is\npointing at the same commit as tags/0000-baseline-0.\n\nIf I just try to track the trunk like this:\n\ngit-svn clone <base-url>/trunk/testing\n\nThen I get all of the latest changes and 'git branch -a' shows:\n\n* master\n  git-svn\n\nSo that seems OK at least.  It just doesn't work when I try to get\nbranches and tags.  For now, I'll just work this way.\n\nFWIW, I suspect this behavior may be related to recent changes I made\nto the Subversion repository.  I created\n/branches/testing/0000-baseline today by copying an _old_ revision of\n/trunk/testing.  Then I created /tags/testing/0000-baseline-0 by\ncopying /branches/testing/0000-baseline.  No commits have been done on\n/testing/trunk since then.  Perhaps the recent (probably latest)\ncommit that copied an OLD version of trunk is somehow confusing\ngit-svn?  Once I commit a change to the subversion trunk, I'll try to\nclone trunk, branches, and tags again and post an update to this\nmessage.  Maybe it will work then.\n\nThanks for your help.\n\nBradford C. Smith\n"},{"id":"47372","messageId":"20070714194031.GA5160@soma","threadId":"9023","inReplyTo":"f158199e0707141159t290d3aa9g90c6799e98520f56@mail.gmail.com","subject":"[PATCH] git-svn: remove leading slashes from fetch lines in the generate config","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-07-14T19:40:32Z","receivedAt":"2007-07-14T19:40:32Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We were previously sensitive to leading slashes in the fetch\nlines and incorrectly writing them to the config if the user\nused them (needlessly) in the command-line.\n\nThis fixes the issue and allows us to play nicely with legacy\nconfigs that have leading slashes in fetch lines.\n\nThanks to Bradford Smith for figuring this out for me:\n>\n> This works:\n>\n> git-svn clone https://my.server.net/repos/path/ -Ttrunk/testing\n>   -ttags/testing -bbranches/testing testing\n>\n> This doesn't:\n>\n> git-svn clone https://my.server.net/repos/path -T/trunk/testing\n>   -t/tags/testing -b/branches/testing testing\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex b3dffcc..299b40f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1026,7 +1026,9 @@ sub read_all_remotes {\n \tmy $r = {};\n \tforeach (grep { s/^svn-remote\\.// } command(qw/config -l/)) {\n \t\tif (m!^(.+)\\.fetch=\\s*(.*)\\s*:\\s*refs/remotes/(.+)\\s*$!) {\n-\t\t\t$r->{$1}->{fetch}->{$2} = $3;\n+\t\t\tmy ($remote, $local_ref, $remote_ref) = ($1, $2, $3);\n+\t\t\t$local_ref =~ s{^/}{};\n+\t\t\t$r->{$remote}->{fetch}->{$local_ref} = $remote_ref;\n \t\t} elsif (m!^(.+)\\.url=\\s*(.*)\\s*$!) {\n \t\t\t$r->{$1}->{url} = $2;\n \t\t} elsif (m!^(.+)\\.(branches|tags)=\n@@ -1146,6 +1148,7 @@ sub init_remote_config {\n \tunless ($no_write) {\n \t\tcommand_noisy('config',\n \t\t\t      \"svn-remote.$self->{repo_id}.url\", $url);\n+\t\t$self->{path} =~ s{^/}{};\n \t\tcommand_noisy('config', '--add',\n \t\t\t      \"svn-remote.$self->{repo_id}.fetch\",\n \t\t\t      \"$self->{path}:\".$self->refname);\n-- \nEric Wong\n"}]}