Re: Problem using git svn clone

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Problem using git svn clone

From: Seth Falcon <hidden>
Date: 2016-06-15 22:43:12

"Gustaf Hendeby" [off-list ref] writes:
Let me clarify. When trying to check out the module with tags, the first
example I only get the revisions, no content at all!  I have added some more
info on this below.
If you see the output of the revisions being pulled from svn this
seems very odd.  Does a 'du -sh' in the created directory confirm no
data is there?  Are you sure it isn't just a matter of nothing getting
checked out for you?
The second case works as I expected it, I included it as reference, and to
show that it worked (probably not the smartest thing to do I guess).  Hence,
probably just the first example is of interest.
quoted
The situation is as follows:
quoted
I plan to use git and git svn to track a module in the middle of a SVN
repository (which I have no control over) where I don't have read
access more than to this specific module and the base directory, ie
the layout is similar to this
      https://svn.foo.bar/a/b/c/trunk
      https://svn.foo.bar/a/b/c/tags
      https://svn.foo.bar/a/b/c/branches
and I have read access to https://svm.foo.bar/a,
https://svn.foo.bar/a/b/c and below, but nothing else.

What I want to do is clone the whole thing, including tags and
branches.  I expected to be able to use the following command to do
this (git v1.5.2):

$ git svn clone https://svn.foo.bar/a/b/c -T trunk -t tags -b branches

