From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 3/3] git-svn: fix multi-init
Date: Tue, 28 Nov 2006 18:51:42 -0800 [thread overview]
Message-ID: <1164768705707-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <11647687042130-git-send-email-normalperson@yhbt.net>
After the bugfix to connect to repositories where the user has
limited read permissions, multi-init was broken due to our
SVN::Ra connection being limited to working in a subdirectory;
so we now create a new Ra connection for init-ing branches
and another for tags
Along with that fix, allow the user to use the command-line
option flags for multi-init (--revision being the most notable;
but also --no-auth-cache, --config-dir, --username (for passing
to SVN), and --shared/--template for passing to git-init-db
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index d8d8716..3891122 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -124,7 +124,12 @@ my %cmd = (
'no-graft-copy' => \$_no_graft_copy } ],
'multi-init' => [ \&multi_init,
'Initialize multiple trees (like git-svnimport)',
- { %multi_opts, %fc_opts } ],
+ { %multi_opts, %init_opts,
+ 'revision|r=i' => \$_revision,
+ 'username=s' => \$_username,
+ 'config-dir=s' => \$_config_dir,
+ 'no-auth-cache' => \$_no_auth_cache,
+ } ],
'multi-fetch' => [ \&multi_fetch,
'Fetch multiple trees (like git-svnimport)',
\%fc_opts ],
@@ -3316,11 +3321,11 @@ sub libsvn_commit_cb {
sub libsvn_ls_fullurl {
my $fullurl = shift;
- $SVN ||= libsvn_connect($fullurl);
+ my $ra = libsvn_connect($fullurl);
my @ret;
my $pool = SVN::Pool->new;
- my ($dirent, undef, undef) = $SVN->get_dir($SVN->{svn_path},
- $SVN->get_latest_revnum, $pool);
+ my $r = defined $_revision ? $_revision : $ra->get_latest_revnum;
+ my ($dirent, undef, undef) = $ra->get_dir('', $r, $pool);
foreach my $d (keys %$dirent) {
if ($dirent->{$d}->kind == $SVN::Node::dir) {
push @ret, "$d/"; # add '/' for compat with cli svn
--
1.4.4.1.g22a08
next prev parent reply other threads:[~2006-11-29 2:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 2:51 [PATCH 1/3] git-svn: color support for the log command Eric Wong
2006-11-29 2:51 ` [PATCH 2/3] git-svn: documentation updates Eric Wong
2006-11-29 2:51 ` Eric Wong [this message]
2006-11-29 7:29 ` Steven Grimm
2006-11-29 8:54 ` Eric Wong
2006-11-29 12:35 ` Pazu
2006-12-03 1:39 ` Eric Wong
2006-12-03 1:52 ` Junio C Hamano
2006-12-03 2:12 ` Eric Wong
2006-11-29 15:58 ` Seth Falcon
2006-12-03 1:49 ` Eric Wong
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=1164768705707-git-send-email-normalperson@yhbt.net \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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 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.