From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: git-svn sucks when it should not
Date: Mon, 7 Jul 2008 02:00:21 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.1.00.0807070135450.7342@eeepc-johanness> (raw)
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
next reply other threads:[~2008-07-07 0:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 0:00 Johannes Schindelin [this message]
2008-07-07 9:44 ` git-svn sucks when it should not Eric Wong
2008-07-07 11:49 ` Johannes Schindelin
2008-07-07 16:29 ` Avery Pennarun
2008-07-07 17:18 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0807070135450.7342@eeepc-johanness \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox