Problem with git-svn with limited SVN access
Hello,
I have a problem with a git-svn setup and although I spent most of yesterday googling for a solution but did not find any (see below for my failed attempts). I hope you guys here will be able to help me.
I have limited access to a SVN repository with a "standard" layout. By limited, I mean that I am allowed only to access the folders "trunk", "branches/XXX" and "branches/YYY".
*Attempt 1:*
Quoted 1 line
git svn init svn://server/aaa/AAA -T trunk -b branches --username=UUU
Initialized empty Git repository in /home/.../.git/ Using higher level of URL: svn://server/aaa/AAA => svn://server/aaa
Quoted 1 line
git svn fetch
Error from SVN, (220001): Item is not readable: Item is not readable
*Attempt 2:*
Quoted 1 line
git svn init svn://server/aaa/AAA -T trunk -b branches --username=UUU --no-minimize-url
Initialized empty Git repository in /home/.../.git/
Quoted 1 line
git svn fetch
W: Item is not readable: Item is not readable at /usr/libexec/git-core/git-svn line 1782
Error from SVN, (220001): Item is not readable: Item is not readable
*Attempt 3:*
Quoted 1 line
git svn init svn://server/aaa/AAA -T trunk --username=UUU --no-minimize-url
Initialized empty Git repository in /home/.../.git/
Quoted 1 line
git svn fetch
W: Item is not readable: Item is not readable at /usr/libexec/git-core/git-svn line 1782
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/AAA/trunk'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Read access denied for root of edit: Not authorized to open root of edit operation at /usr/libexec/git-core/git-svn line 5131
*Attempt 4:*
Quoted 1 line
git svn init -T svn://server/aaa/AAA/trunk -b svn://server/aaa/AAA/branches --username=UUU --no-minimize-url
Initialized empty Git repository in /home/.../.git/ svn-remote.svn.url already set: svn://server/aaa/AAA/trunk wanted to set to: svn://server/aaa/AAA/branches
Quoted 1 line
git svn fetch
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/AAA/trunk'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
### stuff actually retrieved from SVN
.....
r6035 = 6163cb28acff14d68f1b96869274b668405897a2 (refs/remotes/trunk)
.....
Compressing objects: 100% (10751/10751), done.
Writing objects: 100% (10886/10886), done.
Total 10886 (delta 9331), reused 0 (delta 0)
Checking out files: 100% (6002/6002), done.
Checked out HEAD:
svn://server/aaa/AAA/trunk r27316
creating empty directory: lib/AAA/mp3gain/otherlang/help
...
### No line with any branch. So it looks like I managed to get the trunk but not the branches.
*Attempt 5:*
Quoted 1 line
git svn init -T svn://server/aaa/AAA/trunk -b svn://server/aaa/AAA/branches --username=UUU --no-minimize-url
Initialized empty Git repository in /home/.../.git/ svn-remote.svn.url already set: svn://server/aaa/AAA/trunk wanted to set to: svn://server/aaa/AAA/branches ### My .git/config looks like:
[svn-remote "svn"]
url = svn://server/aaa/AAA/trunk
fetch = :refs/remotes/trunk
### If I try to add one of the branches manually:
branches = branches/XXX:refs/remotes/branches/XXX
Quoted 1 line
git svn fetch
One '*' is needed in glob: 'branches/XXX'
*Attempt 6:*
Quoted 1 line
git svn init -T svn://server/aaa/AAA/trunk -b svn://server/aaa/AAA/branches --username=UUU --no-minimize-url
Initialized empty Git repository in /home/.../.git/ svn-remote.svn.url already set: svn://server/aaa/AAA/trunk wanted to set to: svn://server/aaa/AAA/branches ### I put a glob instead of the branch name in git/.config:
branches = branches/{XXX,YYY}:refs/remotes/branches/*
Quoted 1 line
git svn fetch
...
Counting objects: 10886, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10751/10751), done.
Writing objects: 100% (10886/10886), done.
Total 10886 (delta 9330), reused 0 (delta 0)
error: Untracked working tree file 'COPYRIGHT.txt' would be overwritten by merge. read-tree -m -u -v HEAD HEAD: command returned error: 128
### Only refs/remotes/trunk checked out. No branch.
At this point, I'm really lost and running out of ideas. If someone could help me with this, I would be very grateful.
Please forgive me if I posted to the wrong mailing-list but I could not find a specific git-svn list. If there is such thing, please point me in the right direction.
Thanks,
Antoine.
Signature · 2 lines
Antoine Bonavita ([email protected]) Envoyé de mon PC. Moi je suis Fedora.
Quoted 4 lines · Antoine Bonavita
### If I try to add one of the branches manually:
branches = branches/XXX:refs/remotes/branches/XXXQuoted 1 line
git svn fetch
One '*' is needed in glob: 'branches/XXX'
I think having several fetch specs should do the trick, although I cannot easily test with actual permissions.
You can start configuring the repo with
git init
git svn init svn://server/ -T trunk
to get an initial layout. The .git/config will look like
[svn-remote "svn"]
url = svn://server/
fetch = trunk:refs/remotes/trunk
The clue is that the config says 'fetch', not 'trunk'. Much like with git remotes, you can add more fetch specs along the lines of
fetch = branches/XXX:refs/remotes/svn/XXX
or whatever layout you prefer.
Please tell us whether that works even in the face of restrictions on branches/ itself :-)
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chThomas,
Thanks a lot for taking the time to look at my problem.
Quoted 20 lines · Thomas Rast
Quoted 4 lines · Antoine Bonavita
### If I try to add one of the branches manually:
branches = branches/XXX:refs/remotes/branches/XXXQuoted 1 line
git svn fetch
One '*' is needed in glob: 'branches/XXX'
I think having several fetch specs should do the trick, although I cannot easily test with actual permissions.
You can start configuring the repo with
git init
git svn init svn://server/ -T trunkto get an initial layout. The .git/config will look like
[svn-remote "svn"] url = svn://server/ fetch = trunk:refs/remotes/trunk
Quoted 6 lines
The clue is that the config says 'fetch', not 'trunk'. Much like with git remotes, you can add more fetch specs along the lines of
fetch = branches/XXX:refs/remotes/svn/XXX
or whatever layout you prefer.
I did what you suggested. Now my .git/config looks like:
[svn-remote "svn"]
url = svn://server/aaa/AAA
fetch = trunk:refs/remotes/trunk
fetch = branches/XXX:refs/remotes/svn/XXX
and here is the result:
Quoted 1 line
git svn fetch
W: Item is not readable: Item is not readable at /usr/libexec/git-core/git-svn line 1782
Error from SVN, (220001): Item is not readable: Item is not readable
Any other idea ?
Or is there a way to get more debug info from git-svn. May be it would give us some insight on what it is trying to do and failing to.
Thanks,
Antoine.
Quoted 4 lines
Please tell us whether that works even in the face of restrictions on branches/ itself :-)
Signature · 2 lines
Antoine Bonavita ([email protected]) Envoyé de mon PC. Moi je suis Fedora.