{"thread":{"id":"28894","subject":"Problem with git-svn with limited SVN access","startedAt":"2011-11-09T11:28:10Z","lastAt":"2011-11-10T08:36:29Z","messageCount":3,"participants":["Antoine Bonavita","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"179203","messageId":"4EBA63CA.7000201@stickyadstv.com","threadId":"28894","inReplyTo":null,"subject":"Problem with git-svn with limited SVN access","fromName":"Antoine Bonavita","fromEmail":"antoine@stickyadstv.com","sentAt":"2011-11-09T11:28:10Z","receivedAt":"2011-11-09T11:28:10Z","isPatch":false,"sender":{"key":"antoine@stickyadstv.com","avatar":null},"body":"Hello,\n\nI have a problem with a git-svn setup and although I spent most of \nyesterday googling for a solution but did not find any (see below for my \nfailed attempts). I hope you guys here will be able to help me.\n\nI have limited access to a SVN repository with a \"standard\" layout. By \nlimited, I mean that I am allowed only to access the folders \"trunk\", \n\"branches/XXX\" and \"branches/YYY\".\n\n*Attempt 1:*\n > git svn init svn://server/aaa/AAA -T trunk -b branches --username=UUU\nInitialized empty Git repository in /home/.../.git/\nUsing higher level of URL: svn://server/aaa/AAA => svn://server/aaa\n > git svn fetch\nError from SVN, (220001): Item is not readable: Item is not readable\n\n*Attempt 2:*\n > git svn init svn://server/aaa/AAA -T trunk -b branches --username=UUU \n--no-minimize-url\nInitialized empty Git repository in /home/.../.git/\n > git svn fetch\nW: Item is not readable: Item is not readable at \n/usr/libexec/git-core/git-svn line 1782\n\nError from SVN, (220001): Item is not readable: Item is not readable\n\n*Attempt 3:*\n > git svn init svn://server/aaa/AAA -T trunk --username=UUU \n--no-minimize-url\nInitialized empty Git repository in /home/.../.git/\n > git svn fetch\nW: Item is not readable: Item is not readable at \n/usr/libexec/git-core/git-svn line 1782\n\nW: Ignoring error from SVN, path probably does not exist: (160013): \nFilesystem has no item: File not found: revision 100, path '/AAA/trunk'\nW: Do not be alarmed at the above message git-svn is just searching \naggressively for old history.\nThis may take a while on large repositories\nRead access denied for root of edit: Not authorized to open root of edit \noperation at /usr/libexec/git-core/git-svn line 5131\n\n*Attempt 4:*\n > git svn init -T svn://server/aaa/AAA/trunk -b \nsvn://server/aaa/AAA/branches --username=UUU --no-minimize-url\n\nInitialized empty Git repository in /home/.../.git/\nsvn-remote.svn.url already set: svn://server/aaa/AAA/trunk\nwanted to set to: svn://server/aaa/AAA/branches\n > git svn fetch\nW: Ignoring error from SVN, path probably does not exist: (160013): \nFilesystem has no item: File not found: revision 100, path '/AAA/trunk'\nW: Do not be alarmed at the above message git-svn is just searching \naggressively for old history.\nThis may take a while on large repositories\n          ### stuff actually retrieved from SVN\n          .....\nr6035 = 6163cb28acff14d68f1b96869274b668405897a2 (refs/remotes/trunk)\n          .....\nCompressing objects: 100% (10751/10751), done.\nWriting objects: 100% (10886/10886), done.\nTotal 10886 (delta 9331), reused 0 (delta 0)\nChecking out files: 100% (6002/6002), done.\nChecked out HEAD:\n   svn://server/aaa/AAA/trunk r27316\ncreating empty directory: lib/AAA/mp3gain/otherlang/help\n...\n### No line with any branch. So it looks like I managed to get the trunk \nbut not the branches.\n\n\n*Attempt 5:*\n > git svn init -T svn://server/aaa/AAA/trunk -b \nsvn://server/aaa/AAA/branches --username=UUU --no-minimize-url\n\nInitialized empty Git repository in /home/.../.git/\nsvn-remote.svn.url already set: svn://server/aaa/AAA/trunk\nwanted to set to: svn://server/aaa/AAA/branches\n### My .git/config looks like:\n[svn-remote \"svn\"]\n         url = svn://server/aaa/AAA/trunk\n         fetch = :refs/remotes/trunk\n### If I try to add one of the branches manually:\nbranches = branches/XXX:refs/remotes/branches/XXX\n > git svn fetch\nOne '*' is needed in glob: 'branches/XXX'\n\n*Attempt 6:*\n > git svn init -T svn://server/aaa/AAA/trunk -b \nsvn://server/aaa/AAA/branches --username=UUU --no-minimize-url\n\nInitialized empty Git repository in /home/.../.git/\nsvn-remote.svn.url already set: svn://server/aaa/AAA/trunk\nwanted to set to: svn://server/aaa/AAA/branches\n### I put a glob instead of the branch name in git/.config:\nbranches = branches/{XXX,YYY}:refs/remotes/branches/*\n > git svn fetch\n...\nCounting objects: 10886, done.\nDelta compression using up to 8 threads.\nCompressing objects: 100% (10751/10751), done.\nWriting objects: 100% (10886/10886), done.\nTotal 10886 (delta 9330), reused 0 (delta 0)\nerror: Untracked working tree file 'COPYRIGHT.txt' would be overwritten \nby merge.\nread-tree -m -u -v HEAD HEAD: command returned error: 128\n### Only refs/remotes/trunk checked out. No branch.\n\nAt this point, I'm really lost and running out of ideas. If someone \ncould help me with this, I would be very grateful.\n\nPlease forgive me if I posted to the wrong mailing-list but I could not \nfind a specific git-svn list. If there is such thing, please point me in \nthe right direction.\n\nThanks,\n\nAntoine.\n\n-- \nAntoine Bonavita (antoine@stickyadstv.com)\nEnvoyé de mon PC. Moi je suis Fedora.\n"},{"id":"179224","messageId":"201111092338.26164.trast@student.ethz.ch","threadId":"28894","inReplyTo":"4EBA63CA.7000201@stickyadstv.com","subject":"Re: Problem with git-svn with limited SVN access","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2011-11-09T22:38:25Z","receivedAt":"2011-11-09T22:38:25Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Antoine Bonavita wrote:\n> ### If I try to add one of the branches manually:\n> branches = branches/XXX:refs/remotes/branches/XXX\n>  > git svn fetch\n> One '*' is needed in glob: 'branches/XXX'\n\nI think having several fetch specs should do the trick, although I\ncannot easily test with actual permissions.\n\nYou can start configuring the repo with\n\n  git init\n  git svn init svn://server/ -T trunk\n\nto get an initial layout.  The .git/config will look like\n\n  [svn-remote \"svn\"]\n          url = svn://server/\n          fetch = trunk:refs/remotes/trunk\n\nThe clue is that the config says 'fetch', not 'trunk'.  Much like with\ngit remotes, you can add more fetch specs along the lines of\n\n          fetch = branches/XXX:refs/remotes/svn/XXX\n\nor whatever layout you prefer.\n\nPlease tell us whether that works even in the face of restrictions on\nbranches/ itself :-)\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"179267","messageId":"4EBB8D0D.3060004@stickyadstv.com","threadId":"28894","inReplyTo":"201111092338.26164.trast@student.ethz.ch","subject":"Re: Problem with git-svn with limited SVN access","fromName":"Antoine Bonavita","fromEmail":"antoine@stickyadstv.com","sentAt":"2011-11-10T08:36:29Z","receivedAt":"2011-11-10T08:36:29Z","isPatch":false,"sender":{"key":"antoine@stickyadstv.com","avatar":null},"body":"Thomas,\n\nThanks a lot for taking the time to look at my problem.\n\nOn 11/09/2011 11:38 PM, Thomas Rast wrote:\n> Antoine Bonavita wrote:\n>> ### If I try to add one of the branches manually:\n>> branches = branches/XXX:refs/remotes/branches/XXX\n>>   >  git svn fetch\n>> One '*' is needed in glob: 'branches/XXX'\n>\n> I think having several fetch specs should do the trick, although I\n> cannot easily test with actual permissions.\n>\n> You can start configuring the repo with\n>\n>    git init\n>    git svn init svn://server/ -T trunk\n>\n> to get an initial layout.  The .git/config will look like\n>\n>    [svn-remote \"svn\"]\n>            url = svn://server/\n>            fetch = trunk:refs/remotes/trunk\n>\n> The clue is that the config says 'fetch', not 'trunk'.  Much like with\n> git remotes, you can add more fetch specs along the lines of\n>\n>            fetch = branches/XXX:refs/remotes/svn/XXX\n>\n> or whatever layout you prefer.\nI did what you suggested. Now my .git/config looks like:\n[svn-remote \"svn\"]\n         url = svn://server/aaa/AAA\n         fetch = trunk:refs/remotes/trunk\n        fetch = branches/XXX:refs/remotes/svn/XXX\n  and here is the result:\n > git svn fetch\nW: Item is not readable: Item is not readable at \n/usr/libexec/git-core/git-svn line 1782\n\nError from SVN, (220001): Item is not readable: Item is not readable\n\nAny other idea ?\nOr is there a way to get more debug info from git-svn. May be it would \ngive us some insight on what it is trying to do and failing to.\n\nThanks,\n\nAntoine.\n\n>\n> Please tell us whether that works even in the face of restrictions on\n> branches/ itself :-)\n>\n\n-- \nAntoine Bonavita (antoine@stickyadstv.com)\nEnvoyé de mon PC. Moi je suis Fedora.\n"}]}