{"thread":{"id":"12667","subject":"git-svn -t/-b should respect existing *","startedAt":"2008-03-13T11:27:38Z","lastAt":"2008-03-14T19:39:41Z","messageCount":3,"participants":["martin f krafft","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71916","messageId":"20080313112738.GA28589@piper.oerlikon.madduck.net","threadId":"12667","inReplyTo":null,"subject":"git-svn -t/-b should respect existing *","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2008-03-13T11:27:38Z","receivedAt":"2008-03-13T11:27:38Z","isPatch":false,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"Hi folks,\n\nMy git-svn target configuration is\n\n  [svn-remote \"svn\"]\n    url = svn://svn.berlios.de/docutils\n    fetch = trunk/docutils:refs/remotes/trunk\n    branches = branches/*/docutils:refs/remotes/*\n    tags = tags/*/docutils:refs/remotes/tags/*\n\nUnfortunately, when I run\n\n  git-svn init -T trunk/docutils -t 'tags/*/docutils' -b 'branches/*/docutils' ...\n\nthen I get (note the two asterisks on the left hand side):\n\n    branches = branches/*/docutils/*:refs/remotes/*\n    tags = tags/*/docutils/*:refs/remotes/tags/*\n\nI took a brief stab at the code but I can't even figure out where\nthe /* is appended, so I defer to you.\n\nIt should be trivial to keep git-svn from appending /* if the left\nside already contains an asterisk.\n\nThanks,\n\n-- \nmartin | http://madduck.net/ | http://two.sentenc.es/\n \n\"auch der mutigste von uns hat nur selten den mut zu dem,\n was er eigentlich weiß.\"\n                                                 - friedrich nietzsche\n \nspamtraps: madduck.bogus@madduck.net\n"},{"id":"72124","messageId":"20080314180123.GB3107@hand.yhbt.net","threadId":"12667","inReplyTo":"20080313112738.GA28589@piper.oerlikon.madduck.net","subject":"[PATCH] git-svn: don't blindly append '*' to branch/tags config","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-03-14T18:01:23Z","receivedAt":"2008-03-14T18:01:23Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Previously, git-svn would blindly append '*' even if it was specified by\nthe user during initialization (for certain SVN setups, it is\nnecessary).\n\nNow, the following command will work correctly:\n\n  git svn init -T trunk/docutils \\\n               -t 'tags/*/docutils' \\\n               -b 'branches/*/docutils' \\\n               svn://svn.berlios.de/docutils\n\nThanks to martin f krafft for the bug report:\n> My git-svn target configuration is\n>\n>   [svn-remote \"svn\"]\n>     url = svn://svn.berlios.de/docutils\n>     fetch = trunk/docutils:refs/remotes/trunk\n>     branches = branches/*/docutils:refs/remotes/*\n>     tags = tags/*/docutils:refs/remotes/tags/*\n>\n> Unfortunately, when I run\n>\n>   git-svn init -T trunk/docutils -t 'tags/*/docutils'\n>    -b 'branches/*/docutils'\n>\n> then I get (note the two asterisks on the left hand side):\n>\n>     branches = branches/*/docutils/*:refs/remotes/*\n>     tags = tags/*/docutils/*:refs/remotes/tags/*\n>\n> I took a brief stab at the code but I can't even figure out where\n> the /* is appended, so I defer to you.\n>\n> It should be trivial to keep git-svn from appending /* if the left\n> side already contains an asterisk.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\n git-svn.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex d8b38c9..bba22c1 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -958,9 +958,10 @@ sub complete_url_ls_init {\n \t\t    \"wanted to set to: $gs->{url}\\n\";\n \t}\n \tcommand_oneline('config', $k, $gs->{url}) unless $orig_url;\n-\tmy $remote_path = \"$ra->{svn_path}/$repo_path/*\";\n+\tmy $remote_path = \"$ra->{svn_path}/$repo_path\";\n \t$remote_path =~ s#/+#/#g;\n \t$remote_path =~ s#^/##g;\n+\t$remote_path .= \"/*\" if $remote_path !~ /\\*/;\n \tmy ($n) = ($switch =~ /^--(\\w+)/);\n \tif (length $pfx && $pfx !~ m#/$#) {\n \t\tdie \"--prefix='$pfx' must have a trailing slash '/'\\n\";\n-- \nEric Wong\n"},{"id":"72133","messageId":"20080314193941.GA24022@piper.oerlikon.madduck.net","threadId":"12667","inReplyTo":"20080314180123.GB3107@hand.yhbt.net","subject":"Re: [PATCH] git-svn: don't blindly append '*' to branch/tags config","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2008-03-14T19:39:41Z","receivedAt":"2008-03-14T19:39:41Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Eric Wong <normalperson@yhbt.net> [2008.03.14.1901 +0100]:\n> Previously, git-svn would blindly append '*' even if it was specified by\n> the user during initialization (for certain SVN setups, it is\n> necessary).\n> \n> Now, the following command will work correctly:\n> \n>   git svn init -T trunk/docutils \\\n>                -t 'tags/*/docutils' \\\n>                -b 'branches/*/docutils' \\\n>                svn://svn.berlios.de/docutils\n\nI can confirm this. Thanks, Eric for the blazing turnaround time.\n\n-- \nmartin | http://madduck.net/ | http://two.sentenc.es/\n \n\"the surest way to corrupt a youth is to instruct him to hold in\n higher esteem those who think alike than those who think\n differently.\"\n                                              -- friedrich nietzsche\n \nspamtraps: madduck.bogus@madduck.net\n"}]}