Initialized empty Git repository in .git/
Using higher level of URL: https://svn.foo.bar/a/b/c =>
https://svn.foo.bar/a
quoted
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on '/a/!svn/bc/100':
REPORT of '/a/!svn/bc/100': Could not read chunk size: Secure
connection truncated (https://svn.foo.bar)
r306 = 83f0c10b988a8f1e77a3f354126c52f0cfdecf76 (trunk)
[...]
Found possible branch point: https://svn.foo.bar/a/b/c/trunk =>
https://svn.foo.bar/a/b/c/tags/0.1, 314
Found branch parent: (tags/0.1) ad6a2361d0e69d6288ef226bb335bb4bf3bdd12e
Following parent with do_update
Successfully followed parent
r315 = 3b92c4885b9d6f60241533dd99fa5023eebb1c64 (tags/0.1)
r316 = 02e3b828b4f11c5fab9d10d85076a8ff209afa00 (trunk)
[...]

However, it seems I just get the info about the revisions (shows up
nicely in gitk) but no content at all.  The config file reads:

I'm really sorry, I mixed up the config files. :(  So I actually get this
for the first example not the second:

[core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true
[svn-remote "svn"]
       url = https://foo.bar/a
       fetch = b/c/trunk:refs/remotes/trunk
       branches = b/c/branches/*:refs/remotes/*
       tags = b/c/tags/*:refs/remotes/tags/*

Which looks good I guess...  But to be a bit more clear about what this
actually gives me in the directory I just cloned to, and this is the
problem:

$ git checkout -f master
What's in .git/refs/remotes?

Does 'git checkout -b mytrunk refs/remotes/git-svn' work?
Already on branch "master"
$ ls -a
.  ..  .git
$ du -hs .git/objects
186K    .git/objects
A du of the entire .git dir would be more informative.

+ seth

Re: Problem using git svn clone

From: Gustaf Hendeby <hidden>
Date: 2016-06-15 22:43:12

On 5/25/07, Seth Falcon [off-list ref] wrote:
"Gustaf Hendeby" [off-list ref] writes:
quoted
Let me clarify. When trying to check out the module with tags, the first
example I only get the revisions, no content at all!  I have added some more
info on this below.
If you see the output of the revisions being pulled from svn this
seems very odd.  Does a 'du -sh' in the created directory confirm no
data is there?  Are you sure it isn't just a matter of nothing getting
checked out for you?
The following result is the same directly after the clone attempt and
after a git checkout -f master:

$ du -hs
357K    .
$ ls -a
 .  ..  .git

If it is just not checked out I don't know what I'm doing wrong trying
to check it out.
quoted
The second case works as I expected it, I included it as reference, and to
show that it worked (probably not the smartest thing to do I guess).  Hence,
probably just the first example is of interest.
quoted
The situation is as follows:
quoted
I plan to use git and git svn to track a module in the middle of a SVN
repository (which I have no control over) where I don't have read
access more than to this specific module and the base directory, ie
the layout is similar to this
      https://svn.foo.bar/a/b/c/trunk
      https://svn.foo.bar/a/b/c/tags
      https://svn.foo.bar/a/b/c/branches
and I have read access to https://svm.foo.bar/a,
https://svn.foo.bar/a/b/c and below, but nothing else.

What I want to do is clone the whole thing, including tags and
branches.  I expected to be able to use the following command to do
this (git v1.5.2):

$ git svn clone https://svn.foo.bar/a/b/c -T trunk -t tags -b branches

Initialized empty Git repository in .git/
Using higher level of URL: https://svn.foo.bar/a/b/c =>
https://svn.foo.bar/a
quoted
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on '/a/!svn/bc/100':
REPORT of '/a/!svn/bc/100': Could not read chunk size: Secure
connection truncated (https://svn.foo.bar)
r306 = 83f0c10b988a8f1e77a3f354126c52f0cfdecf76 (trunk)
[...]
Found possible branch point: https://svn.foo.bar/a/b/c/trunk =>
https://svn.foo.bar/a/b/c/tags/0.1, 314
Found branch parent: (tags/0.1) ad6a2361d0e69d6288ef226bb335bb4bf3bdd12e
Following parent with do_update
Successfully followed parent
r315 = 3b92c4885b9d6f60241533dd99fa5023eebb1c64 (tags/0.1)
r316 = 02e3b828b4f11c5fab9d10d85076a8ff209afa00 (trunk)
[...]

However, it seems I just get the info about the revisions (shows up
nicely in gitk) but no content at all.  The config file reads:

I'm really sorry, I mixed up the config files. :(  So I actually get this
for the first example not the second:

[core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true
[svn-remote "svn"]
       url = https://foo.bar/a
       fetch = b/c/trunk:refs/remotes/trunk
       branches = b/c/branches/*:refs/remotes/*
       tags = b/c/tags/*:refs/remotes/tags/*

Which looks good I guess...  But to be a bit more clear about what this
actually gives me in the directory I just cloned to, and this is the
problem:

$ git checkout -f master
What's in .git/refs/remotes?
$ ls -R .git/refs/remotes/
.git/refs/remotes/:
tags  trunk

.git/refs/remotes/tags:
0.1  0.1.1  0.2.0  0.2.1

So, in some way there seems to be tag information, but git doesn't
seem to handle them as tags.
Does 'git checkout -b mytrunk refs/remotes/git-svn' work?
$ git checkout -b mytrunk refs/remotes/git-svn
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'refs/remotes/git-svn' which can not be
resolved as commit?

However
$ git checkout -b mytrunk refs/remotes/trunk
works but is without any content.
quoted
Already on branch "master"
$ ls -a
.  ..  .git
$ du -hs .git/objects
186K    .git/objects
A du of the entire .git dir would be more informative.
$ du -hs .git
356K    .git

For the checkout of the trunk, that works but don't obtain what I'm
looking for has:
$ du -hs .git
5.9M    .git
More stuff has been stored here.  The clone process here also
indicates lots of added and changed files, not just list SVN revision
numbers with matching SHA1s as in the case shown above.

Also, this may be totally natural, but I find the warning that I get
at the start of the clone quite strange (from above):

W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on '/a/!svn/bc/100':
REPORT of '/a/!svn/bc/100': Could not read chunk size: Secure
connection truncated (https://svn.foo.bar)
From where comes the !svn/bc/100 ?  Is it supposed to be like that?
Also, it feels a bit dangerous to me to fall back to a position in the
SVN tree where there is a level that I don't have any access to
between the base and the module I want and have access to.

/Gustaf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help