All of lore.kernel.org
 help / color / mirror / Atom feed
* git-svn sucks when it should not
@ 2008-07-07  0:00 Johannes Schindelin
  2008-07-07  9:44 ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2008-07-07  0:00 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Hi Eric,

I have the pleasure of needing to work with a subversion project where 
parts of the webserver are password restricted.

In particular, I cannot access the parent directory, and one of 
the branches is protected, too.

Maybe you remember me describing that problem on IRC a few weeks ago: yes, 
it is still persistent.

Now, I thought that I know my way around Perl, at least a little bit, but 
while git-svn barfed on the repository, I... uhm, well, you probably get 
the idea.

The funny part is this: when I say "git svn clone $URL/trunk", or the same 
with the absolute paths to the single tags, instead of "git svn clone -s 
$URL", git-svn does the correct thing.  It works, importing the stuff as 
"git-svn".

So I tried to just edit out by hand the branches section, so that the 
password-protected branch would not be a problem.

The result was surprising: git svn fetch exited with success, but it 
did... absolutely nothing.

After a lot of frustrating hours, which were not at all helped by 
brilliant variable names such as "r" and "gsv", I now know this: the log 
contains paths that do not have a prefix "trunk", but "<dir>/trunk", 
where "<dir>" is the last directory of the URL.

Changing git-svn's URL to the parent of <dir> is a no-go, since that is -- 
as I mentioned above -- password protected.

Yes, in a perfect world I could just force the admin to change that, but 
no, this is not a perfect world, so do not even try to suggest that if 
you want to help.

Changing the fetch line to "<dir>/trunk:refs/remotes/trunk" does not work 
either, since git-svn cleverly checks $URL/<dir>/<dir>/trunk/.

I then tried to hack match_globs() and match_paths() to add that extra 
prefix to the patterns, so that that extra prefix + trunk would be 
matched and edited out.  This happened to work out alright.

But I tried for several hours to get in a proper solution which does not 
throw up on the tags, and I have to conclude that this piece of code is 
not hackable by anybody else but you.

So I stand defeated by your program.  Thank you.

My ugly, ugly workaround that is however easy, easy, is a shell script 
that uses curl to find out what refs are new, and clones each ref 
individually, then pushes all the results together into one repository.

Should not have been _that_ hard,
Dscho

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-07 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07  0:00 git-svn sucks when it should not Johannes Schindelin
2008-07-07  9:44 ` Eric Wong
2008-07-07 11:49   ` Johannes Schindelin
2008-07-07 16:29     ` Avery Pennarun
2008-07-07 17:18       ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.