{"thread":{"id":"20070","subject":"git-svn is \"Unable to determine upstream SVN information...\"","startedAt":"2009-07-09T22:53:41Z","lastAt":"2009-07-12T21:56:58Z","messageCount":8,"participants":["esskov@oncable.dk","Eric Wong","Esben Skovenborg","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117732","messageId":"ohrc5510bko329be5ugj3n6bgvhcevd2kg@4ax.com","threadId":"20070","inReplyTo":null,"subject":"git-svn is \"Unable to determine upstream SVN information...\"","fromName":"","fromEmail":"esskov@oncable.dk","sentAt":"2009-07-09T22:53:41Z","receivedAt":"2009-07-09T22:53:41Z","isPatch":false,"sender":{"key":"esskov@oncable.dk","avatar":null},"body":"\tHi,\n\nI'm trying to clone the trunk of an svn repo, so that I can work on a set\nof patches locally, and then occasionally push some of them back to svn.\n\nThe git-svn clone seems to go well, and the resulting git log looks\nalright. However, git-svn info and git-svn rebase both say \"Unable to\ndetermine upstream SVN information from working tree history\".\nAlso, git-svn log shows nothing.  I'm using the svn:// protocol btw, but I\nguess the protocol shouldn't matter?\n\nTo test if this was a general problem, I just tried to git-svn clone a\nrepo on some public svn server which was also using the svn protocol. I\nused exactly the same syntax for the svn init and fetch commands. However,\nthe resulting git repo did NOT suffer from the problem, i.e., git-svn info\nreported nicely etc.\n\nAt some point I suspected that there might be a problem with the\n\"git-svn-id ...\" lines in the commits for the problematic repo, but they\nlook just like the ones for the working repo. The .git/config files of the\nworking and the non-working git-repos are similar as well. \n\nWhat could be causing this problem?\n\n\nCheers,\n\n\tEsben\n"},{"id":"117747","messageId":"20090710033133.GA23082@dcvr.yhbt.net","threadId":"20070","inReplyTo":"ohrc5510bko329be5ugj3n6bgvhcevd2kg@4ax.com","subject":"Re: git-svn is \"Unable to determine upstream SVN information...\"","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-10T03:31:33Z","receivedAt":"2009-07-10T03:31:33Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"esskov@oncable.dk wrote:\n> \tHi,\n> \n> I'm trying to clone the trunk of an svn repo, so that I can work on a set\n> of patches locally, and then occasionally push some of them back to svn.\n> \n> The git-svn clone seems to go well, and the resulting git log looks\n> alright. However, git-svn info and git-svn rebase both say \"Unable to\n> determine upstream SVN information from working tree history\".\n> Also, git-svn log shows nothing.  I'm using the svn:// protocol btw, but I\n> guess the protocol shouldn't matter?\n\nProtocol shouldn't matter.  Do you have any non-linear history from\nmerges in git?  git-svn (and SVN) doesn't play very nicely with\nnon-linear history that git merges can generate.\n\nDoes having a clean clone of that repo fix things?  You didn't use\n--no-metadata or blow away your .git/svn/* directories, did you?\n\n> To test if this was a general problem, I just tried to git-svn clone a\n> repo on some public svn server which was also using the svn protocol. I\n> used exactly the same syntax for the svn init and fetch commands. However,\n> the resulting git repo did NOT suffer from the problem, i.e., git-svn info\n> reported nicely etc.\n> \n> At some point I suspected that there might be a problem with the\n> \"git-svn-id ...\" lines in the commits for the problematic repo, but they\n> look just like the ones for the working repo. The .git/config files of the\n> working and the non-working git-repos are similar as well. \n> \n> What could be causing this problem?\n\nWhich version of git svn is this?  Are there any weird characters in the\nURL?  Off the top of my head I can't think of anything else; I assume\nyou're not allowed to share access to the repo (or to the clone) you're\nhaving problems with?\n\n-- \nEric Wong\n"},{"id":"117764","messageId":"5m5e55538tlnq40rup7rci61i2mg16q0dv@4ax.com","threadId":"20070","inReplyTo":"20090710033133.GA23082@dcvr.yhbt.net","subject":"Re: git-svn is \"Unable to determine upstream SVN information...\"","fromName":"Esben Skovenborg","fromEmail":"esskov@oncable.dk","sentAt":"2009-07-10T11:15:14Z","receivedAt":"2009-07-10T11:15:14Z","isPatch":false,"sender":{"key":"esskov@oncable.dk","avatar":null},"body":"\nThanks for your quick reply! Let me go through your check-list...\n\nOn Thu, 9 Jul 2009 20:31:33 -0700, Eric Wong wrote:\n>esskov@oncable.dk wrote:\n>> I'm trying to clone the trunk of an svn repo, so that I can work on a set\n>> of patches locally, and then occasionally push some of them back to svn.\n>> \n>> The git-svn clone seems to go well, and the resulting git log looks\n>> alright. However, git-svn info and git-svn rebase both say \"Unable to\n>> determine upstream SVN information from working tree history\".\n>> Also, git-svn log shows nothing.  I'm using the svn:// protocol btw, but I\n>> guess the protocol shouldn't matter?\n>\n>Protocol shouldn't matter.  Do you have any non-linear history from\n>merges in git?  git-svn (and SVN) doesn't play very nicely with\n>non-linear history that git merges can generate.\n>\n>Does having a clean clone of that repo fix things?  You didn't use\n>--no-metadata or blow away your .git/svn/* directories, did you?\n\nI do get the problem with a clean clone, and I don't see any difference\nbetween the structure of the .git/svn/* of the problematic repo and of the\nworking test-repo.\n\nThe problem can be reproduced as simple as this:\n$ git svn init svn://svn.xxx.xxx/xxx/trunk\n$ git svn fetch -r BASE:10\n$ git branch -a\n\t* master\n\t  remotes/git-svn\n$ git svn info \n\tUnable to determine upstream SVN information from working tree\nhistory\n$ git log\n\teach commit shows line like: \"a git-svn-id:\nsvn://svn.xxx.xxx/xxx/trunk@1-10 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n\nThese 10 revisions only consist of file insertions and deletions in the\ntrunk.\n\n>> To test if this was a general problem, I just tried to git-svn clone a\n>> repo on some public svn server which was also using the svn protocol. I\n>> used exactly the same syntax for the svn init and fetch commands. However,\n>> the resulting git repo did NOT suffer from the problem, i.e., git-svn info\n>> reported nicely etc.\n>> \n>> At some point I suspected that there might be a problem with the\n>> \"git-svn-id ...\" lines in the commits for the problematic repo, but they\n>> look just like the ones for the working repo. The .git/config files of the\n>> working and the non-working git-repos are similar as well. \n>> \n>> What could be causing this problem?\n>\n>Which version of git svn is this?  \n\nI see the problem with both git version 1.6.3.2.1299.gee46c (msysgit) and\ngit version 1.6.3.3.412.gf581d (Ubuntu). The latter contains your fix for\nthat other problem I encountered :)\n\n>Are there any weird characters in the URL?  \n\nNo. The only thing 'different' about this svn server is that it uses\nauthentication (i.e. asks for name+password). But I suppose that when the\ngit-svn fetch goes well, then this is not the problem?  Do the git-svn\ninfo and git-svn rebase even need to access the svn server?\n\n>Off the top of my head I can't think of anything else; I assume\n>you're not allowed to share access to the repo (or to the clone) you're\n>having problems with?\n\nRight, at least it's something we should talk about off-list.\n\nIs there any way of asking git-svn *why* it is \"unable to determine\nupstream SVN information from working tree history\" ?\n\n\nCheers,\n\n\tEsben\n"},{"id":"117797","messageId":"20090710203322.GA18051@dcvr.yhbt.net","threadId":"20070","inReplyTo":"5m5e55538tlnq40rup7rci61i2mg16q0dv@4ax.com","subject":"Re: git-svn is \"Unable to determine upstream SVN information...\"","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-10T20:33:22Z","receivedAt":"2009-07-10T20:33:22Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Esben Skovenborg <esskov@oncable.dk> wrote:\n> On Thu, 9 Jul 2009 20:31:33 -0700, Eric Wong wrote:\n> >Are there any weird characters in the URL?  \n> \n> No. The only thing 'different' about this svn server is that it uses\n> authentication (i.e. asks for name+password). But I suppose that when the\n> git-svn fetch goes well, then this is not the problem?  Do the git-svn\n> info and git-svn rebase even need to access the svn server?\n\nYes, rebase (without the -l) option needs it for sure.  I think info can\noptionally use it, too.  Does enabling authentication caching (enabled\nby default in SVN) help things?  I haven't used the authentication\nprompt pieces in ages, they're hard to test in an automated fashion so\nthey may have bit-rotted since I last looked at them...\n\n> >Off the top of my head I can't think of anything else; I assume\n> >you're not allowed to share access to the repo (or to the clone) you're\n> >having problems with?\n> \n> Right, at least it's something we should talk about off-list.\n> \n> Is there any way of asking git-svn *why* it is \"unable to determine\n> upstream SVN information from working tree history\" ?\n\nIf you're comfortable with a little Perl, you can sprinkle some debug\nstatements in working_head_info().  Feel free to email me directly\nofflist but my schedule looks pretty hectic today and this weekend\nand I may be offline a lot.\n\n-- \nEric Wong\n"},{"id":"117871","messageId":"20090712185821.GA26749@dcvr.yhbt.net","threadId":"20070","inReplyTo":"20090710203322.GA18051@dcvr.yhbt.net","subject":"[PATCH] git svn: allow uppercase UUIDs from SVN","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-12T18:58:21Z","receivedAt":"2009-07-12T18:58:21Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"SVN allows uppercase A-F characters in repositories.  Although\n`svnadmin' does not create UUIDs with uppercase by default, it\nis possible to change the UUID of a SVN repository and SVN\nitself will make no attempt to normalize them.\n\nThanks to Esben Skovenborg for discovering this issue.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\n  Esben: thank you for helping me find and confirming the fix!\n\n  Junio: pushed out to git://git.bogomips.org/git-svn along with\n         some patches I think I forgot to tell you about:\n\n    Eric Wong (1):\n          git svn: allow uppercase UUIDs from SVN\n\n    Mattias Nissler (2):\n          git-svn: Always duplicate paths returned from get_log\n          git-svn: Fix branch detection when repository root is inaccessible\n\n git-svn.perl |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex ec84758..cfade63 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1359,11 +1359,11 @@ sub read_repo_config {\n sub extract_metadata {\n \tmy $id = shift or return (undef, undef, undef);\n \tmy ($url, $rev, $uuid) = ($id =~ /^\\s*git-svn-id:\\s+(.*)\\@(\\d+)\n-\t\t\t\t\t\t\t\\s([a-f\\d\\-]+)$/x);\n+\t\t\t\t\t\t\t\\s([a-f\\d\\-]+)$/ix);\n \tif (!defined $rev || !$uuid || !$url) {\n \t\t# some of the original repositories I made had\n \t\t# identifiers like this:\n-\t\t($rev, $uuid) = ($id =~/^\\s*git-svn-id:\\s(\\d+)\\@([a-f\\d\\-]+)/);\n+\t\t($rev, $uuid) = ($id =~/^\\s*git-svn-id:\\s(\\d+)\\@([a-f\\d\\-]+)/i);\n \t}\n \treturn ($url, $rev, $uuid);\n }\n@@ -2010,7 +2010,7 @@ sub _set_svm_vars {\n \n \t\tchomp($src, $uuid);\n \n-\t\t$uuid =~ m{^[0-9a-f\\-]{30,}$}\n+\t\t$uuid =~ m{^[0-9a-f\\-]{30,}$}i\n \t\t    or die \"doesn't look right - svm:uuid is '$uuid'\\n\";\n \n \t\t# the '!' is used to mark the repos_root!/relative/path\n@@ -2096,7 +2096,7 @@ sub svnsync {\n \t\t   die \"doesn't look right - svn:sync-from-url is '$url'\\n\";\n \n \t\tmy $uuid = tmp_config('--get', \"$section.svnsync-uuid\");\n-\t\t($uuid) = ($uuid =~ m{^([0-9a-f\\-]{30,})$}) or\n+\t\t($uuid) = ($uuid =~ m{^([0-9a-f\\-]{30,})$}i) or\n \t\t   die \"doesn't look right - svn:sync-from-uuid is '$uuid'\\n\";\n \n \t\t$svnsync = { url => $url, uuid => $uuid }\n@@ -2114,7 +2114,7 @@ sub svnsync {\n \t           die \"doesn't look right - svn:sync-from-url is '$url'\\n\";\n \n \tmy $uuid = $rp->{'svn:sync-from-uuid'} or die $err . \"uuid\\n\";\n-\t($uuid) = ($uuid =~ m{^([0-9a-f\\-]{30,})$}) or\n+\t($uuid) = ($uuid =~ m{^([0-9a-f\\-]{30,})$}i) or\n \t           die \"doesn't look right - svn:sync-from-uuid is '$uuid'\\n\";\n \n \tmy $section = \"svn-remote.$self->{repo_id}\";\n@@ -2130,7 +2130,7 @@ sub ra_uuid {\n \tunless ($self->{ra_uuid}) {\n \t\tmy $key = \"svn-remote.$self->{repo_id}.uuid\";\n \t\tmy $uuid = eval { tmp_config('--get', $key) };\n-\t\tif (!$@ && $uuid && $uuid =~ /^([a-f\\d\\-]{30,})$/) {\n+\t\tif (!$@ && $uuid && $uuid =~ /^([a-f\\d\\-]{30,})$/i) {\n \t\t\t$self->{ra_uuid} = $uuid;\n \t\t} else {\n \t\t\tdie \"ra_uuid called without URL\\n\" unless $self->{url};\n@@ -2848,7 +2848,7 @@ sub make_log_entry {\n \t\t\tdie \"Can't have both 'useSvmProps' and 'rewriteRoot' \",\n \t\t\t    \"options set!\\n\";\n \t\t}\n-\t\tmy ($uuid, $r) = $headrev =~ m{^([a-f\\d\\-]{30,}):(\\d+)$};\n+\t\tmy ($uuid, $r) = $headrev =~ m{^([a-f\\d\\-]{30,}):(\\d+)$}i;\n \t\t# we don't want \"SVM: initializing mirror for junk\" ...\n \t\treturn undef if $r == 0;\n \t\tmy $svm = $self->svm;\n-- \nEric Wong\n"},{"id":"117872","messageId":"7vtz1hli15.fsf@alter.siamese.dyndns.org","threadId":"20070","inReplyTo":"20090712185821.GA26749@dcvr.yhbt.net","subject":"Re: [PATCH] git svn: allow uppercase UUIDs from SVN","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-07-12T21:15:34Z","receivedAt":"2009-07-12T21:15:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n>   Junio: pushed out to git://git.bogomips.org/git-svn along with\n>          some patches I think I forgot to tell you about:\n\nThanks, will pull.\n"},{"id":"117877","messageId":"7v7hydlgal.fsf@alter.siamese.dyndns.org","threadId":"20070","inReplyTo":"7vtz1hli15.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git svn: allow uppercase UUIDs from SVN","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-07-12T21:53:06Z","receivedAt":"2009-07-12T21:53:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Eric Wong <normalperson@yhbt.net> writes:\n>\n>>   Junio: pushed out to git://git.bogomips.org/git-svn along with\n>>          some patches I think I forgot to tell you about:\n>\n> Thanks, will pull.\n\nActually I think I got something different from what I thought I was\nexpecting.  Your message said:\n\n    Eric Wong (1):\n          git svn: allow uppercase UUIDs from SVN\n\n    Mattias Nissler (2):\n          git-svn: Always duplicate paths returned from get_log\n          git-svn: Fix branch detection when repository root is inaccessible\n\nbut after merge:\n\n    Junio C Hamano (1):\n          Merge git://git.bogomips.org/git-svn\n\n    Mattias Nissler (2):\n          git-svn: Always duplicate paths returned from get_log\n          git-svn: Fix branch detection when repository root is inaccessible\n\n    Yann Dirson (4):\n          git-svn.txt: stop using dash-form of commands.\n          git-svn.txt: make formatting more consistent.\n          git-svn.txt: fix fetch flags incorrectly documented as init flags.\n          git-svn.txt: fix description of fetch flags accepted by clone.\n\nFor example, you have this:\n\n    commit eb0d671e3b73f05106dca83b9cecd74d4acdb291\n    Author: Yann Dirson <ydirson@altern.org>\n    Date:   Mon Jul 6 00:03:15 2009 +0200\n\nwhich is an old iteration of \n\n    commit 6c32a7a99495da3f49e2a142791bc10af3f6f059\n    Author: Yann Dirson <ydirson@altern.org>\n    Date:   Tue Jul 7 22:22:20 2009 +0200\n\nthat is already in 'master'.\n\nPerhaps you forgot to push it out?  These are what I see:\n\n    $ git fetch git://git.bogomips.org/git-svn HEAD\n    $ git log --oneline ..FETCH_HEAD\n    6bb8ed9 git-svn: Fix branch detection when repository root is inaccessible\n    2d4b387 git-svn: Always duplicate paths returned from get_log\n    bca5572 git-svn.txt: fix description of fetch flags accepted by clone.\n    e594175 git-svn.txt: fix fetch flags incorrectly documented as init flags.\n    eb0d671 git-svn.txt: make formatting more consistent.\n    6478d74 git-svn.txt: stop using dash-form of commands.\n"},{"id":"117878","messageId":"20090712215658.GA24389@dcvr.yhbt.net","threadId":"20070","inReplyTo":"7v7hydlgal.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git svn: allow uppercase UUIDs from SVN","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-12T21:56:58Z","receivedAt":"2009-07-12T21:56:58Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Eric Wong <normalperson@yhbt.net> writes:\n> >\n> >>   Junio: pushed out to git://git.bogomips.org/git-svn along with\n> >>          some patches I think I forgot to tell you about:\n> >\n> > Thanks, will pull.\n> \n> Actually I think I got something different from what I thought I was\n> expecting.  Your message said:\n> \n>     Eric Wong (1):\n>           git svn: allow uppercase UUIDs from SVN\n> \n>     Mattias Nissler (2):\n>           git-svn: Always duplicate paths returned from get_log\n>           git-svn: Fix branch detection when repository root is inaccessible\n> \n> but after merge:\n> \n>     Junio C Hamano (1):\n>           Merge git://git.bogomips.org/git-svn\n> \n>     Mattias Nissler (2):\n>           git-svn: Always duplicate paths returned from get_log\n>           git-svn: Fix branch detection when repository root is inaccessible\n> \n>     Yann Dirson (4):\n>           git-svn.txt: stop using dash-form of commands.\n>           git-svn.txt: make formatting more consistent.\n>           git-svn.txt: fix fetch flags incorrectly documented as init flags.\n>           git-svn.txt: fix description of fetch flags accepted by clone.\n> \n> For example, you have this:\n> \n>     commit eb0d671e3b73f05106dca83b9cecd74d4acdb291\n>     Author: Yann Dirson <ydirson@altern.org>\n>     Date:   Mon Jul 6 00:03:15 2009 +0200\n> \n> which is an old iteration of \n> \n>     commit 6c32a7a99495da3f49e2a142791bc10af3f6f059\n>     Author: Yann Dirson <ydirson@altern.org>\n>     Date:   Tue Jul 7 22:22:20 2009 +0200\n> \n> that is already in 'master'.\n> \n> Perhaps you forgot to push it out?  These are what I see:\n\nExactly, just pushed.  Sorry about that.\n\n-- \nEric Wong\n"}]